joyce8/EMBER2024-capa huggingface dataset:
Function at 0x46337b
Capabilities:
Hide graphical window

Disassembly:
push esi
mov esi, ecx
call fcn.00462bc4
push dword [esi + 4]
call dword [sym.imp.USER32.dll_GetParent]
push 0
push 0
push 0x465
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
push 0
push dword [esi + 4]
call dword [sym.imp.USER32.dll_ShowWindow]
xor eax, eax
pop esi
ret 0x10

Function at 0x463535
Capabilities:
Get graphical window text

Disassembly:
sub esp, 0x18
mov eax, dword [0x4bc660]
xor eax, esp
mov dword [esp + 0x14], eax
push ebx
push ebp
push esi
push edi
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
xor ebp, ebp
push ebp
push ebp
mov ebx, 0xf0
mov esi, ecx
push ebx
push dword [esi + 0x24]
call edi
push ebp
neg eax
push ebp
sbb eax, eax
push ebx
push dword [esi + 0x28]
neg eax
mov dword [esi + 0x78], eax
call edi
push ebp
neg eax
push ebp
sbb eax, eax
push ebx
push dword [esi + 0x30]
neg eax
mov dword [esi + 0x7c], eax
call edi
push ebp
neg eax
push ebp
sbb eax, eax
push ebx
push dword [esi + 0x34]
neg eax
mov dword [esi + 0x80], eax
call edi
neg eax
sbb eax, eax
neg eax
mov dword [esi + 0x88], eax
push 0xa
lea eax, [esp + 0x14]
push eax
push dword [esi + 0x4c]
call dword [sym.imp.USER32.dll_GetWindowTextW]
lea eax, [esp + 0x10]
push eax
call fcn.0046ad6f
cmp eax, ebp
mov ebx, dword [sym.imp.USER32.dll_SetWindowTextW]
pop ecx
mov dword [esi + 0x84], eax
jg 0x4635dc
mov dword [esi + 0x84], 1
push 0x4a0100
jmp 0x4635f0
mov ecx, 0x2800
cmp eax, ecx
jle 0x463602
mov dword [esi + 0x84], ecx
push str.10240
push dword [esi + 0x4c]
call ebx
push 0xffffffffffffffff
push ebp
push 0xb1
push dword [esi + 0x4c]
call edi
push 0xa
lea eax, [esp + 0x14]
push eax
push dword [esi + 0x50]
call dword [sym.imp.USER32.dll_GetWindowTextW]
lea eax, [esp + 0x10]
push eax
call fcn.0046ad6f
cmp eax, ebp
pop ecx
mov dword [esi + 0x8c], eax
jg 0x463638
mov dword [esi + 0x8c], 1
push 0x4a0100
jmp 0x46364c
mov ecx, 0x2800
cmp eax, ecx
jle 0x46365e
mov dword [esi + 0x8c], ecx
push str.10240
push dword [esi + 0x50]
call ebx
push 0xffffffffffffffff
push ebp
push 0xb1
push dword [esi + 0x50]
call edi
mov ecx, esi
call fcn.00462ff6
push 1
push ebp
push dword [esi + 4]
call dword [sym.imp.USER32.dll_InvalidateRect]
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.00464a9b
add esp, 0x18
ret 0x10

