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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov edx, dword [ebp + 8]
push ebx
push esi
push edi
xor eax, eax
cmp edx, dword [eax*8 + 0x41a760]
je 0x41111b
inc eax
cmp eax, 0x12
jb 0x41110c
shl eax, 3
cmp edx, dword [eax + 0x41a760]
mov dword [ebp + 8], eax
jne 0x4112b9
mov ecx, dword [0x4252a8]
cmp ecx, 1
je 0x41128e
test ecx, ecx
jne 0x41114d
cmp dword [0x41a5f4], 1
je 0x41128e
cmp edx, 0xfc
je 0x4112b9
and byte [ebp - 8], 0
push 0x104
lea eax, [ebp - 0x10c]
push eax
push 0
call dword [sym.imp.kernel32.dll_GetModuleFileNameA]
test eax, eax
jne 0x411188
push 5
pop ecx
mov esi, str._program_name_unknown_
lea edi, [ebp - 0x10c]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea eax, [ebp - 0x10c]
lea ebx, [ebp - 0x10c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x411197
sub eax, edx
inc eax
cmp eax, 0x3c
jbe 0x4111cf
lea eax, [ebp - 0x10c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4111af
sub eax, edx
push 3
lea ebx, [ebp + eax - 0x147]
push 0x415d28
push ebx
call fcn.0040c240
add esp, 0xc
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4111d4
sub eax, edx
mov ecx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x41a764]
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4111eb
sub eax, esi
lea eax, [eax + ecx + 0x1c]
add eax, 3
and eax, 0xfffffffc
call fcn.0040c340
mov edx, esp
push 6
pop ecx
mov esi, str.Runtime
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov eax, ebx
movsw word es:[edi], word [esi]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x411217
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x411223
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, edx
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x41123c
mov eax, dword [ebp + 8]
mov esi, 0x415d08
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov eax, dword [eax + 0x41a764]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x411257
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x411263
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x12010
mov ecx, eax
and ecx, 3
push str.Microsoft_Visual_C_Runtime_Library
push edx
rep movsb byte es:[edi], byte [esi]
call fcn.004139eb
add esp, 0xc
jmp 0x4112b9
mov ecx, dword [eax + 0x41a764]
mov eax, ecx
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x411299
push 0
lea edx, [ebp - 4]
push edx
sub eax, esi
push eax
push ecx
push 0xfffffffffffffff4
call dword [sym.imp.kernel32.dll_GetStdHandle]
push eax
call dword [sym.imp.kernel32.dll_WriteFile]
lea esp, [ebp - 0x118]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4118eb
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x44
push 0x100
call fcn.0040bb7e
test eax, eax
pop ecx
jne 0x411905
or eax, 0xffffffff
jmp 0x411a92
mov dword [0x4264e0], eax
mov dword [0x4264c4], 0x20
lea ecx, [eax + 0x100]
jmp 0x411936
and byte [eax + 4], 0
or dword [eax], 0xffffffff
mov byte [eax + 5], 0xa
mov ecx, dword [0x4264e0]
add eax, 8
add ecx, 0x100
cmp eax, ecx
jb 0x41191c
push ebx
push esi
push edi
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.kernel32.dll_GetStartupInfoA]
cmp word [esp + 0x3e], 0
je 0x411a1b
mov eax, dword [esp + 0x40]
test eax, eax
je 0x411a1b
mov esi, dword [eax]
push ebp
lea ebp, [eax + 4]
mov eax, 0x800
cmp esi, eax
lea ebx, [esi + ebp]
jl 0x411974
mov esi, eax
cmp dword [0x4264c4], esi
jge 0x4119ce
mov edi, 0x4264e4
push 0x100
call fcn.0040bb7e
test eax, eax
pop ecx
je 0x4119c8
add dword [0x4264c4], 0x20
mov dword [edi], eax
lea ecx, [eax + 0x100]
jmp 0x4119b7
and byte [eax + 4], 0
or dword [eax], 0xffffffff
mov byte [eax + 5], 0xa
mov ecx, dword [edi]
add eax, 8
add ecx, 0x100
cmp eax, ecx
jb 0x4119a1
add edi, 4
cmp dword [0x4264c4], esi
jl 0x411981
jmp 0x4119ce
mov esi, dword [0x4264c4]
xor edi, edi
test esi, esi
jle 0x411a1a
mov eax, dword [ebx]
cmp eax, 0xffffffff
je 0x411a11
mov cl, byte [ebp]
test cl, 1
je 0x411a11
test cl, 8
jne 0x4119f3
push eax
call dword [sym.imp.kernel32.dll_GetFileType]
test eax, eax
je 0x411a11
mov eax, edi
sar eax, 5
mov eax, dword [eax*4 + 0x4264e0]
mov ecx, edi
and ecx, 0x1f
lea eax, [eax + ecx*8]
mov ecx, dword [ebx]
mov dword [eax], ecx
mov cl, byte [ebp]
mov byte [eax + 4], cl
inc edi
inc ebp
add ebx, 4
cmp edi, esi
jl 0x4119d4
pop ebp
xor ebx, ebx
mov eax, dword [0x4264e0]
lea esi, [eax + ebx*8]
cmp dword [esi], 0xffffffff
jne 0x411a77
test ebx, ebx
mov byte [esi + 4], 0x81
jne 0x411a37
push 0xfffffffffffffff6
pop eax
jmp 0x411a41
mov eax, ebx
dec eax
neg eax
sbb eax, eax
add eax, 0xfffffff5
push eax
call dword [sym.imp.kernel32.dll_GetStdHandle]
mov edi, eax
cmp edi, 0xffffffff
je 0x411a66
push edi
call dword [sym.imp.kernel32.dll_GetFileType]
test eax, eax
je 0x411a66
and eax, 0xff
cmp eax, 2
mov dword [esi], edi
jne 0x411a6c
or byte [esi + 4], 0x40
jmp 0x411a7b
cmp eax, 3
jne 0x411a7b
or byte [esi + 4], 8
jmp 0x411a7b
or byte [esi + 4], 0x80
inc ebx
cmp ebx, 3
jl 0x411a1d
push dword [0x4264c4]
call dword [sym.imp.kernel32.dll_LockResource]
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x44
ret
Function at 0x4137bd
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
push edi
push 4
pop eax
call fcn.0040c340
mov ebx, esp
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.kernel32.dll_VirtualQuery]
test eax, eax
je 0x413852
mov edi, dword [ebp - 0x20]
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.kernel32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x44]
lea esi, [eax - 1]
not esi
and esi, ebx
sub esi, eax
mov dword [ebp - 4], eax
mov eax, dword [0x42525c]
mov ecx, eax
dec ecx
neg ecx
sbb ecx, ecx
and ecx, 0xffff1000
add ecx, 0x11000
add ecx, edi
cmp esi, ecx
jb 0x413852
cmp eax, 1
je 0x41386a
mov ebx, edi
mov edi, 0x1000
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.kernel32.dll_VirtualQuery]
test eax, eax
je 0x413852
add ebx, dword [ebp - 0x18]
test dword [ebp - 0x14], edi
je 0x413827
test byte [ebp - 0xf], 1
mov ebx, dword [ebp - 0x24]
je 0x41384e
xor eax, eax
inc eax
jmp 0x413886
cmp esi, ebx
jae 0x413856
xor eax, eax
jmp 0x413886
push 4
push edi
push dword [ebp - 4]
push ebx
call dword [sym.imp.kernel32.dll_VirtualAlloc]
mov eax, dword [0x42525c]
jmp 0x41386c
mov ebx, esi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 8]
push ecx
inc eax
push eax
push dword [ebp - 4]
push ebx
call dword [sym.imp.kernel32.dll_VirtualProtect]
lea esp, [ebp - 0x54]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4139eb
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x425474], ebx
push esi
push edi
jne 0x413a6b
push str.user32.dll
call dword [sym.imp.kernel32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x413aa6
mov esi, dword [sym.imp.kernel32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x425474], eax
je 0x413aa6
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x425478], eax
call esi
cmp dword [0x42525c], 2
mov dword [0x42547c], eax
jne 0x413a6b
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x425484], eax
je 0x413a6b
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x425480], eax
mov eax, dword [0x425480]
test eax, eax
je 0x413ab0
call eax
test eax, eax
je 0x413a97
lea ecx, [ebp - 4]
push ecx
push pe_nt_image_headers32
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x425484]
test eax, eax
je 0x413a97
test byte [ebp - 8], 1
jne 0x413ab0
cmp dword [0x425268], 4
jb 0x413aaa
or byte [ebp + 0x12], 0x20
jmp 0x413acf
xor eax, eax
jmp 0x413adf
or byte [ebp + 0x12], 4
jmp 0x413acf
mov eax, dword [0x425478]
test eax, eax
je 0x413acf
call eax
mov ebx, eax
test ebx, ebx
je 0x413acf
mov eax, dword [0x42547c]
test eax, eax
je 0x413acf
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x425474]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x413bff
Capabilities:
Clear file content

Disassembly:
push ecx
push ebp
push esi
push edi
mov edi, dword [esp + 0x14]
xor esi, esi
cmp edi, dword [0x4264c4]
jae 0x413d5b
mov eax, edi
sar eax, 5
mov eax, dword [eax*4 + 0x4264e0]
mov ecx, edi
and ecx, 0x1f
test byte [eax + ecx*8 + 4], 1
je 0x413d5b
push 1
push esi
push edi
call fcn.00411ae2
or ebp, 0xffffffff
add esp, 0xc
cmp eax, ebp
mov dword [esp + 0xc], eax
je 0x413d57
push 2
push esi
push edi
call fcn.00411ae2
add esp, 0xc
cmp eax, ebp
je 0x413d57
push ebx
mov ebx, dword [esp + 0x1c]
sub ebx, eax
test ebx, ebx
jle 0x413d03
push 0x1000
push 8
call dword [sym.imp.kernel32.dll_GetProcessHeap]
push eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov ebp, eax
test ebp, ebp
jne 0x413c9b
mov dword [0x425250], 0xc
or esi, 0xffffffff
jmp 0x413d43
push 0x8000
push edi
call fcn.0041458d
pop ecx
pop ecx
mov dword [esp + 0x18], eax
mov eax, 0x1000
cmp ebx, eax
jge 0x413cb7
mov eax, ebx
push eax
push ebp
push edi
call fcn.0040fa2c
add esp, 0xc
cmp eax, 0xffffffff
je 0x413ccf
sub ebx, eax
test ebx, ebx
jg 0x413cac
jmp 0x413ce5
cmp dword [0x425254], 5
jne 0x413ce2
mov dword [0x425250], 0xd
or esi, 0xffffffff
push dword [esp + 0x18]
push edi
call fcn.0041458d
pop ecx
pop ecx
push ebp
push 0
call dword [sym.imp.kernel32.dll_GetProcessHeap]
push eax
call dword [sym.imp.kernel32.dll_HeapFree]
jmp 0x413d43
jge 0x413d43
push 0
push dword [esp + 0x20]
push edi
call fcn.00411ae2
push edi
call fcn.00412144
add esp, 0x10
push eax
call dword [sym.imp.kernel32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, ebp
jne 0x413d43
mov dword [0x425250], 0xd
call dword [sym.imp.kernel32.dll_GetLastError]
mov dword [0x425254], eax
push 0
push dword [esp + 0x14]
push edi
call fcn.00411ae2
add esp, 0xc
mov eax, esi
pop ebx
jmp 0x413d68
mov eax, ebp
jmp 0x413d68
mov dword [0x425250], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ecx
ret
Function at 0x532070
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
pushal
pushfd
call 0x532077
pop edx
sub edx, 0x77
push edx
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov esi, dword [eax + 0x1c]
mov ebx, dword [esi + 8]
pop ecx
mov dword [ecx + 0x14], ebx
push ecx
lodsd eax, dword [esi]
mov eax, dword [eax + 8]
mov dword [edx + 0x50], eax
xor ebp, ebp
mov ebx, dword [eax + 0x3c]
add ebx, eax
mov edx, dword [ebx + 0x78]
add edx, eax
pop ebx
mov ecx, dword [edx + 0x20]
add ecx, eax
mov esi, dword [edx + 0x1c]
add esi, eax
mov edi, dword [ecx]
add edi, eax
mov edi, dword [edi + 4]
cmp edi, dword [ebx + 0x20]
je 0x5320c2
add ecx, 4
add ebp, 4
jmp 0x5320ae
add esi, ebp
mov esi, dword [esi]
add esi, eax
mov dword [ebx + 0x28], esi
push ebx
mov eax, ebx
add eax, 0x30
push eax
mov eax, ebx
add eax, 0x50
push dword [eax]
mov eax, ebx
add eax, 0x28
call dword [eax]
pop ebx
mov dword [ebx + 0x24], eax
mov ecx, ebx
push ebx
mov eax, ebx
add eax, 0x2d
push eax
mov dword [eax], 0x6f6d6552
inc eax
inc eax
mov dword [eax], 0x65766f6d
mov eax, ebx
add eax, 0x50
push dword [eax]
mov eax, ebx
add eax, 0x28
call dword [eax]
pop ebx
mov dword [ebx + 0x20], eax
mov ecx, ebx
push ebx
add ecx, 0x54
push ecx
push dword [ebx + 0x50]
call dword [ebx + 0x28]
pop ebx
mov dword [ebx + 0x4c], eax
mov ecx, ebx
add ecx, 0x18a
push ecx
push 1
call dword [ebx + 0x24]
mov dword [ebx + 0x18], eax
push ebx
mov ecx, ebx
add ecx, 0x68
push ecx
push 0x40
push 0x82000
mov eax, dword [ebx + 0x14]
add eax, 0x1000
push eax
call dword [ebx + 0x4c]
pop ebx
mov eax, dword [ebx + 0x24]
mov ecx, dword [eax]
mov edx, ebx
add edx, 0x200
mov dword [edx], ecx
inc eax
inc edx
mov ecx, dword [eax]
mov dword [edx], ecx
dec edx
mov ecx, dword [ebx + 0x24]
sub edx, 5
sub edx, ecx
mov byte [ecx], 0xe9
inc ecx
mov dword [ecx], edx
push ebx
mov ecx, ebx
add ecx, 0x68
push ecx
push 0x40
push dword [ebx + 0x6c]
push dword [ebx + 0x64]
call dword [ebx + 0x4c]
pop ebx
push dword [ebx]
pop eax
popfd
popal
jmp dword [esp - 0x28]
Function at 0x49d2d0
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x62000]
push edi
or ebp, 0xffffffff
jmp 0x49d2f2
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x49d2f9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x49d2e8
mov eax, 1
add ebx, ebx
jne 0x49d30b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x49d31c
jne 0x49d33b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x49d33b
dec eax
add ebx, ebx
jne 0x49d328
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x49d300
add ebx, ebx
jne 0x49d337
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0x49d38d
xor ecx, ecx
sub eax, 3
jb 0x49d353
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x49d3c2
sar eax, 1
mov ebp, eax
jmp 0x49d35e
add ebx, ebx
jne 0x49d35e
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x49d32c
inc ecx
add ebx, ebx
jne 0x49d36c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x49d32c
add ebx, ebx
jne 0x49d379
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x49d36e
jne 0x49d38a
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x49d36e
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x49d3ac
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x49d39e
jmp 0x49d2ee
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x49d3ac
add edi, ecx
jmp 0x49d2ee
pop esi
mov edi, esi
mov ecx, 0x262c
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x49d3ca
cmp byte [edi], 0x13
jne 0x49d3ca
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 0x49d3cf
lea edi, [esi + 0x9a000]
mov eax, dword [edi]
or eax, eax
je 0x49d447
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x9e624]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x9e728]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x49d3fc
mov ecx, edi
jns 0x49d42b
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 + 0x9e72c]
or eax, eax
je 0x49d441
mov dword [ebx], eax
add ebx, 4
jmp 0x49d419
call dword [esi + 0x9e73c]
mov ebp, dword [esi + 0x9e730]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x20f]
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 0x49d47b
sub esp, 0xffffff80
jmp 0x445cf7
Function at 0x409398
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], edx
mov ebx, eax
mov esi, ecx
dec esi
test esi, esi
jl 0x4093f2
inc esi
xor edi, edi
cmp edi, 1
jne 0x4093be
mov eax, dword [ebp + 0xc]
push eax
call sub.kernel32.dll_Sleep
jmp 0x4093cc
cmp edi, 1
jle 0x4093cc
mov eax, dword [ebp + 8]
push eax
call sub.kernel32.dll_Sleep
mov edx, dword [ebp - 4]
mov eax, ebx
call fcn.00408e68
test eax, eax
jne 0x4093f2
call sub.kernel32.dll_GetLastError_1
cmp eax, 2
je 0x4093f2
call sub.kernel32.dll_GetLastError_1
cmp eax, 3
je 0x4093f2
inc edi
dec esi
jne 0x4093ae
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 8

Function at 0x409684
Capabilities:
Identify system language via api

Disassembly:
push ebx
push esi
push edi
push ebp
cmp dword [0x40cca0], 0
je 0x4096cd
mov edi, dword [0x40cde4]
dec edi
test edi, edi
jl 0x4096cd
inc edi
xor esi, esi
mov eax, esi
shl eax, 6
add eax, esi
mov edx, dword [0x40cde0]
mov edx, dword [edx + eax]
mov eax, dword [0x40cca0]
call fcn.00404b2c
test eax, eax
jne 0x4096c9
mov eax, esi
call fcn.00409638
jmp 0x409792
inc esi
dec edi
jne 0x40969f
mov al, byte [0x40cdc8]
sub al, 1
jb 0x4096da
je 0x4096e3
jmp 0x4096ec
call fcn.00406f20
mov ebp, eax
jmp 0x4096ee
call sub.kernel32.dll_GetUserDefaultLangID
mov ebp, eax
jmp 0x4096ee
xor ebp, ebp
test bp, bp
je 0x40978b
mov edi, dword [0x40cde4]
dec edi
test edi, edi
jl 0x40973a
inc edi
xor esi, esi
mov eax, esi
shl eax, 6
add eax, esi
mov edx, dword [0x40cde0]
lea ebx, [edx + eax]
movzx eax, bp
cmp eax, dword [ebx + 0x28]
jne 0x409736
cmp dword [ebx + 0x2c], 0
je 0x40972d
call sub.kernel32.dll_GetACP
cmp eax, dword [ebx + 0x2c]
jne 0x409736
mov eax, esi
call fcn.00409638
jmp 0x409792
inc esi
dec edi
jne 0x409705
mov edi, dword [0x40cde4]
dec edi
test edi, edi
jl 0x40978b
inc edi
xor esi, esi
mov eax, esi
shl eax, 6
add eax, esi
mov edx, dword [0x40cde0]
lea ebx, [edx + eax]
mov eax, dword [ebx + 0x28]
and eax, 0x3ff
mov edx, ebp
and dx, 0x3ff
movzx edx, dx
cmp eax, edx
jne 0x409787
cmp dword [ebx + 0x2c], 0
je 0x40977e
call sub.kernel32.dll_GetACP
cmp eax, dword [ebx + 0x2c]
jne 0x409787
mov eax, esi
call fcn.00409638
jmp 0x409792
inc esi
dec edi
jne 0x409748
xor eax, eax
call fcn.00409638
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x402a24
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.00404648
test esi, esi
jne 0x402a5a
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.00404738
jmp 0x402a78
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00402938
mov edi, eax
test esi, esi
je 0x402a78
cmp dword [ebx], 0
je 0x402a78
dec esi
jmp 0x402a61
add esp, 0x108
pop edi
pop esi
pop ebx
ret

Function at 0x403788
Capabilities:
Query or enumerate registry value

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

Function at 0x4044cc
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x456048], 0
je 0x40452d
cmp word [0x45621c], 0xd7b2
jne 0x4044f5
cmp dword [0x456224], 0
jbe 0x4044f5
mov eax, 0x456218
call dword [0x456234]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x454070
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 0x404554
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x454030], 0
jne 0x404549
push 0
push 0x454068
push 0x454070
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret
Function at 0x4061c8
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 0x40622e
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.004048b8
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 4]
call fcn.004031f0
mov ebx, eax
cmp dword [ebp - 4], 0
je 0x406218
xor ebx, ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406235
lea eax, [ebp - 0x10]
call fcn.00404648
ret

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

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

Function at 0x40c4ec
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 0x100
lea ecx, [ebp - 0x100]
push ecx
push edx
push eax
call sub.kernel32.dll_GetLocaleInfoA_1
test eax, eax
jle 0x40c525
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.00404738
jmp 0x40c52e
mov eax, ebx
mov edx, esi
call fcn.0040469c
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x40c538
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 0x40c559
mov al, byte [esp]
jmp 0x40c55b
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x40d4f8
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 0x40d5ce
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 4], 0xffffffff
lea eax, [ebp - 8]
mov edx, ebx
call fcn.004046e0
lea eax, [ebp - 8]
call fcn.00404b58
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
call fcn.00404b08
push eax
call sub.version.dll_GetFileVersionInfoSizeA
mov ebx, eax
test ebx, ebx
je 0x40d5b8
mov eax, ebx
call fcn.004026fc
mov dword [ebp - 0x10], eax
xor eax, eax
push ebp
push 0x40d5b1
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.00404b08
push eax
call sub.version.dll_GetFileVersionInfoA
test eax, eax
je 0x40d59b
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x40d5e0
mov eax, dword [ebp - 0x10]
push eax
call sub.version.dll_VerQueryValueA
test eax, eax
je 0x40d59b
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 0x40d5b8
mov eax, dword [ebp - 0x10]
call fcn.0040271c
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40d5d5
lea eax, [ebp - 8]
call fcn.00404648
ret