joyce8/EMBER2024-capa huggingface dataset:
Function at 0x465d68
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebx
push esi
push edi
add esp, 0xffffffec
mov esi, edx
lea edi, [esp + 8]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov ebx, dword [esp + 8]
test ebx, ebx
je 0x465dc4
push esp
push 0x40
push 6
push ebx
call sub.kernel32.dll_VirtualProtect
test eax, eax
jne 0x465d93
call fcn.0040ccc4
mov edx, dword [esp + 8]
lea eax, [esp + 0xc]
mov ecx, 6
call fcn.004028fc
lea eax, [esp + 4]
push eax
mov eax, dword [esp + 4]
push eax
push 6
mov eax, dword [esp + 0x14]
push eax
call sub.kernel32.dll_VirtualProtect
test eax, eax
jne 0x465dc4
call fcn.0040ccc4
add esp, 0x14
pop edi
pop esi
pop ebx
ret

Function at 0x483e58
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff68
push ebx
push esi
push edi
xor ecx, ecx
push ebp
push 0x483f84
push dword fs:[ecx]
mov dword fs:[ecx], esp
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x98], 0x94
lea eax, [ebp - 0x98]
push eax
call sub.kernel32.dll_GetVersionExA
test eax, eax
je 0x483f73
mov eax, dword [ebp - 0x94]
mov edx, dword [ebp - 0x90]
mov ecx, dword [ebp - 0x88]
dec ecx
je 0x483f19
dec ecx
jne 0x483f6a
cmp eax, 4
jg 0x483ec4
mov dword [ebp - 4], 4
jmp 0x483f7a
cmp eax, 5
jne 0x483ed9
test edx, edx
jne 0x483ed9
mov dword [ebp - 4], 5
jmp 0x483f7a
cmp eax, 5
jne 0x483eef
cmp edx, 1
jne 0x483eef
mov dword [ebp - 4], 6
jmp 0x483f7a
cmp eax, 5
jne 0x483f02
cmp edx, 2
jne 0x483f02
mov dword [ebp - 4], 6
jmp 0x483f7a
cmp eax, 6
jl 0x483f10
mov dword [ebp - 4], 7
jmp 0x483f7a
mov dword [ebp - 4], 0xffffffff
jmp 0x483f7a
cmp eax, 4
jne 0x483f29
test edx, edx
jne 0x483f29
xor eax, eax
mov dword [ebp - 4], eax
jmp 0x483f7a
cmp eax, 4
jne 0x483f4e
cmp edx, 0xa
jne 0x483f4e
cmp byte [ebp - 0x83], 0x41
jne 0x483f45
mov dword [ebp - 4], 2
jmp 0x483f7a
mov dword [ebp - 4], 1
jmp 0x483f7a
cmp eax, 4
jne 0x483f61
cmp edx, 0x5a
jne 0x483f61
mov dword [ebp - 4], 3
jmp 0x483f7a
mov dword [ebp - 4], 0xffffffff
jmp 0x483f7a
mov dword [ebp - 4], 0xffffffff
jmp 0x483f7a
mov dword [ebp - 4], 0xffffffff
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x483f8e
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x485b94
Capabilities:
Find taskbar

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov ebx, eax
xor edx, edx
push ebp
push 0x485bdc
push dword fs:[edx]
mov dword fs:[edx], esp
push 0xffffffffffffffff
push ebx
or ecx, 0xffffffff
or edx, 0xffffffff
or eax, 0xffffffff
call fcn.00418ca4
push 0
push 0x485bec
call sub.user32.dll_FindWindowA
test eax, eax
je 0x485bd2
push ebx
push eax
call sub.user32.dll_GetWindowRect
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x485be6
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x40db4a
Capabilities:
Encode data using xor

Disassembly:
sub edx, dword [0x1b053506]
mov esi, 0x4cebf98e
enter 0xffffffffffffebb9, 0x45
pop ebx
xchg esp, eax
xor ah, byte [edi - 0x4d]
adc byte [esp + esi*4 - 0x6f], al
and eax, 0x4a325d7
jb 0x40db4c
push es
xor eax, 0x8ebe1b05
stc
jmp fcn.0040dba1
invalid