Function at 0x464a9b
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4bc660]
jne 0x464aa5
repz ret
jmp fcn.0046c4dc
Function at 0x46c6f1
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x4bc708]
je 0x46c70c
inc edi
cmp edi, 0x17
jb 0x46c6fd
cmp edi, 0x17
jae 0x46c88c
push ebp
push 3
call fcn.00477c2b
cmp eax, 1
pop ecx
je 0x46c858
push 3
call fcn.00477c2b
test eax, eax
pop ecx
jne 0x46c740
cmp dword [0x4bc6d0], 1
je 0x46c858
cmp ebx, 0xfc
je 0x46c88b
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x4bf630
push ebp
call fcn.0046cad9
add esp, 0xc
test eax, eax
je 0x46c776
push esi
push esi
push esi
push esi
push esi
call fcn.00466817
add esp, 0x14
push 0x104
mov esi, 0x4bf649
push esi
push 0
mov byte [0x4bf74d], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x46c7ba
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.0046cad9
add esp, 0xc
test eax, eax
je 0x46c7ba
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.00466817
add esp, 0x14
push esi
call fcn.004664c0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x46c7ff
push esi
call fcn.004664c0
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x4bf944
push 0x4a5da4
sub ecx, eax
push ecx
push eax
call fcn.00467f04
add esp, 0x14
test eax, eax
je 0x46c7ff
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.00466817
add esp, 0x14
jmp 0x46c801
xor esi, esi
push 0x4a5da0
push ebx
push ebp
call fcn.00477bba
add esp, 0xc
test eax, eax
je 0x46c821
push esi
push esi
push esi
push esi
push esi
call fcn.00466817
add esp, 0x14
push dword [edi*8 + 0x4bc70c]
push ebx
push ebp
call fcn.00477bba
add esp, 0xc
test eax, eax
je 0x46c843
push esi
push esi
push esi
push esi
push esi
call fcn.00466817
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.004779fd
add esp, 0xc
jmp 0x46c88b
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x46c88b
cmp ebp, 0xffffffff
je 0x46c88b
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x4bc70c]
push dword [esi]
call fcn.004664c0
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x4779fd
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.0046be7a
xor ebx, ebx
cmp dword [0x4bfd80], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x477ad3
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x477bb3
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x477bb3
push eax
call fcn.0046be0c
mov dword [esp], 0x4a60c0
push edi
mov dword [0x4bfd80], eax
call esi
push eax
call fcn.0046be0c
mov dword [esp], 0x4a60ac
push edi
mov dword [0x4bfd84], eax
call esi
push eax
call fcn.0046be0c
mov dword [0x4bfd88], eax
lea eax, [ebp - 0xc]
push eax
call fcn.00470a04
test eax, eax
pop ecx
pop ecx
je 0x477aa1
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00466817
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x477ad3
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.0046be0c
cmp eax, ebx
pop ecx
mov dword [0x4bfd90], eax
je 0x477ad3
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.0046be0c
pop ecx
mov dword [0x4bfd8c], eax
mov eax, dword [0x4bfd8c]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x477b58
cmp dword [0x4bfd90], ecx
je 0x477b58
push eax
call fcn.0046be83
push dword [0x4bfd90]
mov esi, eax
call fcn.0046be83
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x477b58
cmp edi, ebx
je 0x477b58
call esi
cmp eax, ebx
je 0x477b25
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x477b25
test byte [ebp - 0x18], 1
jne 0x477b58
lea eax, [ebp - 0x10]
push eax
call fcn.00470a3b
test eax, eax
pop ecx
je 0x477b40
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00466817
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x477b4f
or dword [ebp + 0x10], 0x200000
jmp 0x477b93
or dword [ebp + 0x10], 0x40000
jmp 0x477b93
mov eax, dword [0x4bfd84]
cmp eax, dword [ebp - 8]
je 0x477b93
push eax
call fcn.0046be83
cmp eax, ebx
pop ecx
je 0x477b93
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x477b93
mov eax, dword [0x4bfd88]
cmp eax, dword [ebp - 8]
je 0x477b93
push eax
call fcn.0046be83
cmp eax, ebx
pop ecx
je 0x477b93
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x4bfd80]
call fcn.0046be83
cmp eax, ebx
pop ecx
je 0x477bb3
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x477bb5
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x48182a
Capabilities:
Enumerate threads
Suspend thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [ebp + 8]
test eax, eax
mov dword [ebp + 8], eax
jne 0x481843
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp + 8], eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push 0x1c
pop esi
push esi
mov dword [ebp - 4], eax
lea eax, [ebp - 0x20]
push 0
push eax
call fcn.004665b0
add esp, 0xc
push 0
push 4
mov dword [ebp - 0x20], esi
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov ebx, eax
test ebx, ebx
je 0x4818ca
push edi
lea eax, [ebp - 0x20]
push eax
push ebx
call sub.KERNEL32.dll_Thread32First
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4818c2
mov eax, dword [ebp + 8]
cmp eax, dword [ebp - 0x14]
jne 0x4818b8
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 4], eax
je 0x4818b8
push eax
push 0
push 2
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov esi, eax
test esi, esi
je 0x4818b2
push esi
call dword [sym.imp.KERNEL32.dll_SuspendThread]
push esi
call edi
jmp 0x4818b8
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [ebp - 0x20]
push eax
push ebx
call sub.KERNEL32.dll_Thread32Next
test eax, eax
jne 0x481885
push ebx
call edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x482215
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
cmp dword [0x4c00f8], 0
push esi
jne 0x482188
call fcn.004820b3
test eax, eax
je 0x4821cb
mov eax, dword [0x4c00f8]
cmp eax, 1
jne 0x4821a9
push 0xd
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x4821cb
pop esi
ret
push eax
call dword [0x4c0100]
test eax, eax
jne 0x482213
push 0x40
mov eax, 0x1000
push eax
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
jne 0x4821cf
xor eax, eax
pop esi
ret
mov eax, dword [esi]
push edi
push dword [0x4c00f8]
call dword [0x4c0100]
mov edi, eax
test edi, edi
je 0x4821f6
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, edi
jmp 0x482212
lea edi, [esi + 0xff0]
push esi
push dword [0x4c00f8]
call dword [0x4c00fc]
add esi, 0x10
cmp esi, edi
jb 0x4821fc
mov eax, esi
pop edi
pop esi
ret
jmp 0x482175

Function at 0x482366
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x4bc660]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.004822fb
mov eax, 0x400000
push 0x94
mov dword [esi + 8], eax
mov dword [esi + 4], eax
lea eax, [ebp - 0x20]
push 0
push eax
mov dword [esi], 0x3c
mov byte [esi + 0xc], 0
call fcn.004665b0
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x10], 2
jne 0x4823b5
cmp dword [ebp - 0x1c], 5
jb 0x4823cd
jmp 0x4823c9
cmp dword [ebp - 0x10], 1
jne 0x4823cd
cmp dword [ebp - 0x1c], 4
ja 0x4823c9
jne 0x4823cd
cmp dword [ebp - 0x18], 0
jbe 0x4823cd
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x4a7bdc
call fcn.0040db41
test eax, eax
jge 0x4823ee
mov byte [0x4beae0], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.00464a9b
add ebp, 0x78
leave
ret
Function at 0x490690
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push 0xffffffffffffffff
push 0x49c018
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4bc660]
xor eax, esp
push eax
lea eax, [esp + 0x18]
mov dword fs:[0], eax
mov eax, dword [0x4c04ec]
test eax, eax
jne 0x4906c2
xor esi, esi
jmp 0x4906cb
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
mov dword [esp + 0x14], esi
test esi, esi
mov ebp, dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [esp + 0x20], 0
je 0x49070d
cmp dword [esi + 0x14], 0
jne 0x49074f
cmp dword [esi + 0x10], 0
jne 0x490755
push 0x4901b0
push 0x4c04e4
call fcn.004903b0
mov eax, dword [0x4c04ec]
add esp, 8
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test esi, esi
mov dword [esp + 0x20], 0xffffffff
je 0x49073b
lea ecx, [esi + 4]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x49073b
mov eax, dword [esi]
mov edx, dword [eax]
push 0
mov ecx, esi
call edx
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebp
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
cmp dword [esi + 0x10], 0
je 0x490795
mov ebx, dword [esi + 0x10]
mov eax, dword [ebx + 4]
mov dword [esi + 0x10], eax
mov ecx, dword [ebx]
test ecx, ecx
je 0x490783
mov edx, dword [ecx]
mov eax, dword [edx + 4]
call eax
mov edi, dword [ebx]
mov edx, dword [edi]
mov eax, dword [edx]
push 0
mov ecx, edi
call eax
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebp
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebp
cmp dword [esi + 0x10], 0
jne 0x490755
cmp dword [esi + 0x14], 0
je 0x4906e7
mov edi, dword [esi + 0x14]
mov ecx, dword [edi + 0x10]
mov dword [esi + 0x14], ecx
mov ecx, dword [edi + 4]
test ecx, ecx
je 0x4907ba
mov edx, dword [ecx]
mov eax, dword [edi + 0xc]
mov edx, dword [edx + 4]
push eax
call edx
mov ebx, dword [edi + 8]
test ebx, ebx
je 0x4907eb
lea eax, [ebx + 4]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x4907eb
mov edx, dword [ebx]
mov eax, dword [edx + 4]
mov ecx, ebx
call eax
lea ecx, [ebx + 8]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x4907eb
mov eax, dword [ebx]
mov edx, dword [eax + 8]
mov ecx, ebx
call edx
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebp
cmp dword [esi + 0x14], 0
jne 0x49079f
jmp 0x4906e1
Function at 0x490960
Capabilities:
Create thread
Resume thread

Disassembly:
push 0xffffffffffffffff
push 0x49c098
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x4bc660]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [edi]
lea ecx, [eax + 0x1c]
push ecx
push 4
push eax
push 0x490810
push 0
push 0
call fcn.0046703b
mov ebx, eax
add esp, 0x18
test ebx, ebx
jne 0x4909cb
lea ecx, [esp + 0x10]
call fcn.00466348
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x10], vtable.boost::thread_resource_error.0
lea edx, [esp + 0x10]
push edx
mov dword [esp + 0x2c], ebx
call fcn.0041243f
mov eax, dword [edi]
add eax, 4
mov ecx, 1
lock xadd dword [eax], ecx
mov esi, dword [edi]
mov eax, dword [esi + 8]
add esi, 8
test eax, eax
je 0x4909f1
cmp eax, 0xffffffff
je 0x4909f1
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi], ebx
mov edx, dword [edi]
mov eax, dword [edx + 8]
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x1c
ret
Function at 0x492170
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, dword [esp + 8]
cmp dword [eax + 0x18], 8
jb 0x49217f
mov eax, dword [eax + 4]
jmp 0x492182
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x49221a
push esi
call fcn.004915f0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
mov ecx, dword [esp + 0x10]
mov dword [ecx + 4], esi
mov dword [ecx], eax
pop esi
je 0x4921ff
cmp eax, 3
je 0x4921ff
cmp eax, 0x7b
je 0x4921ff
cmp eax, 0xf
je 0x4921ff
cmp eax, 0x15
je 0x4921ff
cmp eax, 0x57
je 0x4921ff
cmp eax, 0xa1
je 0x4921ff
cmp eax, 0x35
je 0x4921ff
cmp eax, 0x20
jne 0x4921f4
mov eax, dword [0x4c0548]
mov dword [ecx], eax
mov edx, dword [0x4c054c]
mov eax, dword [esp + 4]
mov dword [ecx + 4], edx
mov dword [eax], 9
ret
mov eax, dword [esp + 4]
mov dword [eax], 0
ret
mov eax, dword [0x4c0548]
mov dword [ecx], eax
mov edx, dword [0x4c054c]
mov eax, dword [esp + 4]
mov dword [ecx + 4], edx
mov dword [eax], 1
ret
mov edx, dword [0x4c0548]
mov ecx, dword [esp + 0xc]
mov dword [ecx], edx
mov edx, dword [0x4c054c]
test al, 0x10
mov dword [ecx + 4], edx
lea eax, [esp + 8]
mov dword [esp + 8], 3
jne 0x492247
mov dword [esp + 8], 2
mov ecx, dword [eax]
mov eax, dword [esp + 4]
mov dword [eax], ecx
ret
Function at 0x492270
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x49c27b
mov eax, dword fs:[0]
push eax
sub esp, 0x27c
mov eax, dword [0x4bc660]
xor eax, esp
mov dword [esp + 0x278], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4bc660]
xor eax, esp
push eax
lea eax, [esp + 0x290]
mov dword fs:[0], eax
mov ecx, dword [esp + 0x2ac]
mov eax, dword [esp + 0x2a8]
mov edx, dword [esp + 0x2b0]
mov ebp, dword [esp + 0x2a0]
mov ebx, dword [esp + 0x2a4]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x2b4]
xor esi, esi
push 0xffffffffffffffff
push esi
mov dword [esp + 0x20], ecx
push eax
lea ecx, [esp + 0x2c]
mov dword [esp + 0x20], edx
mov dword [esp + 0x44], 7
mov dword [esp + 0x40], esi
mov word [esp + 0x30], si
call fcn.00402109
mov eax, dword [esp + 0x34]
cmp eax, esi
mov dword [esp + 0x298], esi
je 0x492337
lea edi, [eax - 1]
cmp edi, eax
jbe 0x49231c
call fcn.00466937
cmp dword [esp + 0x38], 8
mov eax, dword [esp + 0x24]
jae 0x49232b
lea eax, [esp + 0x24]
cmp word [eax + edi*2], 0x5c
mov edx, 0x4a87a4
je 0x49233c
mov edx, 0x4a879c
mov eax, edx
lea edi, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x492341
sub eax, edi
sar eax, 1
push eax
push edx
lea ecx, [esp + 0x28]
call fcn.0040abf2
mov eax, dword [esp + 0x24]
mov edi, 8
cmp dword [esp + 0x38], edi
jae 0x49236e
lea eax, [esp + 0x24]
lea edx, [esp + 0x3c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
mov dword [ebx], eax
jne 0x4923b1
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx], esi
call edi
cmp eax, 2
je 0x492394
call edi
mov esi, eax
call fcn.004915f0
cmp dword [esp + 0x38], 8
mov dword [ebp], esi
mov dword [ebp + 4], eax
jb 0x492433
mov eax, dword [esp + 0x24]
push eax
jmp 0x49242b
lea eax, [esp + 0x68]
lea edx, [eax + 2]
jmp 0x4923c0
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x4923c0
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0x6c]
push ecx
mov ecx, dword [esp + 0x24]
call fcn.004023dc
test byte [esp + 0x3c], 0x10
je 0x4923fb
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov dword [edx], 3
mov dword [eax], 3
jmp 0x49240f
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [ecx], 2
mov dword [edx], 2
cmp dword [esp + 0x38], edi
mov eax, dword [0x4c0548]
mov dword [ebp], eax
mov ecx, dword [0x4c054c]
mov dword [ebp + 4], ecx
jb 0x492433
mov edx, dword [esp + 0x24]
push edx
call fcn.00464bde
add esp, 4
mov eax, ebp
mov ecx, dword [esp + 0x290]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x278]
xor ecx, esp
call fcn.00464a9b
add esp, 0x288
ret
Function at 0x402a58
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.0040447c
test esi, esi
jne 0x402a8e
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.0040456c
jmp 0x402aac
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.0040296c
mov edi, eax
test esi, esi
je 0x402aac
cmp dword [ebx], 0
je 0x402aac
dec esi
jmp 0x402a95
add esp, 0x108
pop edi
pop esi
pop ebx
ret

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

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

