joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40d060
Capabilities:
Decompress data using aplib

Disassembly:
pushal
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
cld
mov dl, 0x80
xor ebx, ebx
movsb byte es:[edi], byte [esi]
mov bl, 2
call fcn.0040d0e3
jae 0x40d06e
xor ecx, ecx
call fcn.0040d0e3
jae 0x40d09d
xor eax, eax
call fcn.0040d0e3
jae 0x40d0ad
mov bl, 2
inc ecx
mov al, 0x10
call fcn.0040d0e3
adc al, al
jae 0x40d08f
jne 0x40d0d9
stosb byte es:[edi], al
jmp 0x40d071
call fcn.0040d0ef
sub ecx, ebx
jne 0x40d0b6
call fcn.0040d0ed
jmp 0x40d0d5
lodsb al, byte [esi]
shr eax, 1
je 0x40d0ff
adc ecx, ecx
jmp 0x40d0d2
xchg ecx, eax
dec eax
shl eax, 8
lodsb al, byte [esi]
call fcn.0040d0ed
cmp eax, 0x7d00
jae 0x40d0d2
cmp ah, 5
jae 0x40d0d3
cmp eax, 0x7f
ja 0x40d0d4
inc ecx
inc ecx
xchg ebp, eax
mov eax, ebp
mov bl, 1
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x40d071
sub edi, dword [esp + 0x28]
mov dword [esp + 0x1c], edi
popal
ret

Function at 0x40d42c
Capabilities:
Encrypt data using tea

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
xor ecx, ecx
push ebx
push esi
push edi
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov esi, dword [ebx]
mov eax, dword [eax]
mov edx, dword [edx + 4]
mov dword [ebp - 4], esi
mov esi, dword [ebx + 4]
mov dword [ebp - 8], esi
mov esi, dword [ebx + 8]
mov dword [ebp - 0xc], esi
mov ebx, dword [ebx + 0xc]
mov dword [ebp - 0x10], ebx
mov ebx, 0x20
jmp 0x40d49b
add ecx, 0x9e3779b9
mov esi, edx
shl esi, 4
add esi, dword [ebp - 4]
lea edi, [ecx + edx]
xor esi, edi
mov edi, edx
shr edi, 5
add edi, dword [ebp - 8]
xor esi, edi
add eax, esi
mov esi, eax
shl esi, 4
add esi, dword [ebp - 0xc]
lea edi, [ecx + eax]
xor esi, edi
mov edi, eax
shr edi, 5
add edi, dword [ebp - 0x10]
xor esi, edi
add edx, esi
mov esi, ebx
add ebx, 0xffffffff
test esi, esi
jg 0x40d463
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov eax, dword [ebp + 8]
mov dword [eax + 4], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x40dd9c
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffeec
xor eax, eax
push ebx
push esi
push edi
xor esi, esi
mov edi, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0xc], 0x104
mov dword [ebp - 0x10], eax
lea eax, [ebp - 8]
lea edx, [ebp - 0xc]
push eax
push 0
push 0
push 0
push edx
lea ecx, [ebp - 0x114]
push ecx
push esi
push edi
call sub.ADVAPI32.DLL_RegEnumKeyExA
mov ebx, eax
test ebx, ebx
jne 0x40de3b
mov dword [ebp - 0xc], 0xc8
push str.HIDVid_3689Pid_8762
call fcn.00405cb0
pop ecx
push eax
lea eax, [ebp - 0x110]
push eax
push 0x452f0e
call fcn.00405e28
add esp, 0xc
test eax, eax
jne 0x40de3b
mov edx, dword [ebp - 0x10]
cmp edx, dword [ebp + 0xc]
jne 0x40de38
mov ecx, dword [ebp + 0x10]
mov esi, 0x452f3a
mov edi, ecx
lea edx, [ebp - 0x110]
mov eax, edi
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
push edx
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.00405c74
add esp, 8
mov eax, 1
jmp 0x40de46
inc dword [ebp - 0x10]
inc esi
test ebx, ebx
je 0x40ddbb
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x403fa3
Capabilities:
Create directory
Get common file path

Disassembly:
push 0x44c
mov eax, 0x41a76a
call fcn.004093f0
mov esi, dword [ebp + 8]
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0x458], ebx
mov dword [ebp - 0x428], 7
mov dword [ebp - 0x42c], ebx
mov word [ebp - 0x43c], ax
lea eax, [ebp - 0x21c]
mov dword [ebp - 4], ebx
push eax
mov edi, 0x105
push edi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x404110
cmp eax, edi
jae 0x404110
lea eax, [ebp - 0x424]
push eax
push ebx
push 0x41c79c
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x404110
push 0x200
lea ecx, [ebp - 0x43c]
call fcn.00403749
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, eax
cmp word [ebp - 0x21c], 0
jne 0x404044
mov eax, ebx
jmp 0x404051
lea eax, [ebp - 0x21c]
push eax
call fcn.004092e4
pop ecx
push eax
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x43c]
call fcn.00402260
push 0x41c7a4
call fcn.004092e4
pop ecx
push eax
push 0x41c7a4
lea ecx, [ebp - 0x43c]
call fcn.00401ff6
lea eax, [ebp - 0x454]
push edi
push eax
call fcn.004026e3
pop ecx
pop ecx
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp - 0x43c]
mov byte [ebp - 4], 1
call fcn.00401f29
push ebx
push 1
lea ecx, [ebp - 0x454]
mov byte [ebp - 4], bl
call fcn.00401ee3
cmp dword [ebp - 0x428], 8
lea eax, [ebp - 0x43c]
push ebx
cmovae eax, dword [ebp - 0x43c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4040f7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4040e6
inc edi
jmp 0x404036
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], ebx
mov word [esi], ax
jmp 0x40411e
mov edi, str.lrunner.exe
push edi
call fcn.004092e4
pop ecx
push eax
push edi
lea ecx, [ebp - 0x43c]
call fcn.00401ff6
lea eax, [ebp - 0x43c]
mov ecx, esi
push eax
call fcn.00401418
push ebx
push 1
lea ecx, [ebp - 0x43c]
call fcn.00401ee3
mov eax, esi
call fcn.0040939f
ret
Function at 0x404bd3
Capabilities:
Get file size
Read file on windows

Disassembly:
push 0x3c
mov eax, 0x41a823
call fcn.004093f0
mov dword [ebp - 0x30], ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x28]
push eax
call fcn.00404b0b
pop ecx
cmp dword [eax + 0x14], 8
jb 0x404bfa
mov eax, dword [eax]
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x48], esi
push ebx
push 1
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], ebx
call fcn.00401ee3
cmp esi, 0xffffffff
je 0x404c91
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x2c], ebx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
je 0x404c86
cmp dword [ebp - 0x2c], ebx
jne 0x404c86
push eax
lea ecx, [ebp - 0x44]
call fcn.00402944
mov edi, dword [ebp - 0x40]
lea eax, [ebp - 0x34]
sub edi, dword [ebp - 0x44]
push ebx
push eax
push edi
push dword [ebp - 0x44]
mov byte [ebp - 4], 1
push esi
mov dword [ebp - 0x34], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x404c7e
push dword [ebp - 0x38]
mov ecx, dword [ebp - 0x30]
push edi
push dword [ebp - 0x44]
call fcn.00404c9b
mov bl, al
lea ecx, [ebp - 0x44]
call fcn.00403cbf
test esi, esi
je 0x404c91
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, bl
call fcn.0040939f
ret 4

Function at 0x40500c
Capabilities:
Encode data using base64 via winapi

Disassembly:
push 0x40
mov eax, 0x41a858
call fcn.004093f0
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x44]
push eax
xor ebx, ebx
push ebx
push 1
push dword [ebp + 0x10]
mov dword [ebp - 0x4c], ebx
push dword [ebp + 0xc]
mov dword [ebp - 0x44], ebx
call dword [sym.imp.CRYPT32.dll_CryptBinaryToStringW]
test eax, eax
jne 0x40504c
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], ebx
mov word [esi], ax
jmp 0x40510e
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], ebx
mov word [ebp - 0x28], ax
push ebx
push dword [ebp - 0x44]
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], ebx
call fcn.004052e2
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x44]
push ecx
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
push 1
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.CRYPT32.dll_CryptBinaryToStringW]
test eax, eax
jne 0x4050a0
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
mov dword [ebp - 0x18], ebx
cmovae eax, dword [ebp - 0x28]
xor ecx, ecx
mov word [eax], cx
push ebx
push dword [ebp - 0x44]
lea ecx, [ebp - 0x28]
call fcn.004052e2
xor eax, eax
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], ebx
mov word [ebp - 0x40], ax
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x28]
mov eax, dword [ebp - 0x18]
lea edx, [ebp - 0x40]
cmovae ecx, dword [ebp - 0x28]
push dword [ebp - 0x44]
mov byte [ebp - 4], 1
push edx
lea eax, [ecx + eax*2]
push eax
lea ecx, [ebp - 0x28]
cmovae ecx, dword [ebp - 0x28]
lea eax, [ebp - 0x48]
push ecx
push eax
call fcn.00404fc0
add esp, 0x14
lea eax, [ebp - 0x40]
mov ecx, esi
push eax
call fcn.00401418
push ebx
push 1
lea ecx, [ebp - 0x40]
call fcn.00401ee3
push ebx
push 1
lea ecx, [ebp - 0x28]
call fcn.00401ee3
mov eax, esi
call fcn.0040939f
ret
Function at 0x406826
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add ecx, 4
pop ebp
jmp fcn.00405de9

Function at 0x407489
Capabilities:
Prepare http request

Disassembly:
push 0x1c
mov eax, 0x41ae16
call fcn.004093f0
mov edi, ecx
mov ecx, dword [edi + 0x54]
xor esi, esi
cmp dword [edi + 0x34], 2
mov eax, 0x800000
cmove esi, eax
mov eax, dword [edi + 0x58]
lea eax, [ecx + eax*2]
push eax
push ecx
lea ecx, [ebp - 0x28]
call fcn.00406b23
xor ebx, ebx
lea ecx, [ebp - 0x28]
cmp dword [ebp - 0x14], 8
lea eax, [edi + 0x78]
mov dword [ebp - 4], ebx
cmovae ecx, dword [ebp - 0x28]
cmp dword [eax + 0x14], 8
jb 0x4074d3
mov eax, dword [eax]
push esi
push ebx
push ebx
push ebx
push ecx
push eax
push dword [edi + 0x70]
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
mov ecx, edi
test esi, esi
push 5
setne dl
movzx edx, dl
push edx
call fcn.004073eb
push ebx
push 1
lea ecx, [ebp - 0x28]
call fcn.00401ee3
mov eax, esi
call fcn.0040939f
ret

Function at 0x40754b
Capabilities:
Read http header

Disassembly:
push 0x3c
mov eax, 0x41ae64
call fcn.004093f0
mov edi, dword [ebp + 8]
xor edx, edx
mov ebx, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x48], edi
mov dword [edi], edx
mov dword [edi + 4], edx
mov dword [edi + 8], edx
xor eax, eax
mov dword [ebp - 0x3c], edx
inc eax
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x34], edx
mov dword [ebp - 4], eax
mov eax, edx
mov dword [ebp - 0x30], eax
cmp dword [esi + 0x14], 8
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x40], eax
jb 0x407597
mov eax, dword [esi]
jmp 0x407599
mov eax, esi
lea ecx, [ebp - 0x40]
push ecx
lea ecx, [ebp - 0x2c]
push ecx
push edx
push eax
push 0xffff
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
jne 0x40763a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40763a
cmp dword [ebp - 0x2c], 0
je 0x40763a
push dword [ebp - 0x2c]
lea ecx, [ebp - 0x3c]
call fcn.00405310
cmp dword [esi + 0x14], 8
jb 0x4075dd
mov eax, dword [esi]
jmp 0x4075df
mov eax, esi
lea ecx, [ebp - 0x30]
push ecx
lea ecx, [ebp - 0x2c]
push ecx
push dword [ebp - 0x3c]
push eax
push 0xffff
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x40763a
mov eax, dword [ebp - 0x38]
lea ecx, [ebp - 0x28]
add eax, 0xfffffffe
push eax
push dword [ebp - 0x3c]
call fcn.00406b23
push eax
mov ecx, edi
mov byte [ebp - 4], 2
call fcn.00407f15
push 0
push 1
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 1
call fcn.00401ee3
mov eax, dword [ebp - 0x30]
push 0
pop edx
cmp eax, 0x2f76
jne 0x407587
lea ecx, [ebp - 0x3c]
call fcn.00403cbf
mov eax, edi
call fcn.0040939f
ret
Function at 0x407666
Capabilities:
Check http status code
Read http header

Disassembly:
push 0x30
mov eax, 0x41ae99
call fcn.004093f0
mov esi, ecx
xor ebx, ebx
mov dword [ebp - 0x30], 4
push ebx
lea eax, [ebp - 0x30]
push eax
lea edi, [esi + 0xf0]
push edi
push ebx
push 0x20000013
push dword [esi + 0x74]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
mov ecx, esi
push 6
setne al
movzx eax, al
push eax
call fcn.004073eb
cmp byte [esi + 0xa8], bl
jne 0x4076d7
cmp dword [edi], 0xc8
jl 0x4076c2
cmp dword [edi], 0x12c
jl 0x4076d7
push 0x42462c
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x2c], 7
push eax
call fcn.00409328
xor eax, eax
mov dword [ebp - 0x14], 7
mov edi, str.Set_Cookie
mov dword [ebp - 0x18], ebx
push edi
mov word [ebp - 0x28], ax
call fcn.004092e4
pop ecx
push eax
push edi
lea ecx, [ebp - 0x28]
call fcn.00402260
lea eax, [ebp - 0x28]
mov dword [ebp - 4], ebx
push eax
push dword [esi + 0x74]
lea eax, [ebp - 0x3c]
push eax
call fcn.0040754b
add esp, 0xc
push eax
lea ecx, [esi + 0xf8]
mov byte [ebp - 4], 1
call fcn.00407238
lea ecx, [ebp - 0x3c]
call fcn.004068dd
push ebx
push 1
lea ecx, [ebp - 0x28]
call fcn.00401ee3
call fcn.0040939f
ret

Function at 0x40782c
Capabilities:
Set http header

Disassembly:
push 0x20
mov eax, 0x41a8a8
call fcn.004093f0
mov eax, ecx
mov dword [ebp - 0x2c], eax
and dword [ebp - 0x18], 0
xor ecx, ecx
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], cx
and dword [ebp - 4], ecx
mov edi, dword [eax + 0xe4]
mov esi, dword [eax + 0xe0]
jmp 0x4078c7
push 0xffffffffffffffff
push 0
push esi
call fcn.004021a6
push 0x41cb14
mov ebx, eax
call fcn.004092e4
pop ecx
push eax
push 0x41cb14
mov ecx, ebx
call fcn.00401ff6
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x18]
push ecx
mov ecx, eax
call fcn.00401f29
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
mov ebx, dword [ebp - 0x2c]
cmovae eax, dword [ebp - 0x28]
push 0x10000000
push dword [ebp - 0x18]
push eax
push dword [ebx + 0x74]
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
mov ecx, ebx
push 3
setne al
movzx eax, al
push eax
call fcn.004073eb
add esi, 0x30
lea ecx, [ebp - 0x28]
cmp esi, edi
jne 0x40785f
push 0
push 1
call fcn.00401ee3
call fcn.0040939f
ret
Function at 0x41220a
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x4261e0]
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.0040e42d
mov dword [ebp - 0x14], eax
cmp dword [0x4286ec], esi
jne 0x4122fd
push 0x800
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x41228a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x4123dd
push esi
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x4123dd
push str.MessageBoxW
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4123dd
push eax
call ebx
push str.GetActiveWindow
push edi
mov dword [0x4286ec], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push edi
mov dword [0x4286f0], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push edi
mov dword [0x4286f4], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x4286fc], eax
test eax, eax
je 0x4122fa
push str.GetProcessWindowStation
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x4286f8], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x412322
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x412315
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x412337
push 4
pop eax
jmp 0x4123df
cmp dword [ebp - 0x14], esi
je 0x412337
push dword [0x4286ec]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x41231c
mov eax, dword [0x4286f8]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x412395
cmp dword [0x4286fc], edi
je 0x412395
push eax
call ebx
push dword [0x4286fc]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x412395
test eax, eax
je 0x412395
call ecx
test eax, eax
je 0x41238a
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 0x41238a
test byte [ebp - 8], 1
jne 0x412395
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x4123c5
mov eax, dword [0x4286f0]
cmp eax, edi
je 0x4123c2
push eax
call ebx
test eax, eax
je 0x4123c2
call eax
mov esi, eax
test esi, esi
je 0x4123c2
mov eax, dword [0x4286f4]
cmp eax, edi
je 0x4123c2
push eax
call ebx
test eax, eax
je 0x4123c2
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x4286ec]
call ebx
test eax, eax
je 0x4123dd
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x4123df
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00409319
mov esp, ebp
pop ebp
ret
Function at 0x402a44
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.00404064
test esi, esi
jne 0x402a7a
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.00404154
jmp 0x402a98
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00402958
mov edi, eax
test esi, esi
je 0x402a98
cmp dword [ebx], 0
je 0x402a98
dec esi
jmp 0x402a81
add esp, 0x108
pop edi
pop esi
pop ebx
ret

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

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

Function at 0x403184
Capabilities:
Query or enumerate registry value

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

Function at 0x403ee8
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x4e404c], 0
je 0x403f49
cmp word [0x4e4220], 0xd7b2
jne 0x403f11
cmp dword [0x4e4228], 0
jbe 0x403f11
mov eax, 0x4e421c
call dword [0x4e4238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x4e1070
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 0x403f70
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x4e1034], 0
jne 0x403f65
push 0
push 0x4e1068
push 0x4e1070
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret
Function at 0x405778
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 0x4059a8
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x4057fb
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x4059a8
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x4057fb
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x4059c4
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x405884
xor eax, eax
push ebp
push 0x40587d
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 5
lea eax, [ebp - 0x11d]
mov edx, 0x105
call fcn.004055c0
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 0x405862
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
push 0x4059e4
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x405862
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 0x405884
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 0x40599e
cmp byte [ebp - 0xd], 0
jne 0x4058cb
cmp byte [ebp - 0x12], 0
je 0x40599e
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x11d]
add ebx, eax
jmp 0x4058e4
dec ebx
cmp byte [ebx], 0x2e
je 0x4058f3
lea eax, [ebp - 0x11d]
cmp ebx, eax
jne 0x4058e3
lea eax, [ebp - 0x11d]
cmp ebx, eax
je 0x40599e
inc ebx
cmp byte [ebp - 0x12], 0
je 0x405930
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 0x40599e
cmp byte [ebp - 0xd], 0
je 0x40599e
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 0x40599e
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