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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x41e008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x4035f0
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004150d2
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x40362c
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x40362c
lea ecx, [edi - 1]
mov eax, ebx
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
pop edi
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004150d2
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x403703
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x403654
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 0x403660
movsx eax, bl
jmp 0x403698
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 0x4036c2
sub eax, 1
je 0x4036c2
sub eax, 2
jne 0x403703
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
cmove ebx, ecx
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004150d2
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x4036e0
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 0x403703
lea ecx, [ebp - 0x25]
mov byte [esi + 0x3d], 1
or eax, 0xffffffff
cmp dword [ebp - 0x30], ecx
pop edi
pop esi
cmovne eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004150d2
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.004150d2
mov esp, ebp
pop ebp
ret 4
Function at 0x404960
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x41e008]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x404a1c
cmp byte [esi + 0x3d], 0
je 0x404a1c
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x404a0a
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 0x4049d1
sub eax, 1
je 0x4049d5
sub eax, 2
jne 0x404a0a
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004150d2
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x4049f3
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 0x404a0a
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004150d2
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004150d2
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.004150d2
mov esp, ebp
pop ebp
ret
Function at 0x407ad0
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41680c
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x41e008]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x1c], edi
mov eax, dword [ebp + 8]
mov dword [ebp - 4], 0
mov dword [edi], eax
mov dword [edi + 4], 0
mov dword [edi + 8], 0
mov dword [edi + 0xc], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x18], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x20], 0
mov dword [edi + 0x24], 0
mov dword [edi + 0x28], 0
mov dword [edi + 0x2c], 0
lea ebx, [edi + 0x38]
mov dword [edi + 0x30], 0
mov byte [edi + 0x34], 0
mov dword [ebp - 0x14], ebx
mov dword [ebx + 0x24], 0
mov byte [ebp - 4], 4
mov ecx, dword [ebp + 0x34]
test ecx, ecx
je 0x407b84
mov eax, dword [ecx]
push ebx
call dword [eax]
mov dword [ebx + 0x24], eax
mov al, byte [ebp + 0xc]
lea ecx, [edi + 0x68]
mov byte [ebp - 4], 5
push 9
mov byte [edi + 0x60], al
call fcn.00404fa0
mov byte [ebp - 4], 6
xor ebx, ebx
mov ecx, dword [edi + 0x1c]
mov edx, dword [edi + 0x10]
mov byte [ebp - 0xd], 1
mov dword [ebp - 0x18], edx
test ecx, ecx
jns 0x407bcb
mov eax, ecx
neg eax
cmp ebx, eax
jae 0x407bcb
add ecx, ebx
mov eax, ecx
not eax
shr eax, 5
lea eax, [eax*4 + 4]
sub edx, eax
jmp 0x407bd5
add ecx, ebx
mov eax, ecx
shr eax, 5
lea edx, [edx + eax*4]
and ecx, 0x1f
lea eax, [ebp - 0xd]
push ecx
push edx
push eax
push ecx
lea eax, [ebp - 0x18]
push eax
lea ecx, [edi + 0x10]
call fcn.0040a770
mov ecx, dword [ebp + 0x34]
test ecx, ecx
je 0x407c03
mov esi, dword [ecx]
lea eax, [ebp + 0x10]
cmp ecx, eax
setne dl
movzx edx, dl
push edx
call dword [esi + 0x10]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x30
Function at 0x415a46
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x415a85
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x415a85
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x415a85
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x415a85
cmp dword [ecx + 0x74], 0xe
jbe 0x415a85
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x401040
Capabilities:
Hide graphical window

Disassembly:
sub esp, 0x3c
push ebx
push ebp
push esi
mov esi, dword [esp + 0x4c]
push edi
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push 0
push 0x31
push esi
call edi
lea ecx, [esp + 0x10]
push ecx
push 0x3c
push eax
call dword [sym.imp.GDI32.dll_GetObjectA]
mov ebx, dword [sym.imp.GDI32.dll_CreateFontIndirectA]
lea edx, [esp + 0x10]
push edx
call ebx
mov ebp, eax
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x24], 0x258
call ebx
mov ecx, dword [esp + 0x54]
push esi
push 0x1e
push 0x190
push 0xb
push 0x11
push ecx
mov ebx, eax
call fcn.00401000
add esp, 0x18
mov dword [0x407990], eax
push 1
push ebx
push 0x30
push eax
call edi
mov edx, dword [esp + 0x58]
push esi
push 0x14
push 0x190
push 0x21
push 0x1c
push edx
call fcn.00401000
add esp, 0x18
mov dword [0x407994], eax
push 1
push ebp
push 0x30
push eax
call edi
push 0x406
push esi
call dword [sym.imp.USER32.dll_GetDlgItem]
mov edi, eax
test edi, edi
je 0x401111
push 0x407980
push edi
call dword [sym.imp.USER32.dll_GetWindowRect]
mov ebx, dword [sym.imp.USER32.dll_ScreenToClient]
push 0x407980
push esi
call ebx
push 0x407988
push esi
call ebx
push 0
push edi
call dword [sym.imp.USER32.dll_ShowWindow]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x3c
ret

