joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40b32f
Capabilities:
Copy file
Get common file path
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x500
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CopyFileA]
push edi
push 0
push ebx
push dword [ebp + 8]
call esi
test eax, eax
je 0x40b35e
push dword [ebp + 8]
call fcn.00409e3a
pop ecx
jmp 0x40b4f5
lea eax, [ebp - 0x300]
push ebx
push eax
call fcn.0040b4fa
pop ecx
lea eax, [ebp - 0x300]
pop ecx
push 0
push eax
push dword [ebp + 8]
call esi
test eax, eax
jne 0x40b382
push ebx
jmp 0x40b353
push 1
pop edi
push dword [ebp + 8]
mov dword [0x4136f4], edi
call fcn.00409e3a
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
pop ecx
lea eax, [ebp - 0x300]
push eax
lea eax, [ebp - 0x200]
push eax
call esi
lea eax, [ebp - 0x100]
push ebx
push eax
call esi
xor esi, esi
lea eax, [ebp - 0x200]
push esi
push eax
call fcn.0040a794
lea eax, [ebp - 0x100]
push esi
push eax
call fcn.0040a794
mov eax, dword [0x4136b0]
add esp, 0x10
cmp eax, 2
jne 0x40b400
lea eax, [ebp - 0x200]
push str.WININIT.INI
push eax
lea eax, [ebp - 0x100]
push eax
push str.rename
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
jmp 0x40b4f5
cmp eax, edi
jne 0x40b421
push 4
push esi
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExA]
push ebx
call esi
push 4
lea eax, [ebp - 0x200]
push ebx
push eax
call esi
jmp 0x40b4f5
lea eax, [ebp - 0x100]
push eax
call fcn.0040b53f
push eax
lea eax, [ebp - 0x200]
push eax
lea eax, [ebp - 0x100]
push eax
lea eax, [ebp - 0x500]
push str.del__s_r_nrename__s__s_r_n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
lea eax, [ebp - 0x100]
push 0x100
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x100]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [ebp + eax - 0x101], 0x5c
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
je 0x40b48e
lea eax, [ebp - 0x100]
push 0x4120e0
push eax
call ebx
lea eax, [ebp - 0x100]
push str._MSSETUP.BAT
push eax
call ebx
lea eax, [ebp - 0x100]
push edi
push eax
call dword [sym.imp.KERNEL32.dll__lopen]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40b4c3
lea eax, [ebp - 0x100]
push esi
push eax
call dword [sym.imp.KERNEL32.dll__lcreat]
mov edi, eax
jmp 0x40b4cd
push 2
push esi
push edi
call dword [sym.imp.KERNEL32.dll__llseek]
cmp edi, 0xffffffff
je 0x40b4f5
lea eax, [ebp - 0x500]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [ebp - 0x500]
push eax
push edi
call dword [sym.imp.KERNEL32.dll__lwrite]
push edi
call dword [sym.imp.KERNEL32.dll__lclose]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40b561
Capabilities:
Delete file
Get common file path
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x300
cmp dword [0x4136b0], 2
push esi
push edi
jne 0x40b660
lea eax, [ebp - 0x100]
push 0x100
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [ebp - 0x100]
push eax
call esi
cmp byte [ebp + eax - 0x101], 0x5c
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
je 0x40b5b8
lea eax, [ebp - 0x100]
push 0x4120e0
push eax
call edi
lea eax, [ebp - 0x100]
push str.WININIT.INI
push eax
call edi
lea eax, [ebp - 0x100]
push 1
push eax
call dword [sym.imp.KERNEL32.dll__lopen]
mov edi, eax
cmp edi, 0xffffffff
je 0x40b620
push dword [ebp + 8]
lea eax, [ebp - 0x300]
push str.NUL_s_r_n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 2
push 0
push edi
call dword [sym.imp.KERNEL32.dll__llseek]
lea eax, [ebp - 0x300]
push eax
call esi
push eax
lea eax, [ebp - 0x300]
push eax
push edi
call dword [sym.imp.KERNEL32.dll__lwrite]
push edi
call dword [sym.imp.KERNEL32.dll__lclose]
jmp 0x40b66d
lea eax, [ebp - 0x100]
push 0
push eax
call dword [sym.imp.KERNEL32.dll__lcreat]
mov edi, eax
cmp edi, 0xffffffff
je 0x40b66d
push dword [ebp + 8]
lea eax, [ebp - 0x300]
push str._rename__r_nNUL_s_r_n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x300]
push eax
call esi
push eax
lea eax, [ebp - 0x300]
jmp 0x40b60f
push 4
push 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
pop edi
pop esi
leave
ret

Function at 0x40bbac
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
movzx eax, word [ebp + 8]
push esi
push 2
push eax
xor esi, esi
push dword [0x413a90]
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x40bc41
push edi
push eax
push dword [0x413a90]
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push 0
mov esi, eax
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
lea eax, [ebp + 8]
push eax
push esi
call fcn.0040bc46
pop ecx
pop ecx
mov ecx, dword [ebp + 0xc]
test eax, eax
mov dword [ecx], eax
je 0x40bc14
push 0
push eax
push edi
call dword [sym.imp.GDI32.dll_SelectPalette]
push edi
call dword [sym.imp.GDI32.dll_RealizePalette]
mov eax, dword [esi]
mov ecx, dword [ebp + 8]
push 0
push esi
lea eax, [eax + ecx*4]
add eax, esi
push eax
push 4
push esi
push edi
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
push edi
push 0
mov esi, eax
call dword [sym.imp.USER32.dll_ReleaseDC]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop edi
mov eax, esi
pop esi
leave
ret
Function at 0x40bd4d
Capabilities:
Encode data using xor

Disassembly:
mov ecx, dword [esp + 4]
test ecx, ecx
jne 0x40bd5f
or eax, 0xffffffff
mov dword [0x4136d8], eax
jmp 0x40bd98
mov edx, dword [esp + 8]
mov eax, dword [0x4136d8]
push esi
mov esi, edx
dec edx
test esi, esi
je 0x40bd92
push edi
inc edx
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
mov edi, dword [0x4136e0]
shr eax, 8
mov esi, dword [edi + esi*4]
xor eax, esi
inc ecx
dec edx
jne 0x40bd72
pop edi
mov dword [0x4136d8], eax
pop esi
not eax
ret

Function at 0x40bd9b
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x254
push esi
xor esi, esi
push 0x44
lea eax, [ebp - 0x54]
push esi
push eax
call fcn.0040c050
push dword [ebp + 0xc]
lea eax, [ebp - 0x254]
mov dword [ebp - 0x54], 0x44
push dword [ebp + 8]
push str.__s___s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x1c
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x54]
push eax
push esi
push esi
push esi
push esi
push esi
lea eax, [ebp - 0x254]
push esi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
pop esi
je 0x40be01
push 0xffffffffffffffff
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
leave
ret

Function at 0x40be03
Capabilities:
Create directory

Disassembly:
push esi
push 0x5c
push dword [esp + 0xc]
call fcn.0040be4c
mov esi, eax
pop ecx
test esi, esi
pop ecx
je 0x40be4a
mov al, byte [esi]
test al, al
je 0x40be4a
cmp al, 0x5c
je 0x40be30
push esi
call dword [sym.imp.USER32.dll_CharNextA]
mov esi, eax
mov al, byte [esi]
test al, al
jne 0x40be1d
cmp byte [esi], 0x5c
jne 0x40be17
and byte [esi], 0
push 0
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov byte [esi], 0x5c
inc esi
jmp 0x40be17
pop esi
ret
Function at 0x40ea25
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x413348
cmp edx, dword [eax]
je 0x40ea47
add eax, 8
inc ecx
cmp eax, 0x4133d8
jl 0x40ea38
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x413348]
jne 0x40eb75
mov eax, dword [0x4134e0]
cmp eax, 1
je 0x40eb4f
test eax, eax
jne 0x40ea78
cmp dword [0x413134], 1
je 0x40eb4f
cmp edx, 0xfc
je 0x40eb75
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40eaaf
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.0040cb80
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.0040f2e0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x40eaf2
lea eax, [ebp - 0x1a4]
push eax
call fcn.0040f2e0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x4125cc
push edi
call fcn.0040c180
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.0040cb80
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.0040cb90
lea eax, [ebp - 0xa0]
push 0x410ad4
push eax
call fcn.0040cb90
push dword [esi + 0x41334c]
lea eax, [ebp - 0xa0]
push eax
call fcn.0040cb90
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.0040f695
add esp, 0x2c
pop edi
jmp 0x40eb75
lea eax, [ebp + 8]
lea esi, [esi + 0x41334c]
push 0
push eax
push dword [esi]
call fcn.0040f2e0
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 0x401cc0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
and esp, 0xfffffff0
sub esp, 0x10
mov esi, dword [ebp + 8]
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_strlen]
mov ebx, eax
xor eax, eax
test ebx, ebx
je 0x401d1b
cmp byte [esi + ebx - 1], 0xa
je 0x401cef
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x24]
xchg dword [0x4030f8], eax
mov dword [esp], 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_fwrite]
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret

Function at 0x401de0
Capabilities:
Access peb ldr_data
Get process heap force flags
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
and esp, 0xfffffff0
sub esp, 0x10
mov dword [esp], 1
call sym.__configure_narrow_argv
call sym.__initialize_narrow_environment
call sym.___p___argc
mov esi, dword [eax]
call sym.___p___argv
mov edi, dword [eax]
call sym.__get_initial_narrow_environment
mov ebx, eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 8]
mov edx, dword [eax + 0x3c]
cmp word [eax + edx + 0x5c], 2
sete al
movzx eax, al
inc eax
mov dword [esp], eax
call sym.__set_app_type
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], esi
call sym._main
mov dword [esp], eax
call sym._exit
nop
nop
Function at 0x402db0
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
cmp dword [0x42c880], 0
push esi
push edi
jne 0x402f21
mov eax, dword fs:[0x30]
xor esi, esi
mov eax, dword [eax + 0xc]
mov edx, dword [eax + 0xc]
mov eax, dword [edx + 0x18]
test eax, eax
je 0x402f2c
nop
mov edi, eax
mov eax, dword [edi + 0x3c]
mov eax, dword [eax + edi + 0x78]
test eax, eax
je 0x402e13
mov ecx, dword [eax + edi + 0xc]
lea esi, [eax + edi]
mov eax, dword [ecx + edi]
or eax, 0x20202020
cmp eax, 0x6c64746e
jne 0x402e13
mov eax, dword [ecx + edi + 4]
or eax, 0x20202020
cmp eax, 0x6c642e6c
je 0x402e1c
mov edx, dword [edx]
mov eax, dword [edx + 0x18]
test eax, eax
jne 0x402de0
test esi, esi
je 0x402f2c
mov eax, dword [esi + 0x1c]
mov edx, dword [esi + 0x18]
add eax, edi
mov ecx, dword [esi + 0x20]
mov dword [ebp - 0x10], eax
add ecx, edi
mov eax, dword [esi + 0x24]
xor esi, esi
add eax, edi
mov dword [ebp - 4], edx
lea eax, [eax + edx*2]
add eax, 0xfffffffe
mov dword [ebp - 8], eax
lea eax, [edx - 1]
lea eax, [ecx + eax*4]
mov dword [ebp - 0xc], eax
mov ecx, dword [eax]
mov edx, 0x775a
add ecx, edi
cmp word [ecx], dx
mov edx, dword [ebp - 4]
jne 0x402e91
call fcn.00401df0
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x10]
mov dword [esi*8 + 0x42c884], eax
movzx eax, word [ecx]
mov eax, dword [edx + eax*4]
mov dword [esi*8 + 0x42c888], eax
inc esi
cmp esi, 0x1f4
je 0x402ea8
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0xc]
jmp 0x402e94
mov ecx, dword [ebp - 8]
dec edx
sub eax, 4
sub ecx, 2
mov dword [ebp - 4], edx
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], ecx
test edx, edx
jne 0x402e50
lea eax, [esi - 1]
mov dword [0x42c880], esi
xor edi, edi
test eax, eax
je 0x402f21
mov ecx, esi
xor eax, eax
sub ecx, edi
sub ecx, 1
je 0x402f19
mov edx, dword [eax*8 + 0x42c888]
mov dword [ebp - 0x10], edx
cmp edx, dword [eax*8 + 0x42c890]
jbe 0x402f0f
mov ecx, dword [eax*8 + 0x42c88c]
mov edx, dword [eax*8 + 0x42c884]
mov dword [eax*8 + 0x42c884], ecx
mov ecx, dword [eax*8 + 0x42c890]
mov dword [eax*8 + 0x42c888], ecx
mov ecx, dword [ebp - 0x10]
mov dword [eax*8 + 0x42c88c], edx
mov dword [eax*8 + 0x42c890], ecx
mov esi, dword [0x42c880]
mov ecx, esi
inc eax
sub ecx, edi
dec ecx
cmp eax, ecx
jb 0x402ec2
inc edi
lea eax, [esi - 1]
cmp edi, eax
jb 0x402eb7
pop edi
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x4037a6
Capabilities:
Parse pe header

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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x409754
push ebx
push esi
call fcn.00409680
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.00409614
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x409701
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x409753
push edi
push eax
call fcn.00409f4a
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x409721
call fcn.004081de
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x409752
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.00409614
add esp, 0x20
test eax, eax
jne 0x409740
push edi
call fcn.004081de
jmp 0x409748
push ebx
call fcn.004081de
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x40a650
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x411fe0
push 0x411fd8
push str.FlsAlloc
push 0x1f
call fcn.0040a56c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40a684
push dword [ebp + 8]
mov ecx, esi
call dword [0x41012c]
call esi
jmp 0x40a68a
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x40a6ce
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x411ff0
push 0x411fe8
push str.FlsGetValue
push 0x21
call fcn.0040a56c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40a705
push dword [ebp + 8]
mov ecx, esi
call dword [0x41012c]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x40a70d
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x411ff8
push 0x411ff0
push str.FlsSetValue
push 0x22
call fcn.0040a56c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40a747
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x41012c]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x40f540
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40f56d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40f56d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x4030a0
Capabilities:
Query or enumerate registry value

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

Function at 0x4039e4
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x40a044], 0
je 0x403a45
cmp word [0x40a218], 0xd7b2
jne 0x403a0d
cmp dword [0x40a220], 0
jbe 0x403a0d
mov eax, 0x40a214
call dword [0x40a230]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x409060
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 0x403a6c
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x409020], 0
jne 0x403a61
push 0
push 0x409058
push 0x409060
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret
Function at 0x40439c
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 0x4045cc
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x40441f
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x4045cc
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x40441f
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x4045e8
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x4044a8
xor eax, eax
push ebp
push 0x4044a1
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 5
lea eax, [ebp - 0x11d]
mov edx, 0x105
call fcn.004041e4
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 0x404486
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
push 0x404608
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x404486
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 0x4044a8
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 0x4045c2
cmp byte [ebp - 0xd], 0
jne 0x4044ef
cmp byte [ebp - 0x12], 0
je 0x4045c2
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x11d]
add ebx, eax
jmp 0x404508
dec ebx
cmp byte [ebx], 0x2e
je 0x404517
lea eax, [ebp - 0x11d]
cmp ebx, eax
jne 0x404507
lea eax, [ebp - 0x11d]
cmp ebx, eax
je 0x4045c2
inc ebx
cmp byte [ebp - 0x12], 0
je 0x404554
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 0x4045c2
cmp byte [ebp - 0xd], 0
je 0x4045c2
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 0x4045c2
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
Function at 0x4044a8
Capabilities:
Get geographical location

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 0x4045cc
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x40441f
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x4045cc
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x40441f
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x4045e8
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x4044a8
xor eax, eax
push ebp
push 0x4044a1
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 5
lea eax, [ebp - 0x11d]
mov edx, 0x105
call fcn.004041e4
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 0x404486
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
push 0x404608
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x404486
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 0x4044a8
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 0x4045c2
cmp byte [ebp - 0xd], 0
jne 0x4044ef
cmp byte [ebp - 0x12], 0
je 0x4045c2
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x11d]
add ebx, eax
jmp 0x404508
dec ebx
cmp byte [ebx], 0x2e
je 0x404517
lea eax, [ebp - 0x11d]
cmp ebx, eax
jne 0x404507
lea eax, [ebp - 0x11d]
cmp ebx, eax
je 0x4045c2
inc ebx
cmp byte [ebp - 0x12], 0
je 0x404554
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 0x4045c2
cmp byte [ebp - 0xd], 0
je 0x4045c2
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 0x4045c2
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