Function at 0x403580
Capabilities:
Query or enumerate registry value

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

Function at 0x404300
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x4cc04c], 0
je 0x404361
cmp word [0x4cc220], 0xd7b2
jne 0x404329
cmp dword [0x4cc228], 0
jbe 0x404329
mov eax, 0x4cc21c
call dword [0x4cc238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x4ca058
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 0x404388
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x4ca020], 0
jne 0x40437d
push 0
push 0x4ca078
push 0x4ca058
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret
Function at 0x40b748
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 0x40b781
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.0040456c
jmp 0x40b78a
mov eax, ebx
mov edx, esi
call fcn.004044d0
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

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

Function at 0x40be3c
Capabilities:
Write file on windows

Disassembly:
add esp, 0xfffffbbc
push 0x400
lea ecx, [esp + 0x48]
call 0x40bcb4
mov eax, dword [0x4cbe90]
cmp byte [eax], 0
je 0x40bea4
mov eax, dword [0x4cbc18]
call fcn.00402e14
push 0
lea eax, [esp + 4]
push eax
lea eax, [esp + 0x4c]
call fcn.00408f2c
push eax
lea eax, [esp + 0x50]
push eax
push 0xfffffffffffffff5
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 0x40beec
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_WriteFile_1
jmp 0x40beda
push 0x40
lea eax, [esp + 8]
push eax
mov eax, dword [0x4cbbc0]
mov eax, dword [eax + 4]
push eax
mov eax, dword [0x4cc718]
call fcn.00405c28
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 0x40cc38
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 0x40cc9c
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.004046e4
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_GetACP
mov edx, eax
pop eax
call fcn.00408b94
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40cca3
lea eax, [ebp - 0xc]
call fcn.0040447c
ret