joyce8/EMBER2024-capa huggingface dataset:
Function at 0x542e6b
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x6f9540]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x18], eax
call fcn.005396da
add eax, 0x50
lea edi, [ebp - 0x10]
mov dword [ebp - 0x14], eax
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.005396da
lea ecx, [ebp - 0x10]
xor edx, edx
mov dword [eax + 0x34c], ecx
lea ecx, [esi + 0x80]
mov eax, dword [ebp - 0x14]
mov dword [eax], esi
lea edi, [eax + 4]
mov dword [edi], ecx
test ecx, ecx
je 0x542ee2
cmp word [ecx], dx
je 0x542ee2
mov eax, dword [0x6ca82c]
push edi
dec eax
push eax
push 0x6ca718
call fcn.00542e0a
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x542f55
cmp word [eax], dx
je 0x542f55
mov eax, dword [edi]
test eax, eax
je 0x542f06
cmp word [eax], dx
je 0x542f06
lea eax, [ebp - 0x10]
push eax
call fcn.005427ed
jmp 0x542f0f
lea eax, [ebp - 0x10]
push eax
call fcn.00542888
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x542f7f
mov eax, dword [0x6ca714]
push dword [ebp - 0x14]
dec eax
push eax
push 0x6ca408
call fcn.00542e0a
add esp, 0xc
test al, al
je 0x542f7f
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x542f4a
cmp word [eax], di
je 0x542f4a
lea eax, [ebp - 0x10]
push eax
call fcn.005427ed
pop ecx
jmp 0x542f81
lea eax, [ebp - 0x10]
push eax
call fcn.00542888
jmp 0x542f47
mov eax, dword [edi]
test eax, eax
je 0x542f6c
cmp word [eax], dx
je 0x542f6c
lea eax, [ebp - 0x10]
push eax
call fcn.005427a2
pop ecx
jmp 0x542f7f
mov dword [ebp - 0x10], 0x104
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
xor edi, edi
cmp dword [ebp - 0x10], 0
je 0x54304a
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.00542c8f
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x54304a
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x54304a
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x54304a
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x542fd7
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.0053b993
test ebx, ebx
je 0x543045
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.0053b993
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x54304a
push 0x40
lea eax, [ebx + 0x80]
push eax
push 0x1002
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x54304a
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.00549181
add esp, 0x10
xor eax, eax
inc eax
jmp 0x54304c
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00524b20
leave
ret
Function at 0x5495b0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x5495dd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x5495dd
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x404680
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov eax, dword [0x40d040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
lea eax, [ebp - 0x60]
mov dword [ebp - 0x50], 0x44
push eax
lea eax, [ebp - 0x50]
xorps xmm0, xmm0
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push ecx
push ecx
movlpd qword [ebp - 0x4c], xmm0
movlpd qword [ebp - 0x44], xmm0
movlpd qword [ebp - 0x3c], xmm0
movlpd qword [ebp - 0x34], xmm0
movlpd qword [ebp - 0x2c], xmm0
movlpd qword [ebp - 0x24], xmm0
movlpd qword [ebp - 0x1c], xmm0
movlpd qword [ebp - 0x14], xmm0
movups xmmword [ebp - 0x60], xmm0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
push dword [ebp - 0x60]
test eax, eax
setne bl
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov al, bl
xor ecx, ebp
pop ebx
call fcn.00408682
mov esp, ebp
pop ebp
ret
Function at 0x4072a4
Capabilities:
Enumerate threads

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x40d040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor edi, edi
mov esi, ecx
push edi
push 4
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov ebx, eax
mov dword [ebp - 0x24], ebx
cmp ebx, 0xffffffff
je 0x4073af
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0x1c
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_Thread32First]
test eax, eax
je 0x4073a8
inc edi
cmp dword [ebp - 0x20], 0x10
jb 0x40736c
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [ebp - 0x14], eax
jne 0x40736c
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [ebp - 0x18], eax
je 0x40736c
mov edx, dword [esi]
test edx, edx
jne 0x407335
push 0x200
push edx
push dword [0x40d83c]
mov dword [esi + 4], 0x80
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esi], edx
test edx, edx
je 0x407391
lea ebx, [esi + 8]
jmp 0x40735f
mov eax, dword [esi + 4]
lea ebx, [esi + 8]
cmp dword [ebx], eax
jb 0x40735f
add eax, eax
mov dword [esi + 4], eax
shl eax, 2
push eax
push edx
push 0
push dword [0x40d83c]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov edx, eax
test edx, edx
je 0x4073c0
mov dword [esi], edx
mov ecx, dword [ebx]
mov eax, dword [ebp - 0x18]
mov dword [edx + ecx*4], eax
inc dword [ebx]
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0x1c
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_Thread32Next]
test eax, eax
jne 0x4072ed
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
je 0x4073a8
xor edi, edi
cmp dword [esi], edi
je 0x4073a8
push dword [esi]
push edi
push dword [0x40d83c]
call dword [sym.imp.KERNEL32.dll_HeapFree]
and dword [esi], edi
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00408682
leave
ret
mov ebx, dword [ebp - 0x24]
jmp 0x407391

