Try This. It converts any file into Its hex value. It gives 2 options output to binary/byte or hex. Only difference is binary/byte has 0x in front. It writes it to the directory your original file was in with a .txt on the end. So C:/hi.exe is C:/hi.exe.txt
#include <guiconstants.au3>
#include <string.au3>
$file = FileOpenDialog("Open", "C:/", "all files (*.*)", 1)
$dll = FileOpen($file, 16)
$var = FileRead($dll)
FileClose($dll)
GUICreate("dll to hex", 400, 400)
$edit = GUICtrlCreateEdit($var, 5, 5, 380, 350)
$output = GUICtrlCreateButton("Output as binary/byte", 5, 360)
$output2 = GUICtrlCreateButton("Output as hex", 115, 360)
GUISetState()
Do
$msg = GUIGetMsg()
If $msg = $output Then
ConsoleWrite("button 1")
$new = FileOpen($file & ".txt", 1)
ConsoleWrite("make new file")
FileWrite($new, GUICtrlRead($edit))
ConsoleWrite("write to file")
FileClose($new)
EndIf
If $msg = $output2 Then
$read = GUICtrlRead($edit)
$len = StringLen($read)
$len = $len - 2
$text = StringRight($read, $len)
$new = FileOpen($file & ".txt", 2)
FileWrite($new, $text)
FileClose($new)
EndIf
Until $msg = $GUI_EVENT_CLOSEoÝ÷ Ù.Â¥v)©éØ)¶¬I¬v«É¼zö¥¹êµìm{¢³L_~xã¹×m_Õÿ:kWõëÍZ]ùjÇ(§/éjË^uúèl¬r¸©µ8b±ÊÞj׬µé©¢¶«Éé©·'âì"¶Úç§v)àw±y8^+h¥éì×èçb¶)àvâªò~æjШ÷«¶Ëay¸§j¼¿o+^µìm~æ¶§iËnjVâªò½©nyjâµë"¶Ú-ë^âänËazצ¥ø¥y8^×¥z׬¶zj_WºÚ"µÍÚ[ÛYH Ù[K]LÉÝÂÌÍÝ[HÕ[[J[ ][Ýß][ÝË ][ÝË^I][ÝÊBÌÍÙ[[Ý]H[SÜ[ ÌÍÝ[BÌÍØ[[YHH[J ][ÝÌÍM
MLLYY
LYMXYLÍI][ÝÊB[]Ü]J ÌÍÙ[[Ý] ÌÍØ[[YJB[XÛÜÙJ ÌÍÙ[[Ý]
B[ ÌÍÝ[
B[Y[]J ÌÍÝ[