Function at 0x401700
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 4]
push esi
and eax, 0xffff
push 0x64
push eax
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
jne 0x40171d
pop esi
ret
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0xc]
push esi
push 0
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
pop esi
ret

Function at 0x401740
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x210
lea eax, [esp + 4]
push ebx
mov ebx, dword [esp + 0x220]
push esi
mov esi, dword [esp + 0x21c]
push edi
push eax
push esi
mov dword [ebx], 0
call fcn.00401700
mov edi, eax
add esp, 8
test edi, edi
je 0x401835
lea ecx, [esp + 0x118]
push 0x104
push ecx
push esi
push 0x65
call fcn.00401150
add esp, 0x10
test al, al
je 0x40182f
mov edx, dword [esp + 0x224]
lea eax, [esp + 0x14]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea ecx, [esp + 0x14]
push 0x407048
push ecx
call esi
lea edx, [esp + 0x118]
lea eax, [esp + 0x14]
push edx
push eax
call esi
push 0
push 0x80
push 2
push 0
push 0
lea ecx, [esp + 0x28]
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40182f
mov eax, dword [esp + 0x10]
lea edx, [esp + 0xc]
push 0
push edx
push eax
push edi
push esi
mov dword [esp + 0x20], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40182f
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0xc]
cmp ecx, eax
jne 0x40182f
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x210
ret
mov dword [ebx], 1
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x210
ret
Function at 0x401850
Capabilities:
Set registry value

Disassembly:
sub esp, 0x658
lea eax, [esp + 4]
push eax
push 5
push 0
push 0x40707c
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x4018aa
push 6
lea ecx, [esp + 0x5c]
call fcn.00401120
push 2
lea ecx, [esp + 0x15c]
call fcn.00401120
lea ecx, [esp + 0x158]
push 0
lea edx, [esp + 0x5c]
push ecx
push edx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
add esp, 0x658
ret
lea eax, [esp + 8]
push 0x50
push eax
push 2
push 0x67
mov byte [esp + 0x18], 0
call fcn.00401150
mov eax, dword [esp + 0x14]
add esp, 0x10
lea ecx, [esp]
lea edx, [esp + 8]
push ecx
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x40191d
mov ecx, dword [esp + 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 6
lea ecx, [esp + 0x15c]
call fcn.00401120
push 2
lea ecx, [esp + 0x5c]
call fcn.00401120
lea edx, [esp + 0x58]
push 0
lea eax, [esp + 0x15c]
push edx
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
add esp, 0x658
ret
mov edx, dword [esp + 0x65c]
push esi
lea ecx, [esp + 0xc]
push edi
push ecx
push edx
lea eax, [esp + 0x268]
push str._sUninstall.exe__s
push eax
call fcn.00401fc0
lea edi, [esp + 0x20]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
mov edx, dword [esp + 8]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
not ecx
push ecx
lea ecx, [esp + 0x14]
push ecx
push 1
push eax
push str.DisplayName
push edx
call esi
lea edi, [esp + 0x260]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
lea eax, [esp + 0x260]
push ecx
mov ecx, dword [esp + 0xc]
push eax
push 1
push 0
push str.UninstallString
push ecx
call esi
mov edx, dword [esp + 8]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edx
call esi
mov eax, dword [esp + 0xc]
push eax
call esi
pop edi
pop esi
add esp, 0x658
ret
Function at 0x40473c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x407760
cmp edx, dword [eax]
je 0x40475e
add eax, 8
inc ecx
cmp eax, 0x4077f0
jl 0x40474f
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x407760]
jne 0x40488c
mov eax, dword [0x407a10]
cmp eax, 1
je 0x404866
test eax, eax
jne 0x40478f
cmp dword [0x40774c], 1
je 0x404866
cmp edx, 0xfc
je 0x40488c
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4047c6
lea eax, [ebp - 0x1a4]
push 0x406510
push eax
call fcn.00405250
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.004039b0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x404809
lea eax, [ebp - 0x1a4]
push eax
call fcn.004039b0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x40650c
push edi
call fcn.00405340
add esp, 0x10
lea eax, [ebp - 0xa0]
push 0x4064f0
push eax
call fcn.00405250
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00405260
lea eax, [ebp - 0xa0]
push 0x4064ec
push eax
call fcn.00405260
push dword [esi + 0x407764]
lea eax, [ebp - 0xa0]
push eax
call fcn.00405260
push 0x12010
lea eax, [ebp - 0xa0]
push 0x4064c4
push eax
call fcn.004051c5
add esp, 0x2c
pop edi
jmp 0x40488c
lea eax, [ebp + 8]
lea esi, [esi + 0x407764]
push 0
push eax
push dword [esi]
call fcn.004039b0
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 0x401f50
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
mov dword [esp], 0x408044
call sym._EnterCriticalSection_4
mov ebx, dword [0x40803c]
sub esp, 4
test ebx, ebx
je 0x401f9b
nop
mov eax, dword [ebx]
mov dword [esp], eax
call sym._TlsGetValue_4
sub esp, 4
mov esi, eax
call sym._GetLastError_0
test eax, eax
jne 0x401f94
test esi, esi
je 0x401f94
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x401f70
mov dword [esp], 0x408044
call sym._LeaveCriticalSection_4
sub esp, 4
add esp, 0x14
pop ebx
pop esi
ret