Function at 0x4073c5
Capabilities:
Suspend thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push edi
mov edi, ecx
mov dword [ebp - 0xc], edx
xor esi, esi
mov dword [edi], esi
mov dword [edi + 4], esi
mov dword [edi + 8], esi
call fcn.004072a4
test eax, eax
jne 0x4073ea
push 9
pop esi
jmp 0x40744a
cmp dword [edi], esi
je 0x40744a
push ebx
mov ebx, esi
cmp dword [edi + 8], esi
jbe 0x407449
mov eax, dword [edi]
push dword [eax + ebx*4]
push esi
push 0x5a
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov dword [ebp - 4], eax
mov dword [ebp - 8], esi
test eax, eax
je 0x40743e
push eax
call dword [sym.imp.KERNEL32.dll_SuspendThread]
cmp eax, 0xffffffff
je 0x407430
push dword [ebp + 8]
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
mov dword [ebp - 8], 1
call fcn.0040714f
pop ecx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 8], esi
jne 0x407443
mov ecx, dword [edi]
mov dword [ecx + ebx*4], esi
inc ebx
cmp ebx, dword [edi + 8]
jb 0x4073f6
pop ebx
pop edi
mov eax, esi
pop esi
leave
ret
Function at 0x407450
Capabilities:
Resume thread

Disassembly:
push esi
mov esi, ecx
cmp dword [esi], 0
je 0x4074a2
push edi
xor edi, edi
cmp dword [esi + 8], edi
jbe 0x407491
push ebx
mov eax, dword [esi]
cmp dword [eax + edi*4], 0
je 0x40748a
push dword [eax + edi*4]
push 0
push 0x5a
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov ebx, eax
test ebx, ebx
je 0x40748a
push ebx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc edi
cmp edi, dword [esi + 8]
jb 0x407461
pop ebx
push dword [esi]
push 0
push dword [0x40d83c]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
ret

Function at 0x4074a4
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
imul esi, ecx, 0x2c
push edi
mov edi, edx
mov dword [ebp - 0x10], edi
add esi, dword [0x40d8c0]
mov dword [ebp - 8], esi
mov al, byte [esi + 0x14]
mov ebx, dword [esi]
and al, 1
je 0x4074ca
sub ebx, 5
movzx eax, al
lea ecx, [ebp - 4]
push ecx
push 0x40
lea eax, [eax*2 + 5]
push eax
push ebx
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x4074f1
push 0xa
pop eax
jmp 0x407571
test edi, edi
je 0x407512
mov byte [ebx], 0xe9
mov eax, dword [esi + 4]
sub eax, ebx
sub eax, 5
mov dword [ebx + 1], eax
test byte [esi + 0x14], 1
je 0x407531
mov eax, dword [esi]
mov word [eax], 0xf9eb
jmp 0x407531
test byte [esi + 0x14], 1
je 0x407526
lea esi, [esi + 0xc]
mov edi, ebx
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 8]
jmp 0x407531
mov eax, dword [esi + 0xc]
mov dword [ebx], eax
mov al, byte [esi + 0x10]
mov byte [ebx + 4], al
mov edi, dword [ebp - 0xc]
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov edx, dword [ebp - 0x10]
mov cl, dl
add cl, cl
shl dl, 2
xor cl, byte [esi + 0x14]
and cl, 2
xor cl, byte [esi + 0x14]
xor dl, cl
and dl, 4
xor dl, cl
xor eax, eax
mov byte [esi + 0x14], dl
pop edi
pop esi
pop ebx
leave
ret

Function at 0x407a6d
Capabilities:
Allocate or change rwx memory

Disassembly:
mov edx, dword [0x40d8b4]
push esi
xor esi, esi
jmp 0x407a7f
cmp dword [edx + 4], esi
jne 0x407acb
mov edx, dword [edx]
test edx, edx
jne 0x407a78
push 0x40
push 0x3000
push 0x1000
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edx, eax
test edx, edx
je 0x407ad8
push edi
push 0x20
lea ecx, [edx + 0x20]
mov dword [edx + 8], esi
pop edi
mov dword [ecx], esi
mov eax, ecx
mov dword [edx + 4], ecx
add edi, 0x20
add ecx, 0x20
mov esi, eax
cmp edi, 0xfe0
jbe 0x407aa6
mov eax, dword [0x40d8b4]
pop edi
mov dword [edx], eax
mov dword [0x40d8b4], edx
mov eax, dword [edx + 4]
pop esi
mov ecx, dword [eax]
inc dword [edx + 8]
mov dword [edx + 4], ecx
ret
xor eax, eax
pop esi
ret
Function at 0x4080e4
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
push ecx
push 2
lea eax, [ebp - 4]
push eax
push 0x20000001
push str._x_sys_default_locale
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
xor ecx, ecx
test eax, eax
jne 0x40810b
mov eax, ecx
mov dword [ebp - 4], eax
jmp 0x40810e
mov eax, dword [ebp - 4]
push esi
mov esi, dword [ebp + 0xc]
push ecx
push ecx
push esi
push eax
push dword [ebp + 8]
push ecx
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push eax
push dword [esi]
call fcn.004080c0
pop esi
leave
ret 8

Function at 0x4085b0
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
mov edx, esi
sub edx, eax
mov ecx, edx
and ecx, 0xffffffe0
push edi
mov di, word [ebp + 0x10]
mov dword [ebp - 4], ecx
je 0x40860f
mov ecx, dword [0x40d090]
shr ecx, 5
test cl, 1
je 0x40860f
add dword [ebp - 4], eax
movsx ecx, di
vmovd xmm0, ecx
vpunpcklwd xmm0, xmm0, xmm0
vpshufd xmm0, xmm0, 0
vinsertf128 ymm1, ymm0, xmm0, 1
vpcmpeqw ymm0, ymm1, ymmword [eax]
vpmovmskb ecx, ymm0
test ecx, ecx
jne 0x408664
add eax, 0x20
cmp eax, dword [ebp - 4]
jne 0x4085f5
and edx, 0x1f
vzeroupper
and edx, 0xfffffff0
je 0x408649
mov ecx, dword [0x40d090]
shr ecx, 1
test cl, 1
je 0x408649
movsx ecx, di
add edx, eax
movd xmm0, ecx
punpcklwd xmm0, xmm0
pshufd xmm1, xmm0, 0
movups xmm0, xmmword [eax]
pcmpeqw xmm0, xmm1
pmovmskb ecx, xmm0
test ecx, ecx
jne 0x408675
add eax, 0x10
cmp eax, edx
jne 0x408633
cmp eax, esi
je 0x40865c
lea ecx, [ecx]
cmp word [eax], di
je 0x40865c
add eax, 2
cmp eax, esi
jne 0x408650
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc
vzeroupper
tzcnt ecx, ecx
pop edi
add eax, ecx
pop esi
mov esp, ebp
pop ebp
ret 0xc
bsf ecx, ecx
pop edi
add eax, ecx
pop esi
mov esp, ebp
pop ebp
ret 0xc

Function at 0x409173
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x4091b2
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4091b2
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4091b2
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x4091b2
cmp dword [ecx + 0x74], 0xe
jbe 0x4091b2
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x40310c
Capabilities:
Generate random numbers using the delphi lcg

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

Function at 0x41bc14
Capabilities:
Encode data using xor

Disassembly:
mov ecx, edx
push eax
pop edx
sub eax, eax
rol ax, 5
xor al, byte [edx]
inc edx
dec ecx
jne 0x41bc1a
ret

Function at 0x44d628
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffe8
push edx
pop ebp
mov ebx, eax
xor eax, eax
mov dword [esp], eax
mov eax, dword [ebx + 0x3c]
add eax, ebx
mov edx, dword [eax + 0x78]
mov dword [esp + 4], edx
mov edx, dword [eax + 0x7c]
mov dword [esp + 8], edx
mov eax, dword [esp + 4]
add eax, ebx
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0xc]
mov edi, dword [eax + 0x18]
dec edi
or edi, edi
jb 0x44d6c6
inc edi
sub esi, esi
mov eax, dword [esp + 0xc]
mov eax, dword [eax + 0x20]
add eax, ebx
mov edx, esi
shl edx, 2
add eax, edx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 0xc]
add eax, ebx
push eax
push ebp
call fcn.00406744
or eax, eax
jne 0x44d6c2
mov eax, dword [esp + 0xc]
mov eax, dword [eax + 0x24]
add eax, ebx
push esi
pop edx
add edx, edx
add eax, edx
mov ax, word [eax]
add ax, 3
mov edx, dword [esp + 0xc]
mov edx, dword [edx + 0x1c]
add edx, ebx
movzx eax, ax
shl eax, 2
add edx, eax
mov dword [esp + 0x14], edx
mov eax, dword [esp + 0x14]
add ebx, dword [eax]
mov dword [esp], ebx
jmp 0x44d6c6
inc esi
dec edi
jne 0x44d664
mov eax, dword [esp]
add esp, 0x18
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x44e5d4
Capabilities:
Encode data using xor

Disassembly:
push ebp
push esp
pop ebp
add esp, 0xffffffe0
push ebx
push esi
push edi
sub ecx, ecx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00404914
mov edi, dword [ebp + 8]
add edi, 0xffffff00
xor eax, eax
push ebp
push 0x44e6ed
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 0x5a
xor ebx, ebx
xor esi, esi
mov eax, dword [ebp - 4]
call fcn.00404724
test eax, eax
jle 0x44e6bc
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0xc], 1
mov eax, dword [ebp - 0x18]
add eax, 0xa6
sub edx, edx
push edx
push eax
lea eax, [ebx + 1]
cdq
call fcn.00405230
mov ebx, eax
mov eax, dword [ebp - 0x18]
add eax, 0xa6
sub edx, edx
push edx
push eax
sub eax, eax
mov al, byte [edi + ebx]
add eax, esi
cdq
call fcn.00405230
push eax
pop esi
mov al, byte [edi + ebx]
mov dl, byte [edi + esi]
mov byte [edi + ebx], dl
mov byte [edi + esi], al
xor eax, eax
mov al, byte [edi + ebx]
sub edx, edx
mov dl, byte [edi + esi]
add eax, edx
mov edx, dword [ebp - 0x18]
add edx, 0xa6
push edx
pop ecx
xor edx, edx
div ecx
mov al, byte [edi + edx]
mov byte [ebp - 0xd], al
lea eax, [ebp - 0x20]
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 0xc]
mov dl, byte [edx + ecx - 1]
mov cl, byte [ebp - 0xd]
xor dl, cl
call fcn.0040464c
mov edx, dword [ebp - 0x20]
lea eax, [ebp - 0x14]
call fcn.0040472c
inc dword [ebp - 0xc]
dec dword [ebp - 0x1c]
jne 0x44e62f
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x14]
call fcn.004044b8
sub eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x44e6f4
lea eax, [ebp - 0x20]
call fcn.00404464
lea eax, [ebp - 0x14]
call fcn.00404464
lea eax, [ebp - 4]
call fcn.00404464
ret
Function at 0x406b9c
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebx
push esi
add esp, 0xfffffbe4
mov esi, edx
mov ebx, eax
test bl, bl
je 0x406bde
movzx eax, bl
add ax, 0x41
dec eax
mov word [esp], ax
mov word [esp + 2], 0x3a
mov word [esp + 4], 0
lea eax, [esp + 0x212]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryW
push esp
call sub.kernel32.dll_SetCurrentDirectoryW
lea eax, [esp + 8]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryW
test bl, bl
je 0x406bfe
lea eax, [esp + 0x212]
push eax
call sub.kernel32.dll_SetCurrentDirectoryW
mov eax, esi
lea edx, [esp + 8]
mov ecx, 0x105
call fcn.0040ad1c
add esp, 0x41c
pop esi
pop ebx
ret