Function at 0x4b8e55
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x4c0350
cmp edx, dword [eax]
je 0x4b8e77
add eax, 8
inc ecx
cmp eax, 0x4c03e0
jl 0x4b8e68
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x4c0350]
jne 0x4b8fa5
mov eax, dword [0x4c4cdc]
cmp eax, 1
je 0x4b8f7f
test eax, eax
jne 0x4b8ea8
cmp dword [0x4c0278], 1
je 0x4b8f7f
cmp edx, 0xfc
je 0x4b8fa5
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4b8edf
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.004b9840
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.004b9cd0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x4b8f22
lea eax, [ebp - 0x1a4]
push eax
call fcn.004b9cd0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x4be6ac
push edi
call fcn.004bbba0
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.004b9840
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.004b9850
lea eax, [ebp - 0xa0]
push 0x4be68c
push eax
call fcn.004b9850
push dword [esi + 0x4c0354]
lea eax, [ebp - 0xa0]
push eax
call fcn.004b9850
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.004bbb14
add esp, 0x2c
pop edi
jmp 0x4b8fa5
lea eax, [ebp + 8]
lea esi, [esi + 0x4c0354]
push 0
push eax
push dword [esi]
call fcn.004b9cd0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x401100
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Convert ip address from string
Create tcp socket
Get socket status
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
mov eax, dword [0x41e008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.WS2_32.dll_closesocket]
push esi
push edi
mov edi, ecx
mov dword [ebp - 8], eax
mov esi, dword [edi]
cmp esi, 0xffffffff
je 0x401140
push 2
push esi
mov dword [edi], 0xffffffff
call dword [sym.imp.WS2_32.dll_shutdown]
push esi
call ebx
mov eax, dword [ebp - 8]
lea ecx, [ebp - 8]
mov byte [ebp - 0x119], 0
push ecx
push eax
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
je 0x4011af
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_htons]
mov word [edi + 6], ax
lea esi, [edi + 4]
push 6
mov eax, 2
push 1
mov word [esi], ax
mov eax, dword [ebp - 8]
push 2
mov dword [edi + 8], eax
call dword [sym.imp.WS2_32.dll_socket]
mov dword [edi], eax
cmp eax, 0xffffffff
je 0x4011af
lea ecx, [ebp - 8]
mov dword [ebp - 8], 1
push ecx
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov ecx, dword [edi]
test eax, eax
je 0x4011c8
push ecx
call ebx
mov dword [edi], 0xffffffff
mov al, byte [ebp - 0x119]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004019ff
mov esp, ebp
pop ebp
ret 8
push 0x10
push esi
push ecx
call dword [sym.imp.WS2_32.dll_connect]
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test esi, esi
je 0x401237
cmp eax, 0x2733
jne 0x40125e
mov ecx, dword [edi + 0x14]
mov eax, 0x10624dd3
mov esi, dword [edi]
mul ecx
mov dword [ebp - 0x114], esi
shr edx, 6
imul eax, edx, 0x3e8
mov dword [ebp - 0x118], 1
mov dword [ebp - 0xc], edx
sub ecx, eax
imul eax, ecx, 0x3e8
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
push 0
lea eax, [ebp - 0x118]
push eax
push 0
lea eax, [esi + 1]
push eax
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
js 0x40125e
je 0x40125e
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push 0x8004667e
push dword [edi]
mov byte [ebp - 0x119], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
je 0x4011af
push dword [edi]
call ebx
mov ecx, dword [ebp - 4]
xor al, al
mov dword [edi], 0xffffffff
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.004019ff
mov esp, ebp
pop ebp
ret 8
Function at 0x4014d0
Capabilities:
Download and write a file
Receive and write data from server to client
Receive data
Receive data on socket
Send data
Send data on socket
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push ecx
push ebx
push esi
push edi
xor bl, bl
mov eax, 0x41f8f0
cmp dword [0x41f904], 0x10
mov ecx, 0x41e8c0
push 0x270e
cmovae eax, dword [0x41f8f0]
push eax
call fcn.00401100
test al, al
jne 0x401514
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.CGL:_Error__failed_to_open_read_socket___d__n
jmp 0x40169f
cmp dword [0x41f904], 0x10
mov eax, 0x41f8f0
push 0x270f
cmovae eax, dword [0x41f8f0]
mov ecx, 0x41e8d8
push eax
call fcn.00401100
test al, al
jne 0x40154c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.CGL:_Error__failed_to_open_write_socket___d__n
jmp 0x40169f
cmp dword [0x41f91c], 0x10
mov esi, 0x41f908
mov eax, dword [0x41f920]
cmovae esi, dword [0x41f908]
test eax, eax
je 0x40157b
push eax
mov dword [0x41f920], 0
call fcn.004051cb
add esp, 4
push 0x41b998
push esi
call fcn.00404ff1
add esp, 8
mov dword [0x41f920], eax
test eax, eax
jne 0x4015b0
cmp dword [0x41f91c], 0x10
mov eax, 0x41f908
cmovae eax, dword [0x41f908]
push eax
push str.CGL:_Error__failed_to_open_output_file__s_n
jmp 0x40169f
mov eax, dword [0x41e8d8]
cmp eax, 0xffffffff
je 0x401693
push 0
push 0x438
push 0x41ba90
push eax
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
je 0x401693
mov edi, dword [sym.imp.WS2_32.dll_recv]
mov bl, 1
mov eax, dword [0x41e8c0]
cmp eax, 0xffffffff
je 0x4015fe
push 0
push 0x1000
push 0x41e8f0
push eax
call edi
mov esi, eax
jmp 0x401600
xor esi, esi
cmp byte [0x41f924], 0
jne 0x4016b2
test esi, esi
js 0x401685
je 0x40165f
mov eax, dword [0x41f920]
test eax, eax
je 0x401631
push eax
push 1
push esi
push 0x41e8f0
call fcn.004068b1
add esp, 0x10
test eax, eax
jne 0x4015e1
call fcn.0040698f
push esi
push dword [eax]
push str.CGL:_Error__file_error___d__when_writing__d_bytes_n
push 1
call fcn.004050d0
add esp, 4
push eax
call fcn.004010d0
add esp, 0x10
call fcn.00401280
mov al, bl
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.CGL:_Rx_socket_closed_n
push 1
call fcn.004050d0
add esp, 4
push eax
call fcn.004010d0
add esp, 8
call fcn.00401280
mov al, bl
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.CGL:_Error__socket_read_failed___d__n
jmp 0x40169f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.CGL:_Error__failed_to_write_log_initialisation_data___d__n
push 2
call fcn.004050d0
add esp, 4
push eax
call fcn.004010d0
add esp, 0xc
call fcn.00401280
pop edi
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x514060
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0xbd000]
push edi
jmp 0x51407a
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x514081
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x514070
mov eax, 1
add ebx, ebx
jne 0x514093
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x5140a4
jne 0x5140c3
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x5140c3
dec eax
add ebx, ebx
jne 0x5140b0
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x514088
add ebx, ebx
jne 0x5140bf
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0x514115
xor ecx, ecx
sub eax, 3
jb 0x5140db
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x51414a
sar eax, 1
mov ebp, eax
jmp 0x5140e6
add ebx, ebx
jne 0x5140e6
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x5140b4
inc ecx
add ebx, ebx
jne 0x5140f4
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x5140b4
add ebx, ebx
jne 0x514101
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x5140f6
jne 0x514112
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x5140f6
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x514134
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x514126
jmp 0x514076
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x514134
add edi, ecx
jmp 0x514076
pop esi
mov edi, esi
mov ecx, 0x3ea9
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x514152
cmp byte [edi], 0x11
jne 0x514152
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x514157
lea edi, [esi + 0x10d000]
mov eax, dword [edi]
or eax, eax
je 0x5141cf
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x14efa4]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x14f120]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x514184
mov ecx, edi
jns 0x5141b3
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x14f124]
or eax, eax
je 0x5141c9
mov dword [ebx], eax
add ebx, 4
jmp 0x5141a1
call dword [esi + 0x14f134]
add edi, 4
lea ebx, [esi - 4]
xor eax, eax
mov al, byte [edi]
inc edi
or eax, eax
je 0x514200
cmp al, 0xef
ja 0x5141f3
add ebx, eax
mov eax, dword [ebx]
xchg ah, al
rol eax, 0x10
xchg ah, al
add eax, esi
mov dword [ebx], eax
jmp 0x5141d5
and al, 0xf
shl eax, 0x10
mov ax, word [edi]
add edi, 2
jmp 0x5141e2
mov ebp, dword [esi + 0x14f128]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x22f]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x514234
sub esp, 0xffffff80
jmp 0x42800a
Function at 0x10007ea9
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x1000d2d8]
test eax, eax
je 0x10007ec0
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
pop ecx
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x10007f19
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCR120.dll__vscprintf]
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x10007f18
inc edi
lea eax, [ebp - 4]
push edi
push eax
call fcn.10007b98
mov esi, dword [ebp - 4]
pop ecx
pop ecx
test esi, esi
je 0x10007f18
push dword [ebp + 0xc]
push dword [ebp + 8]
push edi
push esi
call dword [sym.imp.MSVCR120.dll__vsnprintf]
add esp, 0x10
mov byte [esi + edi - 1], 0
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push esi
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
pop ecx
pop edi
push 0x1000a750
push 2
call dword [sym.imp.MSVCR120.dll__dup]
pop ecx
push eax
call dword [sym.imp.MSVCR120.dll__fdopen]
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x10007f4d
push dword [ebp + 0xc]
push dword [ebp + 8]
push esi
call dword [sym.imp.MSVCR120.dll_vfprintf]
push esi
call dword [sym.imp.MSVCR120.dll_fclose]
add esp, 0x10
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x10008123
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x10010
call fcn.10008b40
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x1000c], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
lea eax, [esp + 8]
push ebp
push esi
mov esi, dword [esp + 0x10020]
xor ebp, ebp
push 1
push eax
push ebp
push ebp
push esi
call ebx
test eax, eax
je 0x100081c3
cmp dword [esp + 0x10024], ebp
je 0x10008177
push ebp
push ebp
push ebp
push dword [esp + 0x10030]
push esi
call ebx
test eax, eax
je 0x100081c3
push edi
mov edi, ebp
cmp dword [esp + 0x1002c], edi
jbe 0x100081b5
mov ecx, 0x10000
push ebp
lea eax, [esp + 0x14]
push eax
push ecx
lea eax, [esp + 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100081b5
mov ecx, 0x10000
cmp dword [esp + 0x10], ecx
jne 0x100081b5
add edi, ecx
cmp edi, dword [esp + 0x1002c]
jb 0x10008188
push ebp
push ebp
push dword [esp + 0x20]
push dword [esp + 0x20]
push esi
call ebx
pop edi
mov ecx, dword [esp + 0x10018]
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1000825c
add esp, 0x10010
ret

Function at 0x401219
Capabilities:
Terminate process

Disassembly:
mov eax, dword fs:[0]
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40301c
push 0x40109a
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
push eax
fnstcw word [esp]
or word [esp], 0x300
fldcw word [esp]
add esp, 4
push 0
push 0
push 0x403028
push 0x403024
push 0x403020
call sub.CRTDLL.DLL___GetMainArgs
push dword [0x403028]
push dword [0x403024]
push dword [0x403020]
mov dword [0x403014], esp
call fcn.0040129c
add esp, 0x18
xor ecx, ecx
mov dword [ebp - 4], ecx
push eax
call sub.CRTDLL.DLL_exit
leave
ret
Function at 0x100856f0
Capabilities:
Packed with generic packer

Disassembly:
cmp byte [esp + 8], 1
jne 0x100858b4
pushal
mov esi, section.UPX1
lea edi, [esi - 0x52000]
push edi
or ebp, 0xffffffff
jmp 0x1008571a
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x10085721
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x10085710
mov eax, 1
add ebx, ebx
jne 0x10085733
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x10085728
jne 0x10085744
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x10085728
xor ecx, ecx
sub eax, 3
jb 0x10085758
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x100857ca
mov ebp, eax
add ebx, ebx
jne 0x10085763
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x10085770
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x10085794
inc ecx
add ebx, ebx
jne 0x10085780
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x10085775
jne 0x10085791
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x10085775
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x100857b4
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x100857a5
jmp 0x10085716
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x100857b4
add edi, ecx
jmp 0x10085716
pop esi
mov edi, esi
mov ecx, 0x1abc
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x100857d2
cmp byte [edi], 0xb
jne 0x100857d2
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x100857d7
lea edi, [esi + 0x81000]
mov eax, dword [edi]
or eax, eax
je 0x10085846
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x853c8]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x85434]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x10085804
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x85438]
or eax, eax
je 0x10085840
mov dword [ebx], eax
add ebx, 4
jmp 0x10085821
popal
xor eax, eax
ret 0xc
add edi, 4
lea ebx, [esi - 4]
xor eax, eax
mov al, byte [edi]
inc edi
or eax, eax
je 0x10085877
cmp al, 0xef
ja 0x1008586a
add ebx, eax
mov eax, dword [ebx]
xchg ah, al
rol eax, 0x10
xchg ah, al
add eax, esi
mov dword [ebx], eax
jmp 0x1008584c
and al, 0xf
shl eax, 0x10
mov ax, word [edi]
add edi, 2
jmp 0x10085859
mov ebp, dword [esi + 0x8543c]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x21f]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x100858ab
sub esp, 0xffffff80
jmp 0x10017cdc
Function at 0x403240
Capabilities:
Generate random numbers using the delphi lcg

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

