joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402c12
Capabilities:
Check if file exists
Create process on windows
Get file attributes
Query environment variable
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push ebx
mov esi, dword [ebp + 8]
lea edi, [esi + 0x421]
push 0x400
push 0x40563a
push edi
call sub.kernel32.dll_ExpandEnvironmentStringsA
mov edi, 0x40563a
push str._EXPORT_FILE_
call fcn.004017cb
push edi
call fcn.004017cb
push edi
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
jmp 0x402c9d
cmp byte [edi + 1], 0x3a
jne 0x402cc8
cmp byte [edi + 2], 0x5c
jne 0x402cc8
push edi
push 0x4062fc
call sub.kernel32.dll_lstrcpyA
push 0x4062fc
call fcn.0040177a
push 0x4062fc
call fcn.004036c0
test dword [esi + 0xd], 1
je 0x402d0b
push edi
push 0x4062fc
call sub.kernel32.dll_lstrcpyA
push 0x4062fc
call fcn.0040177a
push edi
call fcn.004034a0
push eax
push dword [0x4055d5]
push 0x4062fc
push str.All_Files
push edi
call fcn.00403650
test al, al
je 0x402d8c
mov eax, dword [esi + 5]
lea eax, [eax + esi]
push dword [esi + 1]
push eax
push edi
call fcn.004033e4
or eax, eax
jne 0x402d36
push edi
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
jne 0x402d8c
push str.Failed_to_export_file_
call fcn.004017cb
jmp 0x402d8c
mov eax, dword [esi + 9]
or eax, eax
je 0x402d53
push eax
push edi
call sub.kernel32.dll_SetFileAttributesA
cmp eax, 1
jne 0x402d53
push str.set_file_attributes
call fcn.004017cb
test dword [esi + 0xd], 2
je 0x402d82
push str.executing_file
call fcn.004017cb
lea eax, [esi + 0x21]
cmp byte [eax], 0
jne 0x402d70
xor eax, eax
push 0xa
push 0
push eax
push edi
push str.open
push 0
call sub.shell32.dll_ShellExecuteA
push str.File_export_OK_
call fcn.004017cb
push str....done_
call fcn.004017cb
push 0x4052a0
call fcn.004017cb
pop ebx
pop edi
pop esi
leave
ret 4

Function at 0x402da7
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push esi
push edi
push ebx
cmp byte [0x405635], 1
jne 0x402dd3
push 5
push dword [0x4055f1]
call sub.user32.dll_ShowWindow
push 0
push dword [0x4055f5]
call sub.user32.dll_ShowWindow
push 0
push 0
push 0x184
push dword [0x4055f1]
call sub.user32.dll_SendMessageA
push str.START_PATCHING
call fcn.004017cb
push 0x4052a0
call fcn.004017cb
call fcn.004011a7
xor ebx, ebx
jmp 0x402e38
cmp byte [eax], 3
jne 0x402e13
push eax
call fcn.004028be
jmp 0x402e38
cmp byte [eax], 4
jne 0x402e20
push eax
call fcn.00402a58
jmp 0x402e38
cmp byte [eax], 5
jne 0x402e2d
push eax
call fcn.00402b84
jmp 0x402e38
cmp byte [eax], 0x11
jne 0x402e38
push eax
call fcn.00402c12
inc ebx
push ebx
call fcn.00401098
or eax, eax
jne 0x402e06
push str.PATCHING_DONE
call fcn.004017cb
push 1
push 0
push 0
push dword [0x4055d5]
call sub.user32.dll_RedrawWindow
pop ebx
pop edi
pop esi
leave
ret
Function at 0x402e63
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
push ebx
push ecx
push edx
push esi
push edi
mov esi, dword [ebp + 8]
xor ecx, ecx
jmp 0x402e90
inc ecx
cmp ecx, dword [0x405e42]
jne 0x402e90
push str.No_PE_Signature_found_
call fcn.004017cb
xor eax, eax
pop edi
pop esi
pop edx
pop ecx
pop ebx
leave
ret 0x10
cmp dword [ecx + esi], 0x4550
jne 0x402e72
add esi, ecx
mov eax, dword [ebp + 8]
add eax, dword [0x405e42]
cmp dword [eax - 4], 0x32505564
jne 0x402eb9
push str.Inline_patch_already_applied_
call fcn.004017cb
jmp 0x402e85
push esi
movzx eax, word [esi + 6]
dec eax
imul eax, eax, 0x28
movzx ecx, word [esi + 0x14]
add esi, 0x18
add esi, ecx
mov edi, esi
or dword [edi + 0x24], 0x80000000
add edi, eax
pop esi
cmp dword [ebp + 0xc], 4
jne 0x402ee2
mov ecx, dword [esi + 0x34]
jmp 0x402ee4
xor ecx, ecx
mov dword [0x4031bd], ecx
mov ebx, dword [esi + 0x28]
mov ecx, dword [esi + 0x34]
mov dword [0x4031b5], ebx
add dword [0x4031b5], ecx
mov eax, dword [edi + 0xc]
add eax, dword [edi + 0x10]
mov dword [esi + 0x28], eax
cmp dword [ebp + 0xc], 4
jne 0x402f15
mov eax, dword [edi + 0xc]
mov ebx, dword [edi + 0x10]
add eax, ebx
jmp 0x402f17
xor eax, eax
mov dword [0x4031c1], eax
mov eax, dword [ebp + 8]
add eax, dword [edi + 0x14]
add eax, dword [edi + 0x10]
mov ecx, 0x402fa0
mov ebx, 0x238
mov edx, eax
add edx, ebx
push edx
push ebx
push ecx
push eax
call sub.kernel32.dll_RtlMoveMemory
pop edx
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + 0x16]
lea ecx, [eax + ecx]
mov ebx, dword [0x4055b0]
sub ebx, eax
push ebx
push ecx
push edx
call sub.kernel32.dll_RtlMoveMemory
mov eax, dword [ebp + 0x10]
push 0x100
push eax
call fcn.004034e0
add dword [edi + 8], eax
add dword [edi + 0x10], eax
or dword [edi + 0x24], 0xe0000000
mov eax, dword [edi + 0xc]
add eax, dword [edi + 8]
mov ebx, dword [esi + 0x38]
push ebx
push eax
call fcn.004034e0
mov dword [esi + 0x50], eax
mov eax, dword [ebp + 8]
add eax, dword [0x405e4e]
mov dword [eax - 4], 0x32505564
xor eax, eax
inc eax
pop edi
pop esi
pop edx
pop ecx
pop ebx
leave
ret 0x10

Function at 0x4033e4
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push dword [ebp + 8]
call sub.kernel32.dll_CreateFileA
cmp eax, 0xffffffff
jne 0x40340f
xor eax, eax
leave
ret 0xc
mov dword [ebp - 4], eax
push 0
lea eax, [ebp - 8]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp - 4]
call sub.kernel32.dll_WriteFile
push dword [ebp - 4]
call sub.kernel32.dll_FlushFileBuffers
push dword [ebp - 4]
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 8]
leave
ret 0xc
Function at 0x403500
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
mov dword [ebp - 4], 1
lea eax, [ebp - 8]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call sub.advapi32.dll_RegOpenKeyA
lea eax, [ebp - 0xc]
push eax
push 0
push 0
push 0
push dword [ebp + 0x14]
push dword [ebp - 8]
call sub.advapi32.dll_RegQueryValueExA
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call sub.advapi32.dll_RegCreateKeyExA
or eax, eax
jne 0x403582
mov eax, 4
mov dword [ebp - 4], eax
inc dword [ebp - 0xc]
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 8]
lea eax, [ebp - 4]
push eax
push 0
push dword [ebp + 0x14]
push dword [ebp - 8]
call sub.advapi32.dll_RegQueryValueExA
push eax
push dword [ebp - 8]
call sub.advapi32.dll_RegCloseKey
pop eax
leave
ret 0x10

Function at 0x403600
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe00
pushal
cmp dword [ebp + 8], 0
jne 0x403640
push 0
call sub.kernel32.dll_GetModuleHandleA
lea esi, [ebp - 0x200]
push 0x200
push esi
push eax
call sub.kernel32.dll_GetModuleFileNameA
push esi
call sub.kernel32.dll_lstrlenA
push esi
add esi, eax
jmp 0x403635
dec esi
cmp byte [esi], 0x5c
jne 0x403634
mov byte [esi], 0
pop esi
jmp 0x403643
mov esi, dword [ebp + 8]
push esi
call sub.kernel32.dll_SetCurrentDirectoryA
popal
leave
ret 4

Function at 0x4036c0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffbfc
pushal
mov byte [ebp - 1], 0
mov esi, dword [ebp + 8]
or esi, esi
je 0x40371a
push esi
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
jne 0x40371a
cmp byte [esi], 0
je 0x40371a
lea edi, [ebp - 0x401]
jmp 0x4036ef
lodsb al, byte [esi]
stosb byte es:[edi], al
cmp byte [esi], 0x5c
je 0x4036f9
cmp byte [esi], 0
jne 0x4036ed
cmp al, 0x3a
je 0x4036ed
lodsb al, byte [esi]
stosb byte es:[edi], al
mov byte [edi], 0
push 0
lea eax, [ebp - 0x401]
push eax
call sub.kernel32.dll_CreateDirectoryA
cmp byte [esi - 1], 0
jne 0x4036eb
mov byte [ebp - 1], 1
popal
movzx eax, byte [ebp - 1]
leave
ret 4

Function at 0x403730
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffffc
pushal
mov byte [ebp - 1], 0
mov esi, dword [ebp + 8]
or esi, esi
je 0x40379e
push esi
call sub.kernel32.dll_lstrlenA
or eax, eax
je 0x40379e
mov ebx, eax
push 0
call sub.user32.dll_OpenClipboard
cmp eax, 1
jne 0x40379e
add ebx, 2
push ebx
push 0x2042
call sub.kernel32.dll_GlobalAlloc
or eax, eax
je 0x403799
mov ebx, eax
push ebx
call sub.kernel32.dll_GlobalLock
or eax, eax
je 0x403799
mov edi, eax
push esi
push edi
call sub.kernel32.dll_lstrcpyA
call sub.user32.dll_EmptyClipboard
cmp eax, 1
jne 0x403799
push edi
call sub.kernel32.dll_GlobalUnlock
push ebx
push 1
call sub.user32.dll_SetClipboardData
call sub.user32.dll_CloseClipboard
popal
movzx eax, byte [ebp - 1]
leave
ret 4
Function at 0x525130
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x84000]
push edi
jmp 0x52514a
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x525151
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x525140
mov eax, 1
add ebx, ebx
jne 0x525163
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x525174
jne 0x525193
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x525193
dec eax
add ebx, ebx
jne 0x525180
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x525158
add ebx, ebx
jne 0x52518f
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0x5251e5
xor ecx, ecx
sub eax, 3
jb 0x5251ab
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x52521a
sar eax, 1
mov ebp, eax
jmp 0x5251b6
add ebx, ebx
jne 0x5251b6
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x525184
inc ecx
add ebx, ebx
jne 0x5251c4
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x525184
add ebx, ebx
jne 0x5251d1
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x5251c6
jne 0x5251e2
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x5251c6
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x525204
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x5251f6
jmp 0x525146
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x525204
add edi, ecx
jmp 0x525146
pop esi
mov edi, esi
mov ecx, 0x3ede
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x525222
cmp byte [edi], 0x11
jne 0x525222
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 0x525227
lea edi, [esi + 0x11e000]
mov eax, dword [edi]
or eax, eax
je 0x52529f
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x125eec]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x126068]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x525254
mov ecx, edi
jns 0x525283
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 + 0x12606c]
or eax, eax
je 0x525299
mov dword [ebx], eax
add ebx, 4
jmp 0x525271
call dword [esi + 0x12607c]
add edi, 4
lea ebx, [esi - 4]
xor eax, eax
mov al, byte [edi]
inc edi
or eax, eax
je 0x5252d0
cmp al, 0xef
ja 0x5252c3
add ebx, eax
mov eax, dword [ebx]
xchg ah, al
rol eax, 0x10
xchg ah, al
add eax, esi
mov dword [ebx], eax
jmp 0x5252a5
and al, 0xf
shl eax, 0x10
mov ax, word [edi]
add edi, 2
jmp 0x5252b2
mov ebp, dword [esi + 0x126070]
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 0x525304
sub esp, 0xffffff80
jmp 0x4276e7
Function at 0x4029b8
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 0x4029f5
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 0x402a15
lea eax, [esp + 0x109]
push eax
call sub.kernel32.dll_SetCurrentDirectoryA
mov eax, esi
lea edx, [esp + 4]
mov ecx, 0x105
call fcn.00404a58
add esp, 0x210
pop esi
pop ebx
ret

Function at 0x402bec
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.004047e8
test esi, esi
jne 0x402c22
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.004048d8
jmp 0x402c40
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00402b00
mov edi, eax
test esi, esi
je 0x402c40
cmp dword [ebx], 0
je 0x402c40
dec esi
jmp 0x402c29
add esp, 0x108
pop edi
pop esi
pop ebx
ret

Function at 0x4037a4
Capabilities:
Query or enumerate registry value

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

Function at 0x4045e8
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x49504c], 0
je 0x404649
cmp word [0x495220], 0xd7b2
jne 0x404611
cmp dword [0x495228], 0
jbe 0x404611
mov eax, 0x49521c
call dword [0x495238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x492090
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 0x404670
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x492030], 0
jne 0x404665
push 0
push 0x492088
push 0x492090
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret
Function at 0x40479c
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.004027a4
mov dword [eax], edi
mov edx, dword [ebp + 0x10]
mov dword [eax + 4], edx
mov byte [0x49504d], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x404764
push eax
push esi
push ebx
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ebp
ret 0xc
Function at 0x405fb8
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 0x4061e8
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x40603b
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x4061e8
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x40603b
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x406204
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x4060c4
xor eax, eax
push ebp
push 0x4060bd
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 5
lea eax, [ebp - 0x11d]
mov edx, 0x105
call fcn.00405e00
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 0x4060a2
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
push 0x406224
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x4060a2
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 0x4060c4
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 0x4061de
cmp byte [ebp - 0xd], 0
jne 0x40610b
cmp byte [ebp - 0x12], 0
je 0x4061de
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x11d]
add ebx, eax
jmp 0x406124
dec ebx
cmp byte [ebx], 0x2e
je 0x406133
lea eax, [ebp - 0x11d]
cmp ebx, eax
jne 0x406123
lea eax, [ebp - 0x11d]
cmp ebx, eax
je 0x4061de
inc ebx
cmp byte [ebp - 0x12], 0
je 0x406170
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 0x4061de
cmp byte [ebp - 0xd], 0
je 0x4061de
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 0x4061de
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 0x406900
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 0x406966
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.00404a58
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 4]
call fcn.0040335c
mov ebx, eax
cmp dword [ebp - 4], 0
je 0x406950
xor ebx, ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40696d
lea eax, [ebp - 0x10]
call fcn.004047e8
ret

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

Disassembly:
push ebx
mov ebx, eax
mov eax, ebx
call fcn.00404ca8
push eax
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
je 0x40968d
test al, 0x10
jne 0x409691
xor eax, eax
pop ebx
ret
mov al, 1
pop ebx
ret

Function at 0x409828
Capabilities:
Get file attributes

Disassembly:
push ebx
mov ebx, eax
mov eax, ebx
call fcn.00404ca8
push eax
call sub.kernel32.dll_GetFileAttributesA
pop ebx
ret

Function at 0x40983c
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.00404ca8
push eax
call sub.kernel32.dll_SetFileAttributesA
test eax, eax
jne 0x40985e
call sub.kernel32.dll_GetLastError_1
mov ebx, eax
mov eax, ebx
pop edi
pop esi
pop ebx
ret

Function at 0x40c610
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 0x40c649
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.004048d8
jmp 0x40c652
mov eax, ebx
mov edx, esi
call fcn.0040483c
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x40c65c
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 0x40c67d
mov al, byte [esp]
jmp 0x40c67f
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret
Function at 0x40cd04
Capabilities:
Write file on windows

Disassembly:
add esp, 0xfffffbbc
push 0x400
lea ecx, [esp + 0x48]
call 0x40cb7c
mov eax, dword [0x4947e0]
cmp byte [eax], 0
je 0x40cd80
mov eax, dword [0x494490]
call fcn.00402fc4
call fcn.0040290c
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x48]
push eax
call sub.user32.dll_CharToOemA
push 0
lea eax, [esp + 4]
push eax
lea eax, [esp + 0x4c]
call fcn.00409d7c
push eax
lea eax, [esp + 0x50]
push eax
push 0xfffffffffffffff4
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_WriteFile_1
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x40cdc8
push 0xfffffffffffffff4
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_WriteFile_1
jmp 0x40cdb6
push 0x40
lea eax, [esp + 8]
push eax
mov eax, dword [0x494414]
mov eax, dword [eax + 4]
push eax
mov eax, dword [0x495668]
call fcn.00405dc4
push eax
call sub.user32.dll_LoadStringA_1
push 0x2010
lea eax, [esp + 8]
push eax
lea eax, [esp + 0x4c]
push eax
push 0
call sub.user32.dll_MessageBoxA_1
add esp, 0x444
ret

Function at 0x40d664
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
xor edx, edx
mov dword [ebp - 8], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x40d73a
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 4], 0xffffffff
lea eax, [ebp - 8]
mov edx, ebx
call fcn.00404880
lea eax, [ebp - 8]
call fcn.00404cf8
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
call fcn.00404ca8
push eax
call sub.version.dll_GetFileVersionInfoSizeA
mov ebx, eax
test ebx, ebx
je 0x40d724
mov eax, ebx
call fcn.004027a4
mov dword [ebp - 0x10], eax
xor eax, eax
push ebp
push 0x40d71d
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x10]
push eax
push ebx
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
call fcn.00404ca8
push eax
call sub.version.dll_GetFileVersionInfoA
test eax, eax
je 0x40d707
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x40d74c
mov eax, dword [ebp - 0x10]
push eax
call sub.version.dll_VerQueryValueA
test eax, eax
je 0x40d707
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 8]
mov dword [ebp - 4], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40d724
mov eax, dword [ebp - 0x10]
call fcn.004027c4
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40d741
lea eax, [ebp - 8]
call fcn.004047e8
ret

Function at 0x40de44
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
xor edx, edx
mov dword [ebp - 0xc], edx
xor edx, edx
push ebp
push 0x40dea8
push dword fs:[edx]
mov dword fs:[edx], esp
push 7
lea edx, [ebp - 7]
push edx
push 0x1004
push eax
call sub.kernel32.dll_GetLocaleInfoA_1
lea eax, [ebp - 0xc]
lea edx, [ebp - 7]
mov ecx, 7
call fcn.00404a58
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_GetACP
mov edx, eax
pop eax
call fcn.004091f0
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40deaf
lea eax, [ebp - 0xc]
call fcn.004047e8
ret