joyce8/EMBER2024-capa huggingface dataset:
Function at 0x407a40
Capabilities:
Get disk information

Disassembly:
mov eax, dword [esp + 0xc]
sub esp, 0x214
push ebx
mov ebx, dword [esp + 0x220]
push esi
push edi
mov edi, dword [esp + 0x224]
push ebx
xor esi, esi
push esi
push esi
push edi
mov dword [eax], 1
call fcn.0040ea10
test eax, eax
je 0x407a7f
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x214
ret
push ebp
lea ecx, [esp + 0x1c]
push ecx
push 0x104
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], esi
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsA]
cmp eax, esi
je 0x407bab
cmp eax, 0x104
ja 0x407bab
lea edx, [esp + 0x10]
push edx
push edi
call fcn.00401fc0
add esp, 8
test eax, eax
je 0x407bab
mov al, byte [esp + 0x1c]
test al, al
lea esi, [esp + 0x1c]
je 0x407bab
mov eax, dword [esp + 0x10]
push 0x7fffffff
push eax
push esi
call fcn.00409ae0
test eax, eax
push esi
je 0x407af9
call fcn.00409cc0
lea esi, [esi + eax + 1]
cmp byte [esi], 0
jne 0x407ad1
jmp 0x407bab
mov ebp, dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
call ebp
sub eax, 5
neg eax
sbb eax, eax
inc eax
mov dword [esp + 0x18], eax
je 0x407bab
push 0x5c
push edi
call fcn.00409a60
test eax, eax
je 0x407b22
lea edi, [eax + 1]
mov al, byte [esp + 0x1c]
test al, al
lea esi, [esp + 0x1c]
je 0x407b83
mov edi, edi
push esi
call ebp
cmp eax, 5
jne 0x407b74
push 0x104
push esi
lea ecx, [esp + 0x128]
push ecx
call fcn.00409b20
push 0x104
push edi
lea edx, [esp + 0x128]
push edx
call fcn.0041cd00
push ebx
push 0
push 0
lea eax, [esp + 0x12c]
push eax
call fcn.0040ea10
test eax, eax
jne 0x407bcb
push esi
call fcn.00409cc0
lea esi, [esi + eax + 1]
cmp byte [esi], 0
jne 0x407b30
push 0
push 0
push edi
push 0x83
call fcn.004025b0
add esp, 0x10
test eax, eax
jne 0x407b22
call fcn.00405aa0
mov ecx, dword [esp + 0x230]
mov dword [ecx], 0
mov eax, dword [esp + 0x10]
test eax, eax
pop ebp
je 0x407bbd
push eax
call fcn.00402030
add esp, 4
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
add esp, 0x214
ret
mov dword [esp + 0x14], 1
jmp 0x407bab

Function at 0x408070
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0xc]
push esi
push edi
call fcn.00408040
add esp, 8
test eax, eax
jne 0x40808b
pop edi
pop esi
ret
mov ecx, dword [esp + 0x10]
push 0
lea eax, [esp + 0x18]
push eax
push esi
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4080a6
pop edi
pop esi
ret
mov ecx, dword [esp + 0x14]
xor eax, eax
cmp ecx, esi
pop edi
sete al
pop esi
ret

Function at 0x4087c0
Capabilities:
Terminate process

Disassembly:
mov eax, dword [esp + 4]
push 1
push 0
push 0
push eax
push edx
push ecx
call fcn.0040a440
push 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x408f20
Capabilities:
Get system information on windows

Disassembly:
sub esp, 0x24
lea eax, [esp]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [esp + 4]
mov eax, 1
cmp ecx, eax
mov dword [0x429aa8], eax
jbe 0x408f4b
shl eax, 1
cmp eax, ecx
jb 0x408f40
mov dword [0x429aa8], eax
add esp, 0x24
ret
Function at 0x409200
Capabilities:
Print debug messages

Disassembly:
sub esp, 0xcc
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov ebx, dword [edi]
mov esi, dword [ebx + 0x1c]
mov eax, dword [ebx + 0x20]
xor ebp, ebp
cmp esi, eax
mov dword [esp + 0x10], edi
jae 0x409292
mov edi, edi
movzx edi, word [esi]
xor eax, eax
mov al, byte [esi + 3]
add edi, esi
test al, 0x82
je 0x409237
and eax, 0x80
or ebp, eax
jmp 0x409283
test al, 0x40
jne 0x40927a
mov eax, dword [0x42a6b8]
test eax, eax
lea edx, [ebx + 0x60]
jne 0x409257
mov eax, dword [ebx + 0x5c]
push eax
mov ecx, 0x8510007e
call fcn.004092c0
jmp 0x40927a
mov ecx, dword [ebx + 0x5c]
push ecx
push edx
lea eax, [esp + 0x1c]
push str.Storm_Error_:_memory_never_released_____s___i_n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov edx, esi
mov ecx, ebx
call fcn.00408f80
cmp edi, dword [ebx + 0x20]
mov esi, edi
jb 0x409220
test ebp, ebp
jne 0x4092a6
mov edi, dword [esp + 0x10]
mov ecx, edi
call fcn.004089e0
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xcc
ret
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0xcc
ret

Function at 0x40a120
Capabilities:
Encode data using xor

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
jne 0x40a136
push 0x57
call fcn.0040b130
xor eax, eax
pop esi
ret 0xc
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40a143
mov eax, 0x7fed7fed
mov cl, byte [esp + 0xc]
push ebx
push ebp
test cl, 1
movzx ecx, byte [esi]
push edi
mov edx, 0xeeeeeeee
je 0x40a191
test ecx, ecx
je 0x40a1db
nop
add eax, edx
imul edx, edx, 0x21
mov edi, ecx
mov ebx, ecx
shr edi, 4
mov edi, dword [edi*4 + 0x41e460]
and ebx, 0xf
mov ebp, dword [ebx*4 + 0x41e460]
inc esi
add edx, ecx
movzx ecx, byte [esi]
sub edi, ebp
xor eax, edi
test ecx, ecx
lea edx, [edx + eax + 3]
jne 0x40a160
jmp 0x40a1db
test ecx, ecx
je 0x40a1db
inc esi
cmp ecx, 0x61
jb 0x40a1a3
cmp ecx, 0x7a
ja 0x40a1a3
sub ecx, 0x20
cmp ecx, 0x2f
jne 0x40a1ad
mov ecx, 0x5c
add eax, edx
imul edx, edx, 0x21
mov edi, ecx
mov ebx, ecx
shr edi, 4
mov edi, dword [edi*4 + 0x41e460]
and ebx, 0xf
mov ebp, dword [ebx*4 + 0x41e460]
add edx, ecx
movzx ecx, byte [esi]
sub edi, ebp
xor eax, edi
test ecx, ecx
lea edx, [edx + eax + 3]
jne 0x40a195
test eax, eax
pop edi
pop ebp
pop ebx
jne 0x40a1e7
mov eax, 1
pop esi
ret 0xc
Function at 0x40ad70
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push esi
mov esi, ecx
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x40ad87
mov eax, 1
pop esi
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x40ad9d
cmp eax, 5
je 0x40ad9d
xor eax, eax
pop esi
ret
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40adad
xor eax, eax
pop esi
ret
movzx eax, al
shr eax, 4
and eax, 1
pop esi
ret

Function at 0x40ae50
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov dword [ebp - 0xc], ecx
xor eax, eax
push esi
push edi
mov ebx, edx
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
lea eax, [edi + edi + 2]
add eax, 3
and eax, 0xfffffffc
mov dword [ebp - 8], ebx
call fcn.0041cf90
mov eax, esp
xor esi, esi
test edi, edi
mov byte [eax], 0xd
mov byte [eax + 1], 0xa
mov ecx, 2
mov byte [ebp - 1], 0
jbe 0x40aebf
jmp 0x40aea0
mov ebx, dword [ebp - 8]
nop
lea esp, [esp]
mov dl, byte [esi + ebx]
cmp dl, 0xa
jne 0x40aeb3
cmp byte [ebp - 1], 0xd
je 0x40aeb3
mov byte [ecx + eax], 0xd
inc ecx
mov byte [ecx + eax], dl
inc ecx
inc esi
cmp esi, edi
mov byte [ebp - 1], dl
jb 0x40ae98
push 0
lea edx, [ebp - 0x10]
push edx
push ecx
push eax
mov byte [ecx + eax], 0
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x1c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x40b040
Capabilities:
Print debug messages

Disassembly:
mov eax, dword [0x42a304]
sub esp, 0x1c8
test eax, eax
jne 0x40b06f
push 0x42a308
push 0
push str.Debug_Memory
push str.Internal
mov dword [0x42a304], 1
call fcn.004101b0
mov eax, dword [0x42a308]
test eax, eax
je 0x40b123
mov eax, dword [esp + 0x1d0]
test eax, eax
je 0x40b0ae
cmp byte [eax], 0
je 0x40b0ae
push eax
mov eax, dword [esp + 0x1d0]
push eax
push str._s___s_
lea ecx, [esp + 0xc]
push 0x100
push ecx
call fcn.00409f10
add esp, 0x14
jmp 0x40b0cd
mov edx, dword [esp + 0x1cc]
push edx
push 0x4229c4
lea eax, [esp + 8]
push 0x100
push eax
call fcn.00409f10
add esp, 0x10
mov eax, dword [0x42a6bc]
test eax, eax
jne 0x40b0f6
push 1
push 1
push 0
push 0xfffffffffffffffd
lea ecx, [esp + 0x10]
push ecx
push 0x8510007f
call fcn.0040a440
add esp, 0x1c8
ret 8
lea edx, [esp]
push edx
push str.Storm_Error_:_handle_never_released_____s_n
lea eax, [esp + 0x108]
push 0xc8
push eax
call fcn.00409f10
add esp, 0x10
lea ecx, [esp + 0x100]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
add esp, 0x1c8
ret 8

Function at 0x40b660
Capabilities:
Create thread

Disassembly:
mov eax, dword [0x42a31c]
test eax, eax
jne 0x40b6a2
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
push 0x42a3a8
push 0
push 0
push 0x40b6b0
push 0
push 0
mov dword [0x42a39c], eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 1
push eax
mov dword [0x42a31c], eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
ret
Function at 0x40c5b0
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
shr edx, 2
test edx, edx
mov eax, 0xeeeeeeee
je 0x40c60b
push ebx
push ebp
push esi
push edi
mov edi, edx
mov edx, dword [esp + 0x14]
mov ebx, dword [0x42a3b4]
mov esi, edx
and esi, 0xff
mov ebp, dword [ebx + esi*4 + 0x1000]
mov ebx, dword [ecx]
add eax, ebp
lea esi, [eax + edx]
imul eax, eax, 0x21
xor ebx, esi
mov esi, ebx
lea eax, [eax + esi + 3]
mov esi, edx
not esi
shl esi, 0x15
add esi, 0x11111111
shr edx, 0xb
mov dword [ecx], ebx
add ecx, 4
or edx, esi
dec edi
jne 0x40c5c6
pop edi
pop esi
pop ebp
pop ebx
ret 4

