joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4013a4
Capabilities:
Enumerate pe sections
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push esi
mov eax, 0xcccccccc
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
mov eax, dword [edx]
xor edx, edx
mov dx, word [eax + 0x14]
lea eax, [ecx + edx + 0x18]
mov dword [ebp - 4], eax
mov dword [ebp - 8], 0
jmp 0x4013fa
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 4]
add edx, 0x28
mov dword [ebp - 4], edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
xor edx, edx
mov dx, word [ecx + 6]
cmp dword [ebp - 8], edx
jge 0x401528
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x24]
and ecx, 0x20000000
neg ecx
sbb ecx, ecx
neg ecx
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x24]
and eax, 0x40000000
neg eax
sbb eax, eax
neg eax
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x24]
and edx, 0x80000000
neg edx
sbb edx, edx
neg edx
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x24]
and ecx, 0x2000000
test ecx, ecx
je 0x401483
mov esi, esp
push 0x4000
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x10]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 8]
push edx
call dword [0x44017c]
cmp esi, esp
call 0x402ca5
jmp 0x4013e8
mov eax, dword [ebp - 0x10]
shl eax, 4
mov ecx, dword [ebp - 0x20]
lea edx, [eax + ecx*8 + 0x410040]
mov eax, dword [ebp - 0xc]
mov ecx, dword [edx + eax*4]
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x24]
and eax, 0x4000000
test eax, eax
je 0x4014b4
mov ecx, dword [ebp - 0x18]
or ch, 2
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x10]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x4014f8
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x24]
and edx, 0x40
test edx, edx
je 0x4014dd
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x20]
mov dword [ebp - 0x14], edx
jmp 0x4014f8
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x24]
and ecx, 0x80
test ecx, ecx
je 0x4014f8
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov ecx, dword [eax + 0x24]
mov dword [ebp - 0x14], ecx
cmp dword [ebp - 0x14], 0
jbe 0x401523
mov esi, esp
lea edx, [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x10]
push edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 8]
push ecx
call dword [0x440178]
cmp esi, esp
call 0x402ca5
jmp 0x4013e8
pop esi
add esp, 0x20
cmp ebp, esp
call 0x402ca5
mov esp, ebp
pop ebp
ret
Function at 0x1996d00
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x13d8000]
push edi
or ebp, 0xffffffff
jmp 0x1996d22
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x1996d29
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x1996d18
mov eax, 1
add ebx, ebx
jne 0x1996d3b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x1996d4c
jne 0x1996d6b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x1996d6b
dec eax
add ebx, ebx
jne 0x1996d58
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x1996d30
add ebx, ebx
jne 0x1996d67
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0x1996dbd
xor ecx, ecx
sub eax, 3
jb 0x1996d83
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x1996df2
sar eax, 1
mov ebp, eax
jmp 0x1996d8e
add ebx, ebx
jne 0x1996d8e
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x1996d5c
inc ecx
add ebx, ebx
jne 0x1996d9c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x1996d5c
add ebx, ebx
jne 0x1996da9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x1996d9e
jne 0x1996dba
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x1996d9e
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x1996ddc
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x1996dce
jmp 0x1996d1e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x1996ddc
add edi, ecx
jmp 0x1996d1e
pop esi
mov edi, esi
mov ecx, 0x20752
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x1996dfa
mov eax, dword [edi]
mov bl, byte [edi + 4]
xchg ah, al
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 0x1996dff
lea edi, [esi + 0x1592000]
mov eax, dword [edi]
or eax, eax
je 0x1996e67
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x24419b4]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x2441af8]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x1996e25
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x2441b00]
or eax, eax
je 0x1996e61
mov dword [ebx], eax
add ebx, 4
jmp 0x1996e42
call dword [esi + 0x2441afc]
mov ebp, dword [esi + 0x2441b04]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x21f]
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 0x1996e9b
sub esp, 0xffffff80
jmp 0x9b1c38
Function at 0x416160
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x441010]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
mov edi, ecx
mov dword [ebp - 0x28], 0
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
xor ebx, ebx
cmp dword [edi + 0x20], ebx
jle 0x41627b
push esi
nop
mov eax, dword [edi + 0x1c]
push 0
mov esi, dword [eax + ebx*4]
lea eax, [ebp - 0x28]
push eax
mov ecx, dword [esi]
lea eax, [esi + 4]
push eax
push ecx
mov dword [ebp - 0x24], ecx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
push 0
push dword [ebp - 0x24]
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp byte [esi + 0x18], 0
jne 0x4161d6
cmp dword [ebp - 0x20], 0
jne 0x4161d6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e4
jne 0x416247
inc ebx
jmp 0x41622d
mov eax, dword [edi + 0x1c]
push dword [eax + ebx*4]
call fcn.00417089
mov eax, dword [edi + 0x1c]
lea ecx, [eax + ebx*4]
mov eax, dword [edi + 0x20]
sub eax, ebx
shl eax, 2
push eax
lea eax, [ecx + 4]
push eax
push ecx
call fcn.00417e00
dec dword [edi + 0x20]
add esp, 0x10
mov ecx, edi
call fcn.00415980
push 4
call fcn.00417038
add esp, 4
test eax, eax
je 0x41621c
mov ecx, dword [ebp - 0x24]
mov dword [eax], ecx
jmp 0x41621e
xor eax, eax
mov dword [ebp - 0x20], eax
lea ecx, [edi + 0x28]
lea eax, [ebp - 0x20]
push eax
call fcn.00415d50
cmp ebx, dword [edi + 0x20]
jl 0x416190
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041796e
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x1c]
push eax
call fcn.004022e0
add esp, 4
cmp dword [eax + 0x14], 0x10
jb 0x41625b
mov eax, dword [eax]
push eax
push str.err:_s_n
call fcn.0041889c
add esp, 8
cmp dword [ebp - 8], 0x10
jb 0x41627a
push dword [ebp - 0x1c]
call fcn.00417089
add esp, 4
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.0041796e
mov esp, ebp
pop ebp
ret
Function at 0x416310
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x425428
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x441010]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
cmp dword [ebx], 0
mov edi, dword [ebp + 8]
push 0
mov dword [ebp - 0x4c], 0
push 0x4395f8
jne 0x416370
mov dword [edi + 0x14], 0xf
mov ecx, edi
mov dword [edi + 0x10], 0
mov byte [edi], 0
call fcn.00401d20
jmp 0x416490
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
call fcn.00401d20
push 0x401
mov dword [ebp - 4], 0
call fcn.0041700d
push 0x400
mov esi, eax
push 0
push esi
call fcn.00418450
add esp, 0x10
mov dword [ebp - 0x48], 0
push 0
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
je 0x41646b
push 0
lea eax, [ebp - 0x48]
push eax
push 0x400
push esi
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esi], 0
mov dword [ebp - 0x44], eax
jne 0x4163e6
xor ecx, ecx
jmp 0x4163f9
mov ecx, esi
lea edx, [ecx + 1]
jmp 0x4163f0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4163f0
sub ecx, edx
push ecx
push esi
lea ecx, [ebp - 0x28]
call fcn.00415f70
push 0x400
push 0
push esi
call fcn.00418450
add esp, 0xc
cmp dword [ebp - 0x44], 0
jne 0x416459
lea eax, [ebp - 0x40]
push eax
call fcn.004022e0
add esp, 4
cmp dword [eax + 0x14], 0x10
jb 0x41642d
mov eax, dword [eax]
push eax
push str.error:__s_n
call fcn.0041889c
add esp, 8
cmp dword [ebp - 0x2c], 0x10
jb 0x41644c
push dword [ebp - 0x40]
call fcn.00417089
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
je 0x41646b
push 0
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
jne 0x4163c6
push esi
call fcn.0041894b
add esp, 4
lea eax, [ebp - 0x28]
mov ecx, edi
push eax
call fcn.00415800
cmp dword [ebp - 0x14], 0x10
jb 0x416490
push dword [ebp - 0x28]
call fcn.00417089
add esp, 4
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041796e
mov esp, ebp
pop ebp
ret 4

Function at 0x4164e0
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, ecx
xor esi, esi
lea ecx, [ecx]
push 0
lea eax, [ebp + 8]
push eax
push 0
push 0
push 0
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x41652e
cmp dword [ebp + 8], 0xffffffff
je 0x41652e
push 0
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
jne 0x416537
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
inc esi
cmp edi, 0xffffffff
je 0x4164f0
cmp esi, edi
jle 0x4164f0
pop edi
pop esi
xor al, al
pop ebx
pop ebp
ret 4
pop edi
pop esi
mov al, 1
pop ebx
pop ebp
ret 4
Function at 0x4225dd
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x441010]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.0041f7d6
mov dword [ebp - 0x14], eax
cmp dword [0x4431cc], esi
jne 0x4226d0
push 0x800
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x42265d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x4227b0
push esi
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x4227b0
push str.MessageBoxW
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4227b0
push eax
call ebx
push str.GetActiveWindow
push edi
mov dword [0x4431cc], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push edi
mov dword [0x4431d0], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push edi
mov dword [0x4431d4], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x4431dc], eax
test eax, eax
je 0x4226cd
push str.GetProcessWindowStation
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x4431d8], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x4226f5
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x4226e8
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x42270a
push 4
pop eax
jmp 0x4227b2
cmp dword [ebp - 0x14], esi
je 0x42270a
push dword [0x4431cc]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x4226ef
mov eax, dword [0x4431d8]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x422768
cmp dword [0x4431dc], edi
je 0x422768
push eax
call ebx
push dword [0x4431dc]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x422768
test eax, eax
je 0x422768
call ecx
test eax, eax
je 0x42275d
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x42275d
test byte [ebp - 8], 1
jne 0x422768
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x422798
mov eax, dword [0x4431d0]
cmp eax, edi
je 0x422795
push eax
call ebx
test eax, eax
je 0x422795
call eax
mov esi, eax
test esi, esi
je 0x422795
mov eax, dword [0x4431d4]
cmp eax, edi
je 0x422795
push eax
call ebx
test eax, eax
je 0x422795
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x4431cc]
call ebx
test eax, eax
je 0x4227b0
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x4227b2
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041796e
mov esp, ebp
pop ebp
ret
Function at 0x4032ac
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.00404a4c
test esi, esi
jne 0x4032e2
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.00404b3c
jmp 0x403300
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00403150
mov edi, eax
test esi, esi
je 0x403300
cmp dword [ebx], 0
je 0x403300
dec esi
jmp 0x4032e9
add esp, 0x108
pop edi
pop esi
pop ebx
ret

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

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