Function at 0x402180
Capabilities:
Write file on windows

Disassembly:
push esi
push ebx
sub esp, 0x14
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x17
mov dword [esp + 4], 1
lea esi, [esp + 0x24]
mov dword [esp], str.Mingw_runtime_failure:_n
lea ebx, [eax + 0x40]
mov dword [esp + 0xc], ebx
call sym._fwrite
mov eax, dword [esp + 0x20]
mov dword [esp + 8], esi
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._vfprintf
call sym._abort
lea esi, [esi]

Function at 0x4021d0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
push edi
mov edi, ecx
push esi
push ebx
mov ebx, eax
mov esi, edx
sub esp, 0x4c
lea eax, [esp + 0x24]
mov dword [esp + 8], 0x1c
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._VirtualQuery_12
sub esp, 0xc
test eax, eax
je 0x4022a8
mov eax, dword [esp + 0x38]
cmp eax, 0x40
je 0x40220e
cmp eax, 4
jne 0x402230
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
call sym._memcpy
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x30]
lea ebp, [esp + 0x20]
mov dword [esp + 8], 0x40
mov dword [esp + 0xc], ebp
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sym._VirtualProtect_16
sub esp, 0x10
mov edx, dword [esp + 0x38]
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
mov dword [esp + 0x1c], edx
call sym._memcpy
mov edx, dword [esp + 0x1c]
cmp edx, 0x40
je 0x40221e
cmp edx, 4
je 0x40221e
mov eax, dword [esp + 0x20]
mov dword [esp + 0xc], ebp
mov dword [esp + 8], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sym._VirtualProtect_16
sub esp, 0x10
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x1c
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
call fcn.00402180
Function at 0x402e08
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebx
push esi
add esp, 0xfffffdf0
mov esi, edx
mov ebx, eax
test bl, bl
je 0x402e45
xor eax, eax
mov al, bl
add eax, 0x41
dec eax
mov byte [esp], al
mov byte [esp + 1], 0x3a
mov byte [esp + 2], 0
lea eax, [esp + 0x109]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryA
push esp
call sub.kernel32.dll_SetCurrentDirectoryA
lea eax, [esp + 4]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryA
test bl, bl
je 0x402e65
lea eax, [esp + 0x109]
push eax
call sub.kernel32.dll_SetCurrentDirectoryA
mov eax, esi
lea edx, [esp + 4]
mov ecx, 0x105
call fcn.0040504c
add esp, 0x210
pop esi
pop ebx
ret