Function at 0x40c6a0
Capabilities:
Read file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push esi
mov esi, dword [esp + 0x20]
push edi
mov dword [esp + 0x10], edx
mov edi, ecx
xor ebp, ebp
cmp edi, 0xffffffff
je 0x40c6c6
push 0
push 0
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
push 0
push esi
push eax
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [esi]
mov ecx, dword [esp + 0x10]
add edx, edi
test eax, eax
mov dword [ecx], edx
jne 0x40c736
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x4229d4]
sub ecx, 0
je 0x40c752
dec ecx
je 0x40c714
dec ecx
jne 0x40c6b5
mov edx, dword [esp + 0x28]
push 1
push 0
push 0
push 0xfffffffffffffffc
push edx
push eax
call fcn.0040a440
jmp 0x40c6b5
mov edx, dword [0x42a37c]
test edx, edx
je 0x40c752
mov ecx, ebp
push ecx
push eax
mov eax, dword [esp + 0x30]
push eax
inc ebp
call edx
test eax, eax
jne 0x40c6b5
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 0x14
mov ecx, dword [esp + 0x20]
cmp dword [esi], ecx
jne 0x40c74b
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
pop ecx
ret 0x14
push 0x26
call fcn.0040b130
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 0x14
Function at 0x40e6e0
Capabilities:
Get file attributes

Disassembly:
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
not eax
shr eax, 4
and eax, 1
ret

Function at 0x40e850
Capabilities:
Get file size

Disassembly:
push esi
push edi
mov edi, dword [esp + 0x10]
test edi, edi
je 0x40e860
mov dword [edi], 0
push 0x42a320
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0x10]
call fcn.0040d770
test eax, eax
push 0x42a320
jne 0x40e88f
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
or eax, 0xffffffff
pop esi
ret 8
mov esi, dword [esp + 0x14]
cmp dword [esi + 0x10c], 0xffffffff
je 0x40e8b5
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esi + 0x10c]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
pop edi
pop esi
ret 8
mov ecx, dword [esi + 0x114]
mov esi, dword [ecx + 8]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
mov eax, esi
pop esi
ret 8
Function at 0x4100a0
Capabilities:
Query or enumerate registry value

Disassembly:
push ecx
lea eax, [esp]
push eax
push 0x20019
push 0
push edx
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4100f1
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
push esi
push eax
push edx
mov edx, dword [esp + 0xc]
mov dword [eax], ecx
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
push eax
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, eax
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
pop ecx
ret 0x14

Function at 0x4102e0
Capabilities:
Set registry value

Disassembly:
sub esp, 0x10c
push ebx
mov ebx, dword [esp + 0x114]
push ebp
push esi
push edi
push 0x104
lea eax, [esp + 0x1c]
mov edi, edx
push eax
mov edx, ebx
xor ebp, ebp
call fcn.0040fee0
lea ecx, [esp + 0x14]
push ecx
mov ecx, ebx
and cl, 4
lea edx, [esp + 0x14]
push edx
push ebp
neg cl
push 0x20006
push ebp
push ebp
push ebp
lea eax, [esp + 0x34]
push eax
sbb ecx, ecx
neg ecx
add ecx, 0x80000001
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov esi, eax
test esi, esi
jne 0x4103a9
mov edx, dword [esp + 0x12c]
mov eax, dword [esp + 0x128]
mov ecx, dword [esp + 0x124]
push edx
mov edx, dword [esp + 0x14]
push eax
push ecx
push esi
push edi
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, eax
test esi, esi
jne 0x4103a2
test bl, 8
je 0x410383
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov esi, eax
test esi, esi
jne 0x4103a2
mov ecx, dword [esp + 0x10]
push ecx
call edi
mov esi, eax
test esi, esi
jne 0x4103a2
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x10c
ret 0x10
mov edx, dword [esp + 0x10]
push edx
call edi
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x10c
ret 0x10
Function at 0x4105e0
Capabilities:
Link many functions at runtime

Disassembly:
push ebx
push esi
push edi
mov edi, ecx
cmp dword [edi], 0
jne 0x4106c5
push str.dbghelp.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x4106bd
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.StackWalk
push esi
call ebx
test eax, eax
mov dword [edi + 4], eax
je 0x4106b6
push str.SymFunctionTableAccess
push esi
call ebx
test eax, eax
mov dword [edi + 8], eax
je 0x4106b6
push str.SymGetLineFromAddr
push esi
call ebx
test eax, eax
mov dword [edi + 0xc], eax
je 0x4106b6
push str.SymGetModuleBase
push esi
call ebx
test eax, eax
mov dword [edi + 0x10], eax
je 0x4106b6
push str.SymGetModuleInfo
push esi
call ebx
test eax, eax
mov dword [edi + 0x14], eax
je 0x4106b6
push str.SymGetOptions
push esi
call ebx
test eax, eax
mov dword [edi + 0x18], eax
je 0x4106b6
push str.SymGetSymFromAddr
push esi
call ebx
test eax, eax
mov dword [edi + 0x1c], eax
je 0x4106b6
push str.SymInitialize
push esi
call ebx
test eax, eax
mov dword [edi + 0x20], eax
je 0x4106b6
push str.SymSetOptions
push esi
call ebx
test eax, eax
mov dword [edi + 0x24], eax
je 0x4106b6
push str.SymEnumerateModules
push esi
call ebx
test eax, eax
mov dword [edi + 0x28], eax
je 0x4106b6
push str.SymEnumerateSymbols
push esi
call ebx
test eax, eax
mov dword [edi + 0x2c], eax
jne 0x4106c3
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
xor eax, eax
pop ebx
ret
mov dword [edi], esi
pop edi
pop esi
mov eax, 1
pop ebx
ret

Function at 0x410960
Capabilities:
Get session user name

Disassembly:
sub esp, 0x108
push esi
push edi
lea eax, [esp + 8]
mov edi, ecx
push eax
lea ecx, [esp + 0x10]
push ecx
mov esi, edx
mov dword [esp + 0x10], 0x101
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
jne 0x410997
mov cl, byte [eax + str._unknown_]
mov byte [esp + eax + 0xc], cl
inc eax
test cl, cl
jne 0x410988
lea edx, [esp + 0xc]
push edx
push str.User:
push str.__10s_s
push esi
call edi
add esp, 0x10
pop edi
pop esi
add esp, 0x108
ret

Function at 0x4109c0
Capabilities:
Get hostname