Function at 0x406df4
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.0040a0e8
test esi, esi
jne 0x406e2a
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.0040a270
jmp 0x406e48
call sub.kernel32.dll_GetCommandLineW
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00406d38
mov edi, eax
test esi, esi
je 0x406e48
cmp dword [ebx], 0
je 0x406e48
dec esi
jmp 0x406e31
add esp, 0x20c
pop edi
pop esi
pop ebx
ret
Function at 0x408dc4
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.0040920c
mov byte [esp], al
cmp byte [esp], 0
jne 0x408f4e
test edi, edi
je 0x408f4e
mov byte [esp + 1], 0
test ebp, ebp
jle 0x408e8e
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
xor eax, eax
mov dword [esp + 0xc], eax
test ebp, ebp
jle 0x408e69
cmp edi, 0xffffffff
je 0x408e29
call sub.kernel32.dll_GetTickCount
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x408e29
mov byte [esp], 0
jmp 0x408f4e
mov ebx, dword [esi]
cmp ebx, 1
jg 0x408e69
test ebx, ebx
jne 0x408e5b
xor eax, eax
mov edx, 1
lock cmpxchg dword [esi], edx
test eax, eax
jne 0x408e5b
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
mov byte [esp], 1
jmp 0x408f4e
lea eax, [esp + 0xc]
call fcn.00408aa4
dec ebp
test ebp, ebp
jg 0x408e0e
cmp edi, 0xffffffff
je 0x408e8e
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x408e8c
mov byte [esp], 0
jmp 0x408f4e
sub edi, eax
mov ebx, dword [esi]
test ebx, ebx
je 0x408dd2
lea edx, [ebx + 2]
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x408e8e
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
mov eax, esi
call fcn.00408fbc
mov edx, eax
mov ebx, dword [0x5168f8]
mov ecx, edi
xor eax, eax
call dword [ebx + 0x10]
test eax, eax
sete byte [esp]
cmp edi, 0xffffffff
je 0x408ef2
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
jbe 0x408ef0
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
sub edi, eax
jmp 0x408ef2
xor edi, edi
cmp byte [esp], 0
je 0x408f18
mov ebx, dword [esi]
test bl, 1
jne 0x408f2e
mov edx, ebx
sub edx, 2
or edx, 1
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x408ef8
mov byte [esp + 1], 1
jmp 0x408f2e
mov ebx, dword [esi]
mov edx, ebx
sub edx, 2
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x408f18
mov byte [esp + 1], 1
cmp byte [esp + 1], 0
je 0x408ea5
cmp byte [esp], 0
je 0x408f4e
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 0x409d78
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x516058], 0
je 0x409ddf
cmp word [0x516344], 0xd7b2
jne 0x409da1
cmp dword [0x51634c], 0
jbe 0x409da1
mov eax, 0x516340
call dword [0x51635c]
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, 0x409e0c
call fcn.0040a97c
push eax
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x50e032], 0
jne 0x409dfb
push 0
push 0x50e9ca
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret
Function at 0x409fa8
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 [0x50e034], 0
je 0x409fd3
mov edx, edi
mov eax, esi
call dword [0x50e034]
mov ebx, eax
jmp 0x409fe4
mov eax, 8
call fcn.00406a18
mov ebx, eax
mov dword [ebx], esi
mov dword [ebx + 4], edi
mov byte [0x516059], 1
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp + 0xc]
push eax
push ebx
mov eax, 0x409f70
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 0x40a014
mov eax, ebx
call fcn.00406a34
mov eax, esi
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret 0xc

Function at 0x40c8ec
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 0x40ca51
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call fcn.0040a0e8
cmp si, word [0x50ea08]
jb 0x40c984
cmp si, word [0x50ec08]
ja 0x40c984
mov edi, 0x40
xor eax, eax
mov dword [ebp - 8], eax
cmp edi, dword [ebp - 8]
jb 0x40c984
mov ebx, edi
add ebx, dword [ebp - 8]
shr ebx, 1
cmp si, word [ebx*8 + 0x50ea08]
jae 0x40c95e
mov edi, ebx
dec edi
jmp 0x40c97f
cmp si, word [ebx*8 + 0x50ea08]
jbe 0x40c96e
inc ebx
mov dword [ebp - 8], ebx
jmp 0x40c97f
mov edx, dword [ebp - 4]
mov eax, dword [ebx*8 + 0x50ea0c]
call fcn.0040c80c
jmp 0x40c984
cmp edi, dword [ebp - 8]
jae 0x40c948
mov eax, dword [ebp - 4]
cmp dword [eax], 0
jne 0x40ca33
push 2
movzx eax, si
push eax
call sub.kernel32.dll_IsValidLocale
test eax, eax
je 0x40ca33
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.0040ad1c
push dword [ebp - 0x160]
push 0x40ca6c
lea eax, [ebp - 0x164]
lea edx, [ebp - 0x15c]
mov ecx, 0x55
call fcn.0040ad1c
push dword [ebp - 0x164]
push 0x40ca7c
lea eax, [ebp - 0x168]
lea edx, [ebp - 0xb2]
mov ecx, 0x55
call fcn.0040ad1c
push dword [ebp - 0x168]
mov eax, dword [ebp - 4]
mov edx, 5
call fcn.0040af54
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40ca58
lea eax, [ebp - 0x168]
mov edx, 3
call fcn.0040a148
ret