joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10002050
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x1000d00c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x10002080
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10007863
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
mov eax, dword [eax]
test eax, eax
je 0x100020b0
mov edx, dword [esi + 0x30]
mov edx, dword [edx]
add edx, eax
cmp eax, edx
jae 0x100020b0
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void_]
pop esi
mov byte [eax], bl
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10007863
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
push edi
je 0x10002186
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x100020d9
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x100020e5
movsx eax, bl
jmp 0x1000211d
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x25], bl
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x25]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
sub eax, 0
je 0x10002147
sub eax, 1
je 0x10002147
sub eax, 2
jne 0x10002186
movsx eax, byte [ebp - 0x25]
push dword [esi + 0x4c]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10007863
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x10002165
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x10002186
lea eax, [ebp - 0x25]
mov byte [esi + 0x3d], 1
cmp dword [ebp - 0x30], eax
je 0x10002186
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10007863
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10007863
mov esp, ebp
pop ebp
ret 4
Function at 0x10002570
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x1000d00c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x1000262c
cmp byte [esi + 0x3d], 0
je 0x1000262c
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x1000261a
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x100025e1
sub eax, 1
je 0x100025e5
sub eax, 2
jne 0x1000261a
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10007863
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x10002603
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x1000261a
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10007863
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10007863
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.10007863
mov esp, ebp
pop ebp
ret
Function at 0x10002d10
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x1000d00c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword fs:[0x2c]
mov ecx, dword [0x1000d6a0]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x1000d6d0]
cmp eax, dword [ecx + 4]
jle 0x10002d73
push 0x1000d6d0
call fcn.100079e1
add esp, 4
cmp dword [0x1000d6d0], 0xffffffff
jne 0x10002d73
push 0x10008ad0
mov dword [0x1000d6d4], 0x10009834
call fcn.10007dbc
push 0x1000d6d0
call fcn.10007997
add esp, 8
push esi
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 8]
push eax
push 0x40
push 4
push 0x445f40
mov dword [ebp - 8], 0
call esi
test eax, eax
je 0x10002dae
lea eax, [ebp - 8]
mov dword [0x445f40], 0x1000d808
push eax
push dword [ebp - 8]
push 4
push 0x445f40
call esi
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push 0x40
push 4
push 0x473096
call esi
test eax, eax
je 0x10002de2
lea eax, [ebp - 8]
mov dword [0x473096], 0x1000d808
push eax
push dword [ebp - 8]
push 4
push 0x473096
call esi
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push 0x40
push 4
push 0x565b54
call esi
test eax, eax
je 0x10002e16
lea eax, [ebp - 8]
mov dword [0x565b54], 0x1000d808
push eax
push dword [ebp - 8]
push 4
push 0x565b54
call esi
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push 0x40
push 1
push 0x445f30
call esi
test eax, eax
je 0x10002e47
lea eax, [ebp - 8]
mov byte [0x445f30], 0x32
push eax
push dword [ebp - 8]
push 1
push 0x445f30
call esi
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push 0x40
push 1
push 0x565b49
call esi
test eax, eax
je 0x10002e78
lea eax, [ebp - 8]
mov byte [0x565b49], 0x32
push eax
push dword [ebp - 8]
push 1
push 0x565b49
call esi
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push 0x40
push 1
push 0x472c84
call esi
test eax, eax
je 0x10002ea9
lea eax, [ebp - 8]
mov byte [0x472c84], 0x32
push eax
push dword [ebp - 8]
push 1
push 0x472c84
call esi
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push 0x40
push 1
push 0x4ad834
call esi
test eax, eax
je 0x10002eda
lea eax, [ebp - 8]
mov byte [0x4ad834], 0xeb
push eax
push dword [ebp - 8]
push 1
push 0x4ad834
call esi
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.10007863
mov esp, ebp
pop ebp
ret
Function at 0x10002f30
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push esi
push edi
cmp eax, 1
jne 0x1000315c
push str.ws2_32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push str.recv
push str.ws2_32.dll
call edi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call esi
push str.send
push str.ws2_32.dll
mov dword [0x1000dcd8], eax
call edi
push eax
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 0
push 6
push 0x1000dce0
push dword [0x1000dcd8]
mov dword [0x1000dcdc], eax
call edi
mov esi, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
push eax
call esi
push 0
push 6
push 0x1000dcd0
push dword [0x1000dcdc]
call edi
push eax
call esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateThread]
push 0
push 0
push 0
push 0x10001240
push 0
push 0
call esi
push 0
push 0
push 0
push 0x10003640
push 0
push 0
call esi
push 0
push 0
push 0
push 0x10001540
push 0
push 0
call esi
call fcn.100016a0
push 0
push 0
push 0
push 0x10001770
push 0
push 0
call esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DisableThreadLibraryCalls]
push str.shell32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmp dword [ebp + 0x10], 0
mov byte [0x1000d6d9], 0
jne 0x10003154
mov eax, dword fs:[0x2c]
mov ecx, dword [0x1000d6a0]
mov esi, dword [eax + ecx*4]
mov eax, dword [0x1000e258]
cmp eax, dword [esi + 4]
jle 0x1000307b
push 0x1000e258
call fcn.100079e1
add esp, 4
cmp dword [0x1000e258], 0xffffffff
jne 0x1000307b
push 0x10008ae0
mov dword [0x1000e25c], 0x10009890
call fcn.10007dbc
push 0x1000e258
call fcn.10007997
add esp, 8
mov eax, dword [0x1000e248]
cmp eax, dword [esi + 4]
jle 0x100030bf
push 0x1000e248
call fcn.100079e1
add esp, 4
cmp dword [0x1000e248], 0xffffffff
jne 0x100030bf
push 0x10008ac0
mov dword [0x1000e24c], 0x10009810
call fcn.10007dbc
push 0x1000e248
call fcn.10007997
add esp, 8
call fcn.10002c90
mov edi, dword [sym.imp.USER32.dll_MessageBoxA]
test al, al
je 0x10003144
mov eax, dword [0x1000e254]
cmp eax, dword [esi + 4]
jle 0x10003112
push 0x1000e254
call fcn.100079e1
add esp, 4
cmp dword [0x1000e254], 0xffffffff
jne 0x10003112
push 0x10008ab0
mov dword [0x1000e250], 0x10009820
call fcn.10007dbc
push 0x1000e254
call fcn.10007997
add esp, 8
call fcn.10003aa0
test al, al
je 0x10003144
call fcn.10003230
test al, al
jne 0x10003131
call fcn.100032e0
test al, al
je 0x100031c1
push 0x200030
push str.Info
push str.Detectado_Maquina_Virtual
push 0
call edi
push 0
push str.Erro:_ClientPatch.dll
push 0x10009858
push 0
call edi
pop edi
xor eax, eax
pop esi
pop ebp
ret 0xc
test eax, eax
jne 0x10003154
cmp dword [ebp + 0x10], eax
je 0x10003154
mov eax, dword fs:[0x2c]
mov ecx, dword [0x1000d6a0]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x1000e258]
cmp eax, dword [ecx + 4]
jle 0x100031b8
push 0x1000e258
call fcn.100079e1
add esp, 4
cmp dword [0x1000e258], 0xffffffff
jne 0x100031b8
push 0x10008ae0
mov dword [0x1000e25c], 0x10009890
call fcn.10007dbc
push 0x1000e258
call fcn.10007997
add esp, 8
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
mov eax, 1
pop esi
pop ebp
ret 0xc
Function at 0x10003510
Capabilities:
Allocate or change rwx memory
Check for time delay via gettickcount
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x1000d00c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
push edi
mov edi, ecx
call esi
sub eax, 0xbb8
cmp eax, 0xbb8
jge 0x100035a3
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 8]
push eax
push 0x40
push 4
push 0x49099a
mov dword [ebp - 0x30], str.Ativado
mov dword [ebp - 8], 0x40
call esi
mov dword [0x49099b], 0xff00ff00
mov eax, dword [0x684bb0]
mov dword [ebp - 0x34], eax
push dword [ebp - 0x30]
mov ecx, dword [ebp - 0x34]
call dword [0x1000d024]
lea eax, [ebp - 8]
mov dword [0x49099b], 0xffffaaaa
push eax
push dword [ebp - 8]
push 4
push 0x49099a
call esi
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10007863
mov esp, ebp
pop ebp
ret
call esi
mov eax, 0x373
mov dword [ebp - 0x2c], 0x24
mov dword [ebp - 0x24], 0
mov dword [ebp - 0xc], 0
mov word [ebp - 0x28], ax
mov ecx, dword ds:[0x13c1aac]
add ecx, 0xdfc
xor eax, eax
mov ax, word ds:[ecx]
mov word [ebp - 0x26], ax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x1c], edi
mov eax, dword [0x684bb0]
push 0x24
mov eax, dword [eax + 0x4c]
cvttss2si eax, dword [eax + 0x28]
mov word [ebp - 0x10], ax
mov eax, dword [0x684bb0]
mov eax, dword [eax + 0x4c]
cvttss2si eax, dword [eax + 0x2c]
mov word [ebp - 0xe], ax
lea eax, [ebp - 0x2c]
push eax
mov eax, 0x569b76
call eax
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
pop edi
pop esi
call fcn.10007863
mov esp, ebp
pop ebp
ret
Function at 0x10007700
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x4c
mov eax, dword [0x1000d00c]
xor eax, esp
mov dword [esp + 0x48], eax
cmp dword [ebp + 0x10], 0
push esi
mov esi, dword [ebp + 8]
jne 0x100077c9
mov eax, 0x20d
cmp word [esi + 4], ax
jne 0x100077c9
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.RPCRT4.dll_UuidCreateSequential]
movzx eax, byte [esp + 0x1f]
xorps xmm0, xmm0
push eax
movzx eax, byte [esp + 0x22]
push eax
movzx eax, byte [esp + 0x25]
push eax
movzx eax, byte [esp + 0x28]
push eax
movzx eax, byte [esp + 0x2b]
push eax
movzx eax, byte [esp + 0x2e]
push eax
lea eax, [esp + 0x38]
movaps xmmword [esp + 0x38], xmm0
push str._02X:_02X:_02X:_02X:_02X:_02X
push eax
mov word [esp + 0x50], 0
call fcn.10002be0
lea ecx, [esp + 0x40]
add esp, 0x20
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10007788
sub ecx, edx
cmp ecx, 0xc
jge 0x1000779e
push 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
lea edx, [esi + 0x54]
xorps xmm0, xmm0
lea eax, [esp + 0x20]
movups xmmword [edx], xmm0
mov ecx, eax
mov word [edx + 0x10], 0
sub edx, ecx
mov cl, byte [eax]
lea eax, [eax + 1]
mov byte [edx + eax - 1], cl
test cl, cl
jne 0x100077b5
mov dword [esi + 0x50], 0x1f40
mov ecx, dword [esp + 0x4c]
pop esi
xor ecx, esp
call fcn.10007863
mov esp, ebp
pop ebp
ret
Function at 0x4035ac
Capabilities:
Generate random numbers using the delphi lcg

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

Function at 0x41cd18
Capabilities:
Decompress data using aplib

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push ebp
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
cld
mov dl, 0x80
mov al, byte [esi]
add esi, 1
mov byte [edi], al
add edi, 1
mov ebx, 2
add dl, dl
jne 0x41cd49
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41cd31
add dl, dl
jne 0x41cd54
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41cda5
xor eax, eax
add dl, dl
jne 0x41cd61
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41ce42
add dl, dl
jne 0x41cd70
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cd7b
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cd86
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cd91
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x41cd9b
mov ebx, edi
sub ebx, eax
mov al, byte [ebx]
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x41cd40
mov eax, 1
add dl, dl
jne 0x41cdb3
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cdbe
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41cdaa
sub eax, ebx
mov ebx, 1
jne 0x41cdf1
mov ecx, 1
add dl, dl
jne 0x41cdd7
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41cde2
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41cdce
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x41cd40
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x41ce08
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41ce13
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41cdff
cmp eax, 0x7d00
sbb ecx, 0xffffffff
cmp eax, 0x500
sbb ecx, 0xffffffff
cmp eax, 0x80
adc ecx, 0
cmp eax, 0x80
adc ecx, 0
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x41cd40
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x41ce63
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x41cd40
pop ebp
sub edi, dword [ebp - 8]
mov dword [ebp - 0xc], edi
pop edi
pop esi
pop ebx
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
Function at 0x41e558
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
mov dword [ebp - 4], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x5086a17
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 8], eax
mov ecx, ebx
mov eax, ebx
xor edx, edx
push edx
push eax
mov eax, dword [ecx + 0x3c]
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
mov edx, dword [eax + 0x78]
test edx, edx
je 0x41e609
add edx, ebx
mov eax, edx
mov esi, dword [eax + 0x18]
mov edx, dword [eax + 0x1c]
add edx, ebx
mov dword [ebp - 0x10], edx
mov edi, dword [eax + 0x20]
add edi, ebx
mov edx, dword [eax + 0x24]
add edx, ebx
mov dword [ebp - 0xc], edx
mov edx, dword [ebp - 4]
cmp edx, 0xffff
jbe 0x41e5f2
test esi, esi
jbe 0x41e609
mov eax, dword [edi]
add eax, ebx
mov edx, dword [ebp - 4]
call fcn.004088e4
test eax, eax
jne 0x41e5e4
mov eax, dword [ebp - 0xc]
movzx eax, word [eax]
shl eax, 2
add eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 8], eax
jmp 0x41e609
add dword [ebp - 0xc], 2
add edi, 4
dec esi
test esi, esi
ja 0x41e5c1
jmp 0x41e609
mov ecx, edx
sub ecx, dword [eax + 0x10]
cmp ecx, dword [eax + 0x14]
jae 0x41e609
mov eax, ecx
shl eax, 2
add eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 8], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5086a1e
ret
Function at 0x41ee60
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 8], ecx
mov word [ebp - 2], dx
xor eax, eax
push ebp
push 0x508740f
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
call fcn.00404cd0
xor ebx, ebx
mov eax, ebx
and eax, 0x80000001
jns 0x41ee9b
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
jne 0x41eeb4
lea eax, [ebp - 0x10]
mov edx, dword [0x50a0268]
mov edx, dword [edx]
mov edx, dword [edx + 0xc]
call fcn.00404d30
jmp 0x41eec7
lea eax, [ebp - 0x10]
mov edx, dword [0x50a0268]
mov edx, dword [edx]
mov edx, dword [edx + 0x10]
call fcn.00404d30
lea eax, [ebp - 0x10]
mov edx, ebx
sar edx, 1
jns 0x41eed3
adc edx, 0
mov edx, dword [edx*4 + 0x509f0e8]
call fcn.00404f20
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov eax, dword [ebp - 0x10]
call fcn.00404f04
push eax
call fcn.00406b1c
mov esi, eax
cmp esi, 0xffffffff
je 0x41efe1
mov eax, 0x40
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0x40
push edi
push esi
call fcn.00406d74
test eax, eax
je 0x41efd4
mov eax, edi
cmp word [eax], 0x5a4d
jne 0x41efd4
push 0
push 0
mov eax, dword [eax + 0x3c]
push eax
push esi
call fcn.00406dd4
mov eax, edi
call fcn.00403288
mov eax, 0x18
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0x18
push edi
push esi
call fcn.00406d74
test eax, eax
je 0x41efd4
mov eax, edi
cmp dword [eax], 0x4550
jne 0x41efd4
add eax, 4
mov dx, word [eax]
cmp dx, 0x14c
jb 0x41efd4
cmp dx, 0x150
ja 0x41efd4
mov eax, edi
call fcn.00403288
mov eax, 0xe0
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0xe0
push edi
push esi
call fcn.00406d74
test eax, eax
je 0x41efd4
mov eax, edi
mov dx, word [eax + 0x44]
cmp dx, word [ebp - 2]
jne 0x41efd4
mov eax, dword [eax + 0x10]
mov edx, dword [ebp - 8]
mov dword [edx], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x10]
call fcn.00404d0c
mov eax, edi
call fcn.00403288
push esi
call fcn.00406ad4
mov eax, dword [ebp + 8]
mov eax, dword [eax]
xor edx, edx
call fcn.0040502c
jne 0x41eff9
inc ebx
cmp ebx, 0x19
jne 0x41ee8d
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5087416
lea eax, [ebp - 0x10]
call fcn.00404cd0
ret
Function at 0x4045a4
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.004068bc
test esi, esi
jne 0x4045dc
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.004069f8
jmp 0x4045fa
call sub.kernel32.dll_GetCommandLineW
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.004044e8
mov edi, eax
test esi, esi
je 0x4045fa
cmp dword [ebx], 0
je 0x4045fa
dec esi
jmp 0x4045e3
add esp, 0x20c
pop edi
pop esi
pop ebx
ret

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

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

Function at 0x405e58
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x4e4054], 0
je 0x405eb9
cmp word [0x4e4330], 0xd7b2
jne 0x405e81
cmp dword [0x4e4338], 0
jbe 0x405e81
mov eax, 0x4e432c
call dword [0x4e4348]
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 0x405ee4
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x4e0030], 0
jne 0x405ed5
push 0
push str.Error
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x406044
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 [0x4e0034], 0
je 0x40606a
mov edx, esi
mov eax, ebx
call dword [0x4e0034]
jmp 0x406079
mov eax, 8
call fcn.00404230
mov dword [eax], ebx
mov dword [eax + 4], esi
mov byte [0x4e4055], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x40600c
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 0x4087e8
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe94
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x164], ecx
mov dword [ebp - 0x168], ecx
mov dword [ebp - 0x16c], ecx
mov dword [ebp - 8], edx
mov esi, eax
xor eax, eax
push ebp
push 0x40894f
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
xor edx, edx
call fcn.004068bc
cmp si, word [0x4e07dc]
jb 0x408882
cmp si, word [0x4e09dc]
ja 0x408882
mov edi, 0x40
xor eax, eax
mov dword [ebp - 0xc], eax
cmp edi, dword [ebp - 0xc]
jb 0x408882
mov ebx, dword [ebp - 0xc]
add ebx, edi
shr ebx, 1
cmp si, word [ebx*8 + 0x4e07dc]
jae 0x40885c
mov edi, ebx
dec edi
jmp 0x40887d
cmp si, word [ebx*8 + 0x4e07dc]
jbe 0x40886c
inc ebx
mov dword [ebp - 0xc], ebx
jmp 0x40887d
mov edx, dword [ebp - 8]
mov eax, dword [ebx*8 + 0x4e07e0]
call fcn.004086f8
jmp 0x408882
cmp edi, dword [ebp - 0xc]
jae 0x408846
mov eax, dword [ebp - 8]
cmp dword [eax], 0
jne 0x408931
push 2
movzx eax, si
push eax
call sub.kernel32.dll_IsValidLocale
test eax, eax
je 0x408931
push 0x55
lea eax, [ebp - 0xb6]
push eax
push 0x59
movzx ebx, si
push ebx
call sub.kernel32.dll_GetLocaleInfoW
push 0x55
lea eax, [ebp - 0x160]
push eax
push 0x5a
push ebx
call sub.kernel32.dll_GetLocaleInfoW
lea eax, [ebp - 0x164]
lea edx, [ebp - 0xb6]
mov ecx, 0x55
call fcn.00406aa4
push dword [ebp - 0x164]
push 0x40896c
lea eax, [ebp - 0x168]
lea edx, [ebp - 0x160]
mov ecx, 0x55
call fcn.00406aa4
push dword [ebp - 0x168]
push 0x40897c
lea eax, [ebp - 0x16c]
lea edx, [ebp - 0xb6]
mov ecx, 0x55
call fcn.00406aa4
push dword [ebp - 0x16c]
mov eax, dword [ebp - 8]
mov edx, 5
call fcn.00406e5c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x408956
lea eax, [ebp - 0x16c]
mov edx, 3
call fcn.004068b4
ret
Function at 0x408b08
Capabilities:
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
push 0
push ebx
push esi
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x408c0d
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x4e6b5c
call sub.kernel32.dll_EnterCriticalSection
cmp bx, word [0x4e6b74]
jne 0x408b54
mov eax, esi
mov edx, 0x4e6b78
mov ecx, 0x55
call fcn.00406aa4
push 0x4e6b5c
call sub.kernel32.dll_LeaveCriticalSection
jmp 0x408bf7
push 0x4e6b5c
call sub.kernel32.dll_LeaveCriticalSection
mov eax, esi
xor edx, edx
call fcn.004068bc
push 2
movzx eax, bx
push eax
call sub.kernel32.dll_IsValidLocale
test eax, eax
je 0x408bc5
cmp byte [0x4e6b58], 0
je 0x408b8a
mov edx, esi
mov eax, ebx
call fcn.004089e8
jmp 0x408bc5
mov edx, esi
mov eax, ebx
call fcn.004087e8
call sub.kernel32.dll_GetSystemDefaultUILanguage
cmp bx, ax
je 0x408bc5
cmp dword [esi], 0
je 0x408bae
mov eax, esi
mov edx, 0x408c28
call fcn.00406cb8
call sub.kernel32.dll_GetSystemDefaultUILanguage
lea edx, [ebp - 4]
call fcn.004087e8
mov edx, dword [ebp - 4]
mov eax, esi
call fcn.00406cb8
push 0x4e6b5c
call sub.kernel32.dll_EnterCriticalSection
mov word [0x4e6b74], bx
push 0xaa
mov eax, dword [esi]
call fcn.00406948
push eax
push 0x4e6b78
call sub.kernel32.dll_lstrcpynW
push 0x4e6b5c
call sub.kernel32.dll_LeaveCriticalSection
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x408c14
lea eax, [ebp - 4]
call fcn.004068ac
ret