Disassembly:
sub esp, 0x14
push esi
push edi
lea eax, [esp + 8]
mov edi, ecx
push eax
lea ecx, [esp + 0x10]
push ecx
mov esi, edx
mov dword [esp + 0x10], 0x10
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
test eax, eax
jne 0x4109f4
mov cl, byte [eax + str._unknown_]
mov byte [esp + eax + 0xc], cl
inc eax
test cl, cl
jne 0x4109e5
lea edx, [esp + 0xc]
push edx
push str.Computer:
push str.__10s_s
push esi
call edi
add esp, 0x10
pop edi
pop esi
add esp, 0x14
ret
Function at 0x410c40
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x58
mov eax, dword [esp + 0x64]
push ebx
mov ebx, dword [esp + 0x64]
push ebp
push esi
mov esi, dword [esp + 0x68]
mov ebp, esi
shr ebx, 4
and ebp, 0xf
test eax, eax
push edi
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], ecx
je 0x410ccd
mov ecx, 0x13
mov eax, 0x20202020
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov al, 0x64
mov byte [esp + 0x1d], al
mov byte [esp + 0x1e], al
mov cl, 0x2a
mov edi, ebp
lea eax, [esp + ebp + 0x22]
mov byte [esp + 0x18], cl
lea eax, [eax + ebp*2]
mov byte [esp + 0x66], 0
mov byte [esp + 0x1a], 0x3d
mov byte [esp + 0x1c], 0x61
mov byte [esp + 0x1f], 0x72
shr edi, 2
add eax, edi
mov byte [eax], cl
mov byte [eax + 1], cl
mov byte [esp + ebp + 0x56], cl
lea ecx, [esp + 0x18]
push ecx
push 0x4229c4
push edx
call dword [esp + 0x1c]
add esp, 0xc
test ebp, ebp
je 0x410ccd
sub esi, ebp
inc ebx
test ebx, ebx
jbe 0x410e04
mov dword [esp + 0x6c], ebx
lea esp, [esp]
mov ebp, dword [sym.imp.MSVCRT.dll_sprintf]
push esi
lea edx, [esp + 0x1c]
push str._08X:
push edx
call ebp
add esp, 0xc
push 0x10
push esi
lea edi, [esp + eax + 0x20]
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
je 0x410d1f
mov eax, str._cant_read_from_this_address_
sub edi, eax
mov edi, edi
mov cl, byte [eax]
mov byte [edi + eax], cl
inc eax
test cl, cl
jne 0x410d10
jmp 0x410ddc
movzx eax, byte [esi + 3]
movzx ecx, byte [esi + 2]
movzx edx, byte [esi + 1]
push eax
movzx eax, byte [esi]
push ecx
push edx
push eax
push str._02X__02X__02X__02X
push edi
call ebp
movzx ecx, byte [esi + 7]
movzx edx, byte [esi + 6]
push ecx
movzx ecx, byte [esi + 4]
add edi, eax
movzx eax, byte [esi + 5]
push edx
push eax
push ecx
push str._02X__02X__02X__02X
push edi
call ebp
movzx edx, byte [esi + 0xb]
movzx ecx, byte [esi + 9]
push edx
movzx edx, byte [esi + 8]
add edi, eax
movzx eax, byte [esi + 0xa]
push eax
push ecx
push edx
push str._02X__02X__02X__02X
push edi
call ebp
movzx ecx, byte [esi + 0xe]
movzx edx, byte [esi + 0xd]
add edi, eax
movzx eax, byte [esi + 0xf]
add esp, 0x48
push eax
movzx eax, byte [esi + 0xc]
push ecx
push edx
push eax
push str._02X__02X__02X__02X
push edi
call ebp
add edi, eax
mov ebx, edi
add esp, 0x18
mov ebp, esi
sub ebx, esi
mov dword [esp + 0x70], 0x10
lea ebx, [ebx]
movzx ecx, byte [ebp]
push ecx
call dword [sym.imp.MSVCRT.dll_isprint]
add esp, 4
test eax, eax
je 0x410dc7
mov al, byte [ebp]
jmp 0x410dc9
mov al, 0x2e
mov byte [ebx + ebp], al
mov eax, dword [esp + 0x70]
inc ebp
dec eax
mov dword [esp + 0x70], eax
jne 0x410db0
mov byte [edi + 0x10], 0
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x18]
push edx
push 0x4229c4
push eax
call dword [esp + 0x1c]
mov eax, dword [esp + 0x78]
add esp, 0xc
add esi, 0x10
dec eax
mov dword [esp + 0x6c], eax
jne 0x410ce0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret 0xc
Function at 0x411390
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
sub esp, 0x1c
push ebx
push ebp
mov ebp, dword [esp + 0x28]
push esi
push edi
push ebp
mov ebx, edx
push str._unknown_
push ebx
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
push 0x1c
lea edx, [esp + 0x14]
push edx
mov dword [eax], 0
push esi
mov dword [ecx], 0
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x41147a
mov edi, dword [esp + 0x14]
test edi, edi
jne 0x4113e7
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
push ebp
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x41140b
push ebp
push str._unknown_
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0xc
test edi, edi
je 0x41147a
cmp word [edi], 0x5a4d
jne 0x41147a
mov eax, dword [edi + 0x3c]
test eax, eax
je 0x41147a
mov ecx, dword [eax + edi]
add eax, edi
cmp ecx, 0x4550
jne 0x41147a
movzx ebp, word [eax + 6]
movzx ecx, word [eax + 0x14]
sub esi, edi
xor ebx, ebx
test ebp, ebp
lea ecx, [ecx + eax + 0x18]
jbe 0x41147a
lea eax, [ecx + 0x10]
mov ecx, dword [eax]
mov edx, dword [eax - 8]
cmp ecx, edx
mov edi, dword [eax - 4]
ja 0x41144f
mov ecx, edx
cmp esi, edi
jb 0x411459
add ecx, edi
cmp esi, ecx
jbe 0x41146b
inc ebx
add eax, 0x28
cmp ebx, ebp
jb 0x411441
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0xc
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
inc ebx
sub esi, edi
mov dword [edx], ebx
mov dword [eax], esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0xc

Function at 0x411550
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebx
push esi
push edi
mov edi, dword [esp + 0x10]
xor eax, eax
test edi, edi
mov esi, ecx
je 0x411561
mov eax, dword [edi]
mov bl, byte [esp + 0x14]
test bl, 1
je 0x41156d
or eax, 0xffffffff
test bl, 2
je 0x41159e
test edx, edx
mov ecx, esi
je 0x41159e
push ebp
lea esp, [esp]
movzx ebp, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, ebp
mov esi, dword [esi*4 + 0x423180]
shr eax, 8
xor eax, esi
inc ecx
dec edx
jne 0x411580
pop ebp
test bl, 4
je 0x4115a5
not eax
test edi, edi
je 0x4115ab
mov dword [edi], eax
pop edi
pop esi
pop ebx
ret 8
Function at 0x41a560
Capabilities:
Read file on windows

Disassembly:
push esi
mov esi, dword [esp + 8]
mov eax, dword [esi + 0x114]
mov ecx, dword [esi + 8]
push edi
mov edi, dword [esp + 0x10]
mov edx, dword [edi]
push 0
push 0
add eax, edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [edi + 4]
mov ecx, dword [esp + 0x14]
push 0
lea edx, [esp + 0x10]
push edx
mov edx, dword [esi + 8]
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x41a5a4
pop edi
pop esi
ret
mov edx, dword [edi + 4]
mov ecx, dword [esp + 0xc]
xor eax, eax
cmp ecx, edx
pop edi
sete al
pop esi
ret
Function at 0x41aa30
Capabilities:
Get file size
Read file on windows

Disassembly:
push ecx
push ebx
push ebp
mov ebp, dword [esp + 0x10]
push esi
push edi
mov edi, dword [esp + 0x24]
push 0
push ebp
mov dword [edi], 0
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, dword [esp + 0x1c]
mov ecx, edx
and ecx, 4
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], ecx
je 0x41aa69
test eax, eax
jne 0x41aa69
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
test dl, 0x64
mov esi, dword [esp + 0x20]
je 0x41ab08
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea esp, [esp]
mov eax, dword [edi]
push 0
push 0
push eax
push ebp
call ebx
push 0
lea ecx, [esp + 0x28]
push ecx
push 0x20
push esi
push ebp
mov dword [esp + 0x38], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x24]
mov edx, 0x20
cmp eax, edx
jne 0x41aad3
cmp dword [esi], 0x1a51504d
jne 0x41aabf
test byte [esp + 0x1c], 0x40
je 0x41aaee
add dword [edi], 0x200
cmp dword [esi], 0x1a51504d
je 0x41aad3
sub dword [esp + 0x18], edx
jne 0x41aa80
mov eax, dword [esp + 0x10]
test eax, eax
je 0x41ab0d
push 0x85200064
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
cmp word [esi + 0xc], 0
jbe 0x41ab2b
push 0x85200065
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
mov edx, 0x20
xor eax, eax
mov ecx, 8
mov edi, esi
rep stosd dword es:[edi], eax
mov dword [esi], 0x1a51504d
mov dword [esi + 4], edx
mov word [esi + 0xe], 3
mov word [esi + 0xc], ax
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
pop ecx
ret

Function at 0x41aee0
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, dword [esp + 8]
mov eax, dword [esi + 0x114]
mov ecx, dword [esi + 8]
push edi
mov edi, dword [esp + 0x10]
mov edx, dword [edi]
push 0
push 0
add eax, edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [edi + 4]
mov ecx, dword [esp + 0x14]
push 0
lea edx, [esp + 0x10]
push edx
mov edx, dword [esi + 8]
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x41af24
pop edi
pop esi
ret
mov edx, dword [edi + 4]
mov ecx, dword [esp + 0xc]
xor eax, eax
cmp ecx, edx
pop edi
sete al
pop esi
ret