Function at 0x4030e0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
xor eax, eax
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x403139
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
call sub.kernel32.dll_GetCommandLineA
lea edx, [ebp - 8]
call fcn.00402f7c
mov dword [ebp - 4], eax
lea edx, [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.00402f7c
mov dword [ebp - 4], eax
cmp dword [ebp - 8], 0
je 0x403123
inc ebx
jmp 0x40310c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x403140
lea eax, [ebp - 8]
call fcn.00404ddc
ret

Function at 0x403148
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
add esp, 0xfffffef4
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.00404ddc
test esi, esi
jne 0x40317f
push 0x105
lea eax, [esp + 8]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
lea edx, [esp + 4]
mov eax, ebx
call fcn.00404ecc
jmp 0x4031a0
call sub.kernel32.dll_GetCommandLineA
mov dword [esp], eax
mov edx, ebx
mov eax, dword [esp]
call fcn.00402f7c
mov dword [esp], eax
test esi, esi
je 0x4031a0
cmp dword [ebx], 0
je 0x4031a0
dec esi
jmp 0x403187
add esp, 0x10c
pop esi
pop ebx
ret

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

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

Function at 0x403df8
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x551024]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x403e90
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x403e70
xor eax, eax
push ebp
push 0x403e69
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 0x403eac
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 0x403e70
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x551024]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x551024], ax
mov esp, ebp
pop ebp
ret
Function at 0x404bd4
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x55904c], 0
je 0x404c35
cmp word [0x559220], 0xd7b2
jne 0x404bfd
cmp dword [0x559228], 0
jbe 0x404bfd
mov eax, 0x55921c
call dword [0x559238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x551074
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 0x404c5c
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x551034], 0
jne 0x404c51
push 0
push 0x55106c
push 0x551074
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x404d90
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
mov ebx, eax
mov eax, 8
call fcn.00402bd0
mov dword [eax], edi
mov edx, dword [ebp + 0x10]
mov dword [eax + 4], edx
mov byte [0x55904d], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x404d58
push eax
push esi
push ebx
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ebp
ret 0xc
Function at 0x407108
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
xor edx, edx
mov dword [ebp - 0x10], edx
xor edx, edx
push ebp
push 0x40716e
push dword fs:[edx]
mov dword fs:[edx], esp
push 7
lea edx, [ebp - 0xb]
push edx
push 0x1004
push eax
call sub.kernel32.dll_GetLocaleInfoA
lea eax, [ebp - 0x10]
lea edx, [ebp - 0xb]
mov ecx, 7
call fcn.0040504c
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 4]
call fcn.00403848
mov ebx, eax
cmp dword [ebp - 4], 0
je 0x407158
xor ebx, ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x407175
lea eax, [ebp - 0x10]
call fcn.00404ddc
ret

Function at 0x40a1bc
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
mov ebx, eax
mov eax, ebx
call fcn.0040529c
push eax
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
je 0x40a1d5
test al, 0x10
jne 0x40a1d9
xor eax, eax
pop ebx
ret
mov al, 1
pop ebx
ret

Function at 0x40a370
Capabilities:
Get file attributes

Disassembly:
push ebx
mov ebx, eax
mov eax, ebx
call fcn.0040529c
push eax
call sub.kernel32.dll_GetFileAttributesA
pop ebx
ret

Function at 0x40a384
Capabilities:
Set file attributes

Disassembly:
push ebx
push esi
push edi
mov edi, edx
mov esi, eax
xor ebx, ebx
push edi
mov eax, esi
call fcn.0040529c
push eax
call sub.kernel32.dll_SetFileAttributesA
test eax, eax
jne 0x40a3a6
call sub.kernel32.dll_GetLastError_1
mov ebx, eax
mov eax, ebx
pop edi
pop esi
pop ebx
ret

Function at 0x40d3a0
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff00
push ebx
push esi
mov esi, ecx
mov ebx, dword [ebp + 8]
push pe_nt_image_headers32
lea ecx, [ebp - 0x100]
push ecx
push edx
push eax
call sub.kernel32.dll_GetLocaleInfoA_1
test eax, eax
jle 0x40d3d9
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.00404ecc
jmp 0x40d3e2
mov eax, ebx
mov edx, esi
call fcn.00404e30
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x40d3ec
Capabilities:
Get geographical location

Disassembly:
push ebx
push esi
push edi
push ecx
mov ebx, ecx
mov esi, edx
mov edi, eax
push 2
lea eax, [esp + 4]
push eax
push esi
push edi
call sub.kernel32.dll_GetLocaleInfoA_1
test eax, eax
jle 0x40d40d
mov al, byte [esp]
jmp 0x40d40f
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret