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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
mov ebx, dword [esp + 0x78]
mov dword [esp + 0x3c], 0
test ebx, ebx
je 0x47ae10
mov eax, dword [esp + 0x7c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 0x40], eax
lea eax, [esp + 0x40]
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x48]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x74]
mov dword [esp], ebx
mov dword [esp + 4], eax
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 0x474540
call fcn.00479170
mov esi, eax
mov eax, edx
or eax, esi
jne 0x47ae84
add esp, 0x5c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x70]
lea edi, [esp + 0x3c]
mov dword [esp + 4], edi
mov dword [esp], eax
call fcn.0046f9f0
mov esi, eax
mov eax, edx
or eax, esi
jne 0x47af35
mov eax, dword [esp + 0x7c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 0x40], eax
lea eax, [esp + 0x40]
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x48]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 0x44], 0
mov dword [esp + 4], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x48], 0x474540
mov dword [esp], eax
call fcn.00479170
mov esi, eax
mov eax, edx
or eax, esi
je 0x47af03
mov dword [esp + 4], edx
mov dword [esp], esi
mov dword [esp + 0x2c], edx
call fcn.0041d490
mov edi, dword [fcn.004a1b90]
mov dword [esp], 2
mov ebp, eax
call edi
mov dword [esp + 0x10], ebp
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x5496cd
mov dword [esp + 4], str.__s__fat_dir_list_raw_operation_failed:__lu___s_
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call edi
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x5496ca
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call edi
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x47adff
test ebx, ebx
jne 0x47adff
lea edi, [esp + 0x3c]
mov dword [esp], edi
mov dword [esp + 0x2c], edx
call fcn.0046fa90
mov edx, dword [esp + 0x2c]
add esp, 0x5c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], edx
mov dword [esp], esi
mov dword [esp + 0x2c], edx
call fcn.0041d490
mov ebx, dword [fcn.004a1b90]
mov dword [esp], 2
mov ebp, eax
call ebx
mov dword [esp + 0x10], ebp
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x5496cd
mov dword [esp + 4], str.__s__Failed_to_create_stream_for_root_directory:__lu___s_
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call ebx
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x5496ca
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call ebx
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov edx, dword [esp + 0x3c]
test edx, edx
mov edx, dword [esp + 0x2c]
jne 0x47af1b
jmp 0x47adff
Function at 0x486ef0
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
mov edi, edx
push esi
push ebx
mov ebx, eax
sub esp, 0x4c
mov esi, dword [eax + 0x30]
mov dword [esi + 0x80], 0
mov eax, dword [esi + 0xe0]
test eax, eax
je 0x486f43
mov edx, dword [eax + 0x20]
lea ebp, [esi + 0xe0]
test edx, edx
je 0x486f34
add eax, 0x20
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.0041d440
mov eax, dword [esi + 0xe0]
mov dword [esp + 4], ebp
mov dword [esp], eax
call fcn.0041d440
mov esi, dword [ebx + 0x30]
mov ebp, dword [esi + 0x98]
mov esi, dword [esi + 0x9c]
mov eax, esi
or eax, ebp
jne 0x486ff5
mov edx, dword [ebx]
mov ecx, edi
lea eax, [ebx + 8]
call fcn.00486c40
mov ecx, dword [ebx + 0x30]
mov dword [ebx + 0x14], 0
mov edi, dword [ecx + 0xc0]
test edi, edi
je 0x486f9a
add ecx, 0xc0
mov dword [esp + 0x38], eax
mov dword [esp], ecx
mov dword [esp + 0x3c], edx
call fcn.00478020
mov ecx, dword [ebx + 0x30]
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
mov esi, dword [ecx + 0xb4]
test esi, esi
je 0x486fc5
add ecx, 0xb4
mov dword [esp + 0x38], eax
mov dword [esp], ecx
mov dword [esp + 0x3c], edx
call fcn.0046fa90
mov ecx, dword [ebx + 0x30]
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
mov ebx, dword [ecx + 0xb0]
test ebx, ebx
je 0x486fed
add ecx, 0xb0
mov dword [esp + 0x38], eax
mov dword [esp], ecx
mov dword [esp + 0x3c], edx
call fcn.0046fa90
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [fcn.004a1b90]
mov dword [esp], 2
mov dword [esp + 0x38], edx
call edx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], str.fat_inode_cleanup
mov dword [esp + 0x10], 0x2397
mov dword [esp + 0xc], str.inode.c
mov dword [esp + 8], 0x54db10
mov dword [esp + 4], str.__s___s:_d___s__Invalid_non_zero_refcount___I64u__for_main_reference_of_inode__p_that_is_being_cleaned_up_
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov edx, dword [esp + 0x38]
mov dword [esp], 2
call edx
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x54da76
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
mov edx, dword [esp + 0x38]
call edx
mov dword [esp], eax
call sub.msvcrt.dll_fflush
jmp 0x486f59
Function at 0x487090
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
mov ebp, dword [esp + 0x70]
mov ebx, dword [ebp]
mov ecx, dword [ebx + 0x30]
mov edx, dword [ecx + 0x8c]
mov eax, dword [ecx + 0x88]
mov edi, edx
or edi, eax
je 0x4871e3
add eax, 0xffffffff
adc edx, 0xffffffff
mov dword [ecx + 0x88], eax
mov dword [ecx + 0x8c], edx
or edx, eax
jne 0x4871d0
mov edx, dword [ecx + 0x84]
test edx, edx
jne 0x487120
mov eax, dword [ecx]
mov edx, 1
mov dword [esp + 0x4c], eax
mov eax, ebx
call fcn.00486ef0
lea ecx, [esp + 0x4c]
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x38], eax
mov dword [esp], ecx
mov dword [esp + 0x3c], edx
call fcn.0041d440
mov dword [ebp], 0
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebx + 0x20]
mov eax, dword [eax + 0x10]
test eax, eax
jne 0x4870db
mov edx, dword [fcn.004a1b90]
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0xc]
mov dword [esp], 2
mov dword [esp + 0x38], edx
call edx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], edi
mov dword [esp + 0x14], str.fat_inode_release_internal
mov dword [esp + 0x10], 0x23ee
mov dword [esp + 0xc], str.inode.c
mov dword [esp + 8], 0x54db10
mov dword [esp + 4], str.__s___s:_d___s__Cleaning_up_inode__p__unique_ID__I64u__with_dirty_data_
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov edx, dword [esp + 0x38]
mov dword [esp], 2
call edx
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x54da76
call sub.msvcrt.dll_fwrite
mov edx, dword [esp + 0x38]
mov dword [esp], 2
call edx
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov ebx, dword [ebp]
mov ecx, dword [ebx + 0x30]
jmp 0x4870db
mov dword [ebp], 0
add esp, 0x5c
xor eax, eax
xor edx, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov esi, dword [fcn.004a1b90]
mov dword [esp], 2
call esi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], str.fat_inode_release_internal
mov dword [esp + 0x10], 0x23d4
mov dword [esp + 0xc], str.inode.c
mov dword [esp + 8], 0x54db10
mov dword [esp + 4], str.__s___s:_d___s__Attempted_to_decrease_refcount_of_destroyed_inode__p_
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call esi
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x54da76
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call esi
mov dword [esp], eax
call sub.msvcrt.dll_fflush
add esp, 0x5c
mov eax, 6
xor edx, edx
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x487660
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, eax
push edi
push esi
push ebx
sub esp, 0x4c
lea edi, [esp + 0x3c]
mov dword [esp + 4], 0x120
mov dword [esp + 8], edi
mov dword [esp], 0
mov dword [esp + 0x3c], 0
call fcn.00427280
mov ebx, eax
mov eax, edx
mov esi, edx
or eax, ebx
jne 0x4876b0
mov eax, dword [esp + 0x3c]
mov dword [ebp], eax
add esp, 0x4c
mov eax, ebx
mov edx, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], edx
mov dword [esp], ebx
call fcn.0041d490
mov ebp, dword [fcn.004a1b90]
mov dword [esp], 2
mov dword [esp + 0x2c], eax
call ebp
mov edx, dword [esp + 0x2c]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x54da40
mov dword [esp + 0x10], edx
mov dword [esp + 4], str.__s__Failed_to_allocate_memory_for_new_fat_inode_allocation:__lu___s_
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call ebp
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x54da76
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call ebp
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x48769e
mov dword [esp + 4], edi
mov dword [esp], eax
call fcn.0041d440
add esp, 0x4c
mov eax, ebx
mov edx, esi
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x495ff0
Capabilities:
Write file on windows

Disassembly:
push edi
push esi
push ebx
sub esp, 0x40
lea eax, [esp + 0x3c]
mov dword [esp + 4], 0xb66
mov dword [esp + 8], eax
mov dword [esp], 0x550320
mov dword [esp + 0x3c], 0
call fcn.00495b60
mov ebx, eax
mov eax, edx
or eax, ebx
jne 0x496035
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x3c]
mov dword [eax], ecx
add esp, 0x40
mov eax, ebx
pop ebx
pop esi
pop edi
ret
mov dword [esp + 4], edx
mov dword [esp], ebx
mov dword [esp + 0x2c], edx
call fcn.0041d490
mov esi, dword [fcn.004a1b90]
mov dword [esp], 2
mov edi, eax
call esi
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x550140
mov dword [esp + 4], str.__s__Error_while_decompressing_table:__lu___s_
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call esi
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x550185
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call esi
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov edx, dword [esp + 0x2c]
add esp, 0x40
mov eax, ebx
pop ebx
pop esi
pop edi
ret
Function at 0x49fef0
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
sub esp, 0x30
mov esi, dword [0x5553e0]
test esi, esi
jle 0x4a0000
mov edi, dword [0x5553e4]
xor ebx, ebx
lea edx, [edi + 0xc]
nop
mov ecx, dword [edx]
cmp ecx, eax
ja 0x49ff24
mov edi, dword [edx + 4]
add ecx, dword [edi + 8]
cmp eax, ecx
jb 0x49ffa5
add ebx, 1
add edx, 0x14
cmp ebx, esi
jne 0x49ff10
mov dword [esp], eax
mov ebx, eax
call fcn.004a07e0
test eax, eax
mov edi, eax
je 0x4a0027
mov eax, dword [0x5553e4]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call fcn.004a08e0
add eax, dword [edi + 0xc]
mov edx, dword [0x5553e4]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp], eax
mov dword [esp + 4], edx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x4a0007
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x49ff9e
sub eax, 4
and eax, 0xfffffffb
jne 0x49ffb0
add dword [0x5553e0], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
add ebx, dword [0x5553e4]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
mov dword [ebx + 4], eax
mov dword [ebx + 8], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x40
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x49ff9e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.004a1bc8
lea esi, [esi]
xor esi, esi
jmp 0x49ff2e
mov eax, dword [0x5553e4]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.004a1bc8
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call fcn.004a1bc8
mov esi, esi
lea edi, [edi]

Function at 0x4a0460
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x5553f8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x5553f0]
sub esp, 4
test ebx, ebx
je 0x4a04b5
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x4a04ae
test esi, esi
je 0x4a04ae
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x4a0490
mov dword [esp], 0x5553f8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x4a1bc8
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call fcn.004a1b90
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call fcn.004a1b90
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop
nop
nop
nop
nop
nop
nop
nop
jmp fcn.004014f0
Function at 0x40227d
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x4022bc
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4022bc
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4022bc
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x4022bc
cmp dword [ecx + 0x74], 0xe
jbe 0x4022bc
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x401d25
Capabilities:
Get file version info

Disassembly:
push ebp
lea ebp, [esp - 0x1a4]
sub esp, 0x224
mov eax, dword [0x412320]
xor eax, ebp
mov dword [ebp + 0x1a0], eax
mov eax, dword [ebp + 0x1ac]
push ebx
push esi
mov esi, dword [ebp + 0x1b0]
push 0x104
lea ecx, [ebp - 0x68]
push ecx
push 0xffffffffffffffff
push eax
xor ebx, ebx
push ebx
push 0xfde9
mov dword [ebp - 0x6c], 0xfffffffd
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x401e01
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp - 0x68]
push eax
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov dword [ebp - 0x78], eax
cmp eax, ebx
je 0x401e01
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
push ebx
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x70], eax
cmp eax, ebx
je 0x401e00
push eax
push dword [ebp - 0x78]
lea eax, [ebp - 0x68]
push ebx
push eax
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x401df3
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x7c]
push eax
push 0x40e484
push dword [ebp - 0x70]
mov dword [ebp - 0x74], ebx
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x401df3
mov eax, dword [ebp - 0x7c]
movzx ecx, word [eax + 0xa]
mov dword [esi], ecx
movzx ecx, word [eax + 8]
mov dword [esi + 4], ecx
movzx ecx, word [eax + 0xe]
mov dword [esi + 8], ecx
movzx eax, word [eax + 0xc]
mov dword [esi + 0xc], eax
mov dword [ebp - 0x6c], ebx
push dword [ebp - 0x70]
push ebx
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
mov ecx, dword [ebp + 0x1a0]
mov eax, dword [ebp - 0x6c]
pop esi
xor ecx, ebp
pop ebx
call fcn.004024bc
add ebp, 0x1a4
leave
ret

Function at 0x4024bc
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x412320]
jne 0x4024c6
repz ret
jmp fcn.00403ae7
Function at 0x404cec
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00406dfb
and dword [ebp - 4], 0
cmp dword [0x4134c8], 0
mov ebx, eax
jne 0x404d9d
push 0x40e914
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
test edi, edi
je 0x404e4e
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push edi
call esi
test eax, eax
je 0x404e4e
push eax
call fcn.00406d89
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x4134c8], eax
call esi
push eax
call fcn.00406d89
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x4134cc], eax
call esi
push eax
call fcn.00406d89
mov dword [esp], str.GetUserObjectInformationW
push edi
mov dword [0x4134d0], eax
call esi
push eax
call fcn.00406d89
pop ecx
mov dword [0x4134d8], eax
test eax, eax
je 0x404d9d
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00406d89
pop ecx
mov dword [0x4134d4], eax
mov eax, dword [0x4134d4]
cmp eax, ebx
je 0x404df5
cmp dword [0x4134d8], ebx
je 0x404df5
push eax
call fcn.00406e04
push dword [0x4134d8]
mov esi, eax
call fcn.00406e04
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x404df5
test edi, edi
je 0x404df5
call esi
test eax, eax
je 0x404dec
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x404dec
test byte [ebp - 0xc], 1
jne 0x404df5
or dword [ebp + 0x10], 0x200000
jmp 0x404e2e
mov eax, dword [0x4134cc]
cmp eax, ebx
je 0x404e2e
push eax
call fcn.00406e04
pop ecx
test eax, eax
je 0x404e2e
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x404e2e
mov eax, dword [0x4134d0]
cmp eax, ebx
je 0x404e2e
push eax
call fcn.00406e04
pop ecx
test eax, eax
je 0x404e2e
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x4134c8]
call fcn.00406e04
pop ecx
test eax, eax
je 0x404e4e
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x404e50
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402820
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffef8
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.00404188
test esi, esi
jne 0x402856
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.00404278
jmp 0x402874
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.004026d4
mov edi, eax
test esi, esi
je 0x402874
cmp dword [ebx], 0
je 0x402874
dec esi
jmp 0x40285d
add esp, 0x108
pop edi
pop esi
pop ebx
ret

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

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

Function at 0x4036a0
Capabilities:
Query or enumerate registry value

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

Function at 0x40400c
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x429044], 0
je 0x40406d
cmp word [0x429218], 0xd7b2
jne 0x404035
cmp dword [0x429220], 0
jbe 0x404035
mov eax, 0x429214
call dword [0x429230]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x427290
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 0x404094
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x427024], 0
jne 0x404089
push 0
push 0x427288
push 0x427290
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret
Function at 0x405234
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 0x405464
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x4052b7
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x405464
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x4052b7
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x405480
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x405340
xor eax, eax
push ebp
push 0x405339
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 5
lea eax, [ebp - 0x11d]
mov edx, 0x105
call fcn.0040507c
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 0x40531e
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
push 0x4054a0
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x40531e
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 0x405340
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 0x40545a
cmp byte [ebp - 0xd], 0
jne 0x405387
cmp byte [ebp - 0x12], 0
je 0x40545a
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x11d]
add ebx, eax
jmp 0x4053a0
dec ebx
cmp byte [ebx], 0x2e
je 0x4053af
lea eax, [ebp - 0x11d]
cmp ebx, eax
jne 0x40539f
lea eax, [ebp - 0x11d]
cmp ebx, eax
je 0x40545a
inc ebx
cmp byte [ebp - 0x12], 0
je 0x4053ec
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 0x40545a
cmp byte [ebp - 0xd], 0
je 0x40545a
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 0x40545a
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