Function at 0x403fec
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x485024]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x404084
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x404064
xor eax, eax
push ebp
push 0x40405d
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x4040a0
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x404064
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
movzx eax, word [0x485024]
and ax, 0xffc0
movzx edx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x485024], ax
mov esp, ebp
pop ebp
ret

Function at 0x404ea0
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x48804c], 0
je 0x404f01
cmp word [0x488220], 0xd7b2
jne 0x404ec9
cmp dword [0x488228], 0
jbe 0x404ec9
mov eax, 0x48821c
call dword [0x488238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
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 0x404f28
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x485030], 0
jne 0x404f1d
push 0
push str.Error
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x405058
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 [0x485038], 0
je 0x40507e
mov edx, esi
mov eax, ebx
call dword [0x485038]
jmp 0x40508d
mov eax, 8
call fcn.00402f28
mov dword [eax], ebx
mov dword [eax + 4], esi
mov byte [0x48804d], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x405020
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 0x406774
Capabilities:
Get geographical location
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffee0
push ebx
push esi
mov dword [ebp - 4], eax
push 0x105
lea eax, [ebp - 0x11d]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov byte [ebp - 0x12], 0
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x4069a4
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x4067f7
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x4069a4
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x4067f7
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x4069c0
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x406880
xor eax, eax
push ebp
push 0x406879
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 5
lea eax, [ebp - 0x11d]
mov edx, 0x105
call fcn.004065b0
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
lea eax, [ebp - 0x11d]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x40685e
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
push 0x4069e0
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x40685e
mov byte [ebp - 0x12], 0
mov byte [ebp - 0xe], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406880
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegCloseKey
ret
push 0x105
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrcpynA
push 5
lea eax, [ebp - 0xd]
push eax
push 3
call sub.kernel32.dll_GetThreadLocale
push eax
call sub.kernel32.dll_GetLocaleInfoA
xor esi, esi
cmp byte [ebp - 0x11d], 0
je 0x40699a
cmp byte [ebp - 0xd], 0
jne 0x4068c7
cmp byte [ebp - 0x12], 0
je 0x40699a
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x11d]
add ebx, eax
jmp 0x4068e0
dec ebx
cmp byte [ebx], 0x2e
je 0x4068ef
lea eax, [ebp - 0x11d]
cmp ebx, eax
jne 0x4068df
lea eax, [ebp - 0x11d]
cmp ebx, eax
je 0x40699a
inc ebx
cmp byte [ebp - 0x12], 0
je 0x40692c
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0x12]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x40699a
cmp byte [ebp - 0xd], 0
je 0x40699a
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x40699a
mov byte [ebp - 0xb], 0
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret