joyce8/EMBER2024-capa huggingface dataset:
Function at 0x631470
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd4
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
lea eax, [ebp - 0x2c]
push eax
call sub.kernel32.dll_GetSystemInfo_1
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 8]
dec ecx
js 0x6314c1
lea eax, [ebp - 0x2c]
cmp word [eax + 0x20], 3
je 0x6314a8
mov eax, dword [edx + ecx*4]
bswap eax
shr eax, 8
mov dword [edx + ecx*4], eax
dec ecx
jns 0x631498
jmp 0x6314c1
push ebx
xor ebx, ebx
mov eax, dword [edx + ecx*4]
mov bh, al
mov bl, ah
shr eax, 0x10
shl ebx, 8
mov bl, al
mov dword [edx + ecx*4], ebx
dec ecx
jns 0x6314a9
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x645998
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff99c
push ebx
xor ecx, ecx
mov dword [ebp - 8], ecx
mov ebx, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00407c14
xor eax, eax
push ebp
push 0x645a81
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x40e]
mov edx, dword [ebp - 4]
call fcn.004234b4
lea edx, [ebp - 8]
xor eax, eax
call fcn.00404aa0
lea eax, [ebp - 0x60e]
mov edx, dword [ebp - 8]
call fcn.004234b4
lea eax, [ebp - 0x654]
xor ecx, ecx
mov edx, 0x44
call fcn.004053d4
mov dword [ebp - 0x654], 0x44
mov dword [ebp - 0x628], 1
mov word [ebp - 0x624], bx
lea eax, [ebp - 0x664]
push eax
lea eax, [ebp - 0x654]
push eax
push 0
push 0
push 0x30
push 0
push 0
push 0
lea eax, [ebp - 0x40e]
push eax
push 0
call sub.kernel32.dll_CreateProcessW
test eax, eax
jne 0x645a48
xor eax, eax
mov dword [ebp - 0xc], eax
jmp 0x645a66
push 0xffffffffffffffff
mov eax, dword [ebp - 0x664]
push eax
call sub.kernel32.dll_WaitForSingleObject
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x664]
push eax
call sub.kernel32.dll_GetExitCodeProcess
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x645a88
lea eax, [ebp - 8]
mov edx, 2
call fcn.00407b90
ret
Function at 0x652ec8
Capabilities:
Query service status

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffdc
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 8], ecx
mov edi, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00407c14
xor eax, eax
push ebp
push 0x653015
push dword fs:[eax]
mov dword fs:[eax], esp
push 4
push 0
push 0
call sub.advapi32.dll_OpenSCManagerW
mov esi, eax
push 4
mov eax, dword [ebp - 4]
call fcn.00408bc4
push eax
push esi
call sub.advapi32.dll_OpenServiceW
mov ebx, eax
test ebx, ebx
jbe 0x652fdd
lea eax, [ebp - 0x24]
push eax
push ebx
call sub.advapi32.dll_QueryServiceStatus
test eax, eax
je 0x652fd5
mov eax, dword [ebp - 0x20]
cmp eax, 6
ja case.0x652f33.0
jmp dword [eax*4 + 0x652f3a]
lea eax, [ebp - 8]
mov edx, 0x653030
call fcn.00407f58
jmp 0x652fd5
lea eax, [ebp - 8]
mov edx, 0x65304c
call fcn.00407f58
jmp 0x652fd5
lea eax, [ebp - 8]
mov edx, 0x653074
call fcn.00407f58
jmp 0x652fd5
lea eax, [ebp - 8]
mov edx, 0x65309c
call fcn.00407f58
jmp 0x652fd5
lea eax, [ebp - 8]
mov edx, 0x6530cc
call fcn.00407f58
jmp 0x652fd5
lea eax, [ebp - 8]
mov edx, 0x6530f4
call fcn.00407f58
jmp 0x652fd5
cmp byte [0x6708a8], 0
je 0x652fc8
lea eax, [ebp - 8]
mov edx, 0x653110
call fcn.00407f58
jmp 0x652fd5
lea eax, [ebp - 8]
mov edx, 0x653124
call fcn.00407f58
push ebx
call sub.advapi32.dll_CloseServiceHandle
jmp 0x652fea
lea eax, [ebp - 8]
mov edx, 0x65313c
call fcn.00407f58
push esi
call sub.advapi32.dll_CloseServiceHandle
mov eax, edi
mov edx, dword [ebp - 8]
call fcn.00407f10
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x65301c
lea eax, [ebp - 8]
mov edx, 2
call fcn.00407b90
ret
Function at 0x10003100
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x178
mov eax, dword [0x10025018]
xor eax, esp
mov dword [esp + 0x174], eax
mov eax, dword [esp + 0x180]
push ebx
push ebp
mov dword [esp + 0xc], eax
push esi
xor eax, eax
xor ebx, ebx
cmp dword [esp + 0x188], eax
push edi
mov esi, ecx
jle 0x100032f0
mov ecx, 0x1e
jmp 0x10003140
movzx edx, byte [esi]
xor eax, eax
inc ebx
inc ecx
inc esi
mov byte [esp + 0x4c], 0
mov dword [esp + 0x4d], eax
mov dword [esp + 0x51], eax
mov dword [esp + 0x55], eax
mov dword [esp + 0x59], eax
mov dword [esp + 0x5d], eax
mov dword [esp + 0x61], eax
mov dword [esp + 0x65], eax
mov dword [esp + 0x69], eax
mov dword [esp + 0x6d], eax
mov dword [esp + 0x71], eax
mov byte [esp + 0x38], al
mov dword [esp + 0x39], eax
mov dword [esp + 0x3d], eax
mov dword [esp + 0x41], eax
mov dword [esp + 0x45], eax
test edx, edx
jne 0x100032e7
cmp ecx, dword [esp + 0x18c]
jg 0x100032e7
mov edx, dword [esi]
mov eax, dword [esi + 4]
add esi, 8
mov dword [esp + 0x18], edx
mov edx, dword [esi]
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 4]
mov dword [esp + 0x20], edx
mov edx, dword [esi + 8]
add ecx, 8
add ebx, 8
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0xc]
mov dword [esp + 0x28], edx
mov edx, dword [esi + 0x10]
add esi, 0x14
add ecx, 0x14
add ebx, 0x14
mov dword [esp + 0x2c], eax
mov al, byte [esi]
inc esi
inc ecx
inc ebx
mov dword [esp + 0x30], edx
mov dl, byte [esi]
inc ecx
inc ebx
inc esi
mov byte [esp + 0x34], al
mov byte [esp + 0x35], dl
mov dword [esp + 0x10], ecx
xor edi, edi
lea ebp, [esp + 0x4c]
jmp 0x10003200
movzx eax, byte [esp + edi + 0x20]
push eax
push str._02X
push 3
push ebp
call dword [sym.imp.MSVCR90.dll__snprintf]
inc edi
add esp, 0x10
add ebp, 2
cmp edi, 0x14
jl 0x10003200
xor edi, edi
lea ebp, [esp + 0x38]
jmp 0x10003230
movzx ecx, byte [esp + edi + 0x18]
push ecx
push str._02X
push 3
push ebp
call dword [sym.imp.MSVCR90.dll__snprintf]
inc edi
add esp, 0x10
add ebp, 2
cmp edi, 8
jl 0x10003230
movzx edx, byte [esp + 0x35]
movzx eax, byte [esp + 0x34]
push edx
push eax
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x58]
push edx
push str._s_s_d_d_n
lea eax, [esp + 0x8c]
push 0x104
push eax
call dword [sym.imp.MSVCR90.dll__snprintf]
mov ecx, dword [esp + 0x30]
push 0x10021efc
push ecx
call dword [sym.imp.MSVCR90.dll_fopen]
mov edi, eax
add esp, 0x24
test edi, edi
je 0x100032d5
push 2
push 0
push edi
call dword [sym.imp.MSVCR90.dll_fseek]
lea eax, [esp + 0x84]
add esp, 0xc
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100032b0
push edi
sub eax, edx
push 1
push eax
lea edx, [esp + 0x84]
push edx
call dword [sym.imp.MSVCR90.dll_fwrite]
push edi
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 0x14
cmp ebx, dword [esp + 0x18c]
jge 0x100032ee
mov ecx, dword [esp + 0x10]
jmp 0x10003140
mov eax, 0x13
jmp 0x100032f0
xor eax, eax
mov ecx, dword [esp + 0x184]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.100fd734
add esp, 0x178
ret 8
Function at 0x401100
Capabilities:
Accept command line arguments

Disassembly:
push esi
xor esi, esi
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call fcn.00415d8b
test eax, eax
jne 0x40118b
push str.Fatal_Error:_MFC_initialization_failed
push 0x423ee8
call fcn.00401480
add esp, 8
mov esi, eax
mov ecx, esi
push 0xa
call fcn.00401220
mov eax, dword [esi]
xor edi, edi
mov ecx, dword [eax + 4]
lea eax, [ecx + esi]
mov cl, byte [ecx + esi + 4]
test cl, 6
jne 0x401162
mov eax, dword [eax + 0x28]
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x2c]
cmp eax, 0xffffffff
jne 0x401162
mov edi, 4
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
test edi, edi
je 0x401183
mov eax, dword [ecx + 4]
mov edx, dword [ecx + 0x28]
or eax, edi
test edx, edx
jne 0x40117b
or al, 4
push 0
push eax
call fcn.0040d930
pop edi
mov eax, 1
pop esi
ret
cmp dword [esp + 0xc], 2
jge 0x4011ff
push str.Fatal_Error:_Link_File_Missing
push 0x423ee8
call fcn.00401480
add esp, 8
mov esi, eax
mov ecx, esi
push 0xa
call fcn.00401220
mov ecx, dword [esi]
xor edi, edi
mov edx, dword [ecx + 4]
mov cl, byte [edx + esi + 4]
test cl, 6
lea eax, [edx + esi]
jne 0x4011d6
mov eax, dword [eax + 0x28]
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x2c]
cmp eax, 0xffffffff
jne 0x4011d6
mov edi, 4
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
test edi, edi
je 0x4011f7
mov eax, dword [ecx + 4]
mov edx, dword [ecx + 0x28]
or eax, edi
test edx, edx
jne 0x4011ef
or al, 4
push 0
push eax
call fcn.0040d930
pop edi
mov eax, 2
pop esi
ret
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 4]
push eax
call fcn.00401740
add esp, 4
test eax, eax
mov eax, 3
je 0x40121a
mov eax, esi
pop edi
pop esi
ret
Function at 0x401810
Capabilities:
Check if file exists
Get common file path
Get file attributes
Get session user name

Disassembly:
push 0xffffffffffffffff
push 0x417238
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
mov eax, dword [0x41e440]
push esi
mov dword [esp + 4], eax
lea ecx, [esp + 4]
mov dword [esp + 0x1c], 0
push ecx
call fcn.00402360
add esp, 4
test eax, eax
jne 0x401965
push edi
push 0x104
push 0x104
lea ecx, [esp + 0x10]
call fcn.0041093c
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push 0xffffffffffffffff
lea ecx, [esp + 0xc]
call fcn.0041098b
lea edx, [esp + 8]
lea ecx, [esp + 0x10]
push edx
call fcn.00410382
push str.Profiles_
lea ecx, [esp + 0xc]
mov byte [esp + 0x24], 1
call fcn.004108e8
mov eax, dword [esp + 8]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push eax
call edi
cmp eax, 0xffffffff
je 0x401914
mov ecx, dword [0x41e440]
mov dword [esp + 0xc], ecx
lea edx, [esp + 0x14]
lea ecx, [esp + 0xc]
push edx
push 0x104
mov byte [esp + 0x28], 2
mov dword [esp + 0x1c], 0x104
call fcn.0041093c
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
push 0xffffffffffffffff
lea ecx, [esp + 0x10]
mov esi, eax
call fcn.0041098b
test esi, esi
je 0x401906
push str.Profiles_
lea ecx, [esp + 0xc]
call fcn.004108e8
lea eax, [esp + 0xc]
lea ecx, [esp + 8]
push eax
call fcn.00410924
lea ecx, [esp + 0xc]
mov byte [esp + 0x20], 1
call fcn.0041060d
push str.Favorites_
lea ecx, [esp + 0xc]
call fcn.004108e8
mov ecx, dword [esp + 8]
push ecx
call edi
cmp eax, 0xffffffff
pop edi
mov byte [esp + 0x1c], 0
lea ecx, [esp + 0xc]
jne 0x401960
call fcn.0041060d
lea ecx, [esp + 4]
mov dword [esp + 0x1c], 0xffffffff
call fcn.0041060d
xor eax, eax
pop esi
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
add esp, 0x1c
ret
call fcn.0041060d
mov eax, dword [esp + 0x24]
lea edx, [esp + 4]
push edx
push eax
call fcn.004019a0
add esp, 8
lea ecx, [esp + 4]
mov esi, eax
mov dword [esp + 0x1c], 0xffffffff
call fcn.0041060d
mov ecx, dword [esp + 0x14]
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x1c
ret
Function at 0x4019a0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x417280
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push ebp
mov ebp, dword [esp + 0x30]
push esi
push edi
mov esi, dword [ebp + 4]
mov edi, 1
mov ecx, esi
mov eax, dword [esi]
call dword [eax + 4]
test eax, eax
je 0x401a9a
mov ecx, dword [esp + 0x3c]
push ecx
lea ecx, [esp + 0x10]
call fcn.00410382
lea edx, [esi + 8]
lea ecx, [esp + 0xc]
push edx
mov dword [esp + 0x34], 0
call fcn.00410924
push str..url
lea ecx, [esp + 0x10]
call fcn.004108e8
mov eax, dword [0x41e440]
mov dword [esp + 0x10], eax
mov edx, dword [esi]
mov ecx, esi
mov byte [esp + 0x30], 1
call dword [edx + 8]
push eax
lea eax, [esp + 0x14]
push str._InternetShortcut__r_nURL_s_r_n
push eax
call fcn.0040fcdb
add esp, 0xc
lea ecx, [esp + 0x18]
call fcn.004109b3
mov ecx, dword [esp + 0xc]
push 0
push 0x1001
push ecx
lea ecx, [esp + 0x24]
mov byte [esp + 0x3c], 2
call fcn.00410ac5
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 8]
push ecx
push eax
lea ecx, [esp + 0x20]
call fcn.00410c1c
lea ecx, [esp + 0x18]
call fcn.00410ce0
lea ecx, [esp + 0x18]
mov byte [esp + 0x30], 1
call fcn.00410a08
lea ecx, [esp + 0x10]
mov byte [esp + 0x30], 0
call fcn.0041060d
mov dword [esp + 0x30], 0xffffffff
lea ecx, [esp + 0xc]
jmp 0x401b76
mov edx, dword [esp + 0x3c]
lea ecx, [esp + 0x3c]
push edx
call fcn.00410382
add esi, 8
lea ecx, [esp + 0x38]
push esi
mov dword [esp + 0x34], 3
call fcn.00410382
mov eax, dword [esp + 0x38]
mov byte [esp + 0x30], 4
mov ecx, dword [eax - 8]
cmp ecx, 2
jle 0x401b01
mov eax, ecx
lea ecx, [esp + 0x38]
add eax, 0xfffffffe
push eax
lea eax, [esp + 0x18]
push 1
push eax
call fcn.0040f878
push eax
lea ecx, [esp + 0x3c]
mov byte [esp + 0x34], 5
call fcn.004106fa
lea ecx, [esp + 0x14]
mov byte [esp + 0x30], 4
call fcn.0041060d
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x40]
call fcn.00410924
mov edx, dword [esp + 0x3c]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x401b2c
mov eax, dword [esp + 0x3c]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push 0x41e160
lea ecx, [esp + 0x40]
call fcn.004108e8
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x401b5c
test edi, edi
je 0x401b5c
lea ecx, [esp + 0x3c]
push ecx
push esi
call fcn.004019a0
mov esi, dword [esi + 0xc]
add esp, 8
test esi, esi
mov edi, eax
jne 0x401b41
lea ecx, [esp + 0x38]
mov byte [esp + 0x30], 3
call fcn.0041060d
mov dword [esp + 0x30], 0xffffffff
lea ecx, [esp + 0x3c]
call fcn.0041060d
mov ecx, dword [esp + 0x28]
mov eax, edi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x28
ret
Function at 0x4022b0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0xc
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
push ebx
lea eax, [esp + 8]
push edi
push eax
push 0x20019
push 0
push ecx
push edx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x4022f5
pop edi
xor eax, eax
pop ebx
add esp, 0xc
ret
mov edi, dword [esp + 0x20]
mov edx, dword [esp + 0xc]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [esp + 8]
push eax
lea ecx, [esp + 0x14]
push 0
push ecx
push 0
push edi
push edx
call ebx
test eax, eax
je 0x402321
pop edi
xor eax, eax
pop ebx
add esp, 0xc
ret
mov ecx, dword [esp + 8]
lea eax, [esp + 8]
push esi
mov esi, dword [esp + 0x28]
push eax
push ecx
mov ecx, esi
call fcn.0041093c
lea edx, [esp + 0x18]
push eax
mov eax, dword [esp + 0x18]
push edx
push 0
push edi
push eax
call ebx
push 0xffffffffffffffff
mov ecx, esi
mov edi, eax
call fcn.0041098b
xor eax, eax
pop esi
test edi, edi
pop edi
pop ebx
sete al
add esp, 0xc
ret

Function at 0x402360
Capabilities:
Check if file exists
Get file attributes
Persist via run registry key

Disassembly:
sub esp, 0x50
push esi
push edi
mov ecx, 0x10
mov esi, str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
lea edi, [esp + 0x14]
mov eax, dword [str.Favorites]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [0x41e2bc]
mov dx, word [0x41e2c0]
movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x5c]
mov dword [esp + 8], eax
mov dword [esp + 0xc], ecx
lea eax, [esp + 8]
push esi
lea ecx, [esp + 0x18]
push eax
push ecx
push 0x80000001
mov word [esp + 0x20], dx
call fcn.004022b0
add esp, 0x10
test eax, eax
jne 0x4023bb
pop edi
pop esi
add esp, 0x50
ret
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4023d1
pop edi
xor eax, eax
pop esi
add esp, 0x50
ret
push 0x41e160
mov ecx, esi
call fcn.004108e8
pop edi
mov eax, 1
pop esi
add esp, 0x50
ret

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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x417378
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x10], esp
xor ebx, ebx
mov edi, ecx
push esi
mov dword [ebp - 0x14], ebx
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x402589
lea ecx, [ebp - 0x28]
call fcn.004109b3
push ebx
push 0x20
push esi
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 1
call fcn.00410ac5
cmp eax, ebx
je 0x40257e
lea ecx, [ebp - 0x28]
call fcn.00410dbf
mov esi, eax
lea eax, [esi + 1]
push eax
call fcn.004110d0
add esp, 4
lea ecx, [ebp - 0x28]
mov dword [edi + 4], eax
push esi
push eax
call fcn.00410be2
lea ecx, [ebp - 0x28]
call fcn.00410ce0
mov ecx, dword [edi + 4]
mov dword [ebp - 0x14], 1
mov byte [ecx + esi], bl
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], bl
call fcn.00410a08
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x14]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x4070f9
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x41ecc8
cmp edx, dword [eax]
je 0x40711b
add eax, 8
inc ecx
cmp eax, 0x41ed58
jl 0x40710c
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x41ecc8]
jne 0x407249
mov eax, dword [0x423990]
cmp eax, 1
je 0x407223
test eax, eax
jne 0x40714c
cmp dword [0x41e84c], 1
je 0x407223
cmp edx, 0xfc
je 0x407249
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x407183
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.00407760
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00407850
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x4071c6
lea eax, [ebp - 0x1a4]
push eax
call fcn.00407850
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x419744
push edi
call fcn.0040a330
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.00407760
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00407770
lea eax, [ebp - 0xa0]
push 0x419724
push eax
call fcn.00407770
push dword [esi + 0x41eccc]
lea eax, [ebp - 0xa0]
push eax
call fcn.00407770
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.0040a2a5
add esp, 0x2c
pop edi
jmp 0x407249
lea eax, [ebp + 8]
lea esi, [esi + 0x41eccc]
push 0
push eax
push dword [esi]
call fcn.00407850
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 0x402fdc
Capabilities:
Generate random numbers using the delphi lcg

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

Function at 0x4036c4
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x46a024]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x40375c
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x40373c
xor eax, eax
push ebp
push 0x403735
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 0x403778
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 0x40373c
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
movzx eax, word [0x46a024]
and ax, 0xffc0
movzx edx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x46a024], ax
mov esp, ebp
pop ebp
ret

Function at 0x404570
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x4fc04c], 0
je 0x4045d1
cmp word [0x4fc220], 0xd7b2
jne 0x404599
cmp dword [0x4fc228], 0
jbe 0x404599
mov eax, 0x4fc21c
call dword [0x4fc238]
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 0x4045f8
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x46a030], 0
jne 0x4045ed
push 0
push str.Error
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret
Function at 0x405e00
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 0x406030
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x405e83
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x406030
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x405e83
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x40604c
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x405f0c
xor eax, eax
push ebp
push 0x405f05
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 5
lea eax, [ebp - 0x11d]
mov edx, 0x105
call fcn.00405c3c
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 0x405eea
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
push 0x40606c
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x405eea
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 0x405f0c
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 0x406026
cmp byte [ebp - 0xd], 0
jne 0x405f53
cmp byte [ebp - 0x12], 0
je 0x406026
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x11d]
add ebx, eax
jmp 0x405f6c
dec ebx
cmp byte [ebx], 0x2e
je 0x405f7b
lea eax, [ebp - 0x11d]
cmp ebx, eax
jne 0x405f6b
lea eax, [ebp - 0x11d]
cmp ebx, eax
je 0x406026
inc ebx
cmp byte [ebp - 0x12], 0
je 0x405fb8
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 0x406026
cmp byte [ebp - 0xd], 0
je 0x406026
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 0x406026
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