Function at 0x403a18
Capabilities:
Query or enumerate registry value

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

Function at 0x4048cc
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x46c048], 0
je 0x40492d
cmp word [0x46c21c], 0xd7b2
jne 0x4048f5
cmp dword [0x46c224], 0
jbe 0x4048f5
mov eax, 0x46c218
call dword [0x46c234]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push str.Runtime_error_____at_00000000
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x404954
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x46a030], 0
jne 0x404949
push 0
push str.Error
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret
Function at 0x4088ec
Capabilities:
Encrypt data using rc4 prga

Disassembly:
cmp eax, edx
je 0x40893e
test eax, edx
je 0x408941
movzx ecx, byte [edx]
cmp cl, byte [eax]
je 0x408901
movzx eax, byte [eax]
sub eax, ecx
ret
push ebx
mov ebx, dword [eax - 4]
xor ecx, ecx
sub ebx, dword [edx - 4]
push ebx
adc ecx, 0xffffffff
and ecx, ebx
sub ecx, dword [eax - 4]
sub eax, ecx
sub edx, ecx
mov ebx, dword [ecx + eax]
xor ebx, dword [ecx + edx]
jne 0x408927
add ecx, 4
js 0x408917
pop eax
pop ebx
ret
bsf ebx, ebx
shr ebx, 3
add ecx, ebx
jns 0x408924
movzx eax, byte [ecx + eax]
movzx edx, byte [ecx + edx]
sub eax, edx
pop ebx
pop ebx
ret
xor eax, eax
ret
test eax, eax
je 0x40894d
test edx, edx
jne 0x4088f4
mov eax, dword [eax - 4]
ret
sub eax, dword [edx - 4]
ret

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

Disassembly:
push ebx
push esi
mov esi, eax
mov eax, esi
call fcn.00404edc
push eax
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
je 0x409212
test al, 0x10
sete al
pop esi
pop ebx
ret
call sub.kernel32.dll_GetLastError
mov ebx, eax
cmp ebx, 2
je 0x409233
cmp ebx, 3
je 0x409233
cmp ebx, 0x7b
je 0x409233
mov eax, esi
call fcn.004091b4
test al, al
jne 0x409237
xor eax, eax
jmp 0x409239
mov al, 1
pop esi
pop ebx
ret

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

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

Function at 0x40be80
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 0x40beb9
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.00404b3c
jmp 0x40bec2
mov eax, ebx
mov edx, esi
call fcn.00404aa0
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x40becc
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 0x40beee
movzx eax, byte [esp]
jmp 0x40bef0
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret
Function at 0x40c580
Capabilities:
Write file on windows

Disassembly:
add esp, 0xfffffbbc
push 0x400
lea ecx, [esp + 0x48]
call 0x40c3f8
mov eax, dword [0x46bc34]
cmp byte [eax], 0
je 0x40c5fc
mov eax, dword [0x46ba3c]
call fcn.004033e0
call fcn.00402fbc
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.004095b4
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 0x40c644
push 0xfffffffffffffff4
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_WriteFile_1
jmp 0x40c632
push 0x40
lea eax, [esp + 8]
push eax
mov eax, dword [0x46b9e4]
mov eax, dword [eax + 4]
push eax
mov eax, dword [0x46e7f4]
call fcn.00405f3c
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 0x40cebc
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
xor edx, edx
mov dword [ebp - 4], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x40cf92
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 8], 0xffffffff
lea eax, [ebp - 4]
mov edx, ebx
call fcn.00404ae4
lea eax, [ebp - 4]
call fcn.00404f34
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
call fcn.00404edc
push eax
call sub.version.dll_GetFileVersionInfoSizeA
mov ebx, eax
test ebx, ebx
je 0x40cf7c
mov eax, ebx
call fcn.00402e60
mov dword [ebp - 0x10], eax
xor eax, eax
push ebp
push 0x40cf75
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 - 4]
call fcn.00404edc
push eax
call sub.version.dll_GetFileVersionInfoA
test eax, eax
je 0x40cf5f
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x40cfa4
mov eax, dword [ebp - 0x10]
push eax
call sub.version.dll_VerQueryValueA
test eax, eax
je 0x40cf5f
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 8]
mov dword [ebp - 8], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40cf7c
mov eax, dword [ebp - 0x10]
call fcn.00402e7c
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40cf99
lea eax, [ebp - 4]
call fcn.00404a4c
ret
Function at 0x41f9e4
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, 0x4709e8
cmp dword [edi], 0
jne 0x41fa60
push 0x40
push 0x1000
push 0x1000
push 0
call sub.kernel32.dll_VirtualAlloc_1
mov esi, eax
mov eax, dword [0x4709e4]
mov dword [esi], eax
lea edx, [esi + 4]
mov eax, 0x46ab7c
mov ecx, 2
call fcn.00403050
mov edx, 0x41f9bc
lea eax, [esi + 5]
call fcn.0041f9dc
mov dword [esi + 6], eax
lea ebx, [esi + 0xa]
mov byte [ebx], 0xe8
lea edx, [esi + 4]
mov eax, ebx
call fcn.0041f9dc
mov dword [ebx + 1], eax
mov eax, dword [edi]
mov dword [ebx + 5], eax
mov dword [edi], ebx
add ebx, 0xd
mov eax, ebx
sub eax, esi
cmp eax, 0xffc
jl 0x41fa35
mov dword [0x4709e4], esi
mov eax, dword [edi]
mov ebx, dword [edi]
mov edx, dword [ebx + 5]
mov dword [edi], edx
mov edx, dword [ebp + 8]
mov dword [ebx + 5], edx
mov edx, dword [ebp + 0xc]
mov dword [ebx + 9], edx
pop edi
pop esi
pop ebx
pop ebp
ret 8