joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100222b
Capabilities:
Enumerate network shares

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
push esi
push edi
mov dword [ebp - 8], eax
lea eax, [ebp - 0x10]
mov esi, 0x1000
push eax
push esi
mov dword [ebp - 0x14], esi
call fcn.01005451
xor edi, edi
cmp eax, edi
je 0x100225c
push eax
call fcn.0100524c
lea eax, [ebp - 0x18]
push eax
push edi
push edi
push edi
push 3
call sub.MPR.dll_WNetOpenEnumW
cmp eax, edi
jne 0x10023d1
or dword [ebp + 8], 0xffffffff
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x10]
lea eax, [ebp + 8]
push eax
push dword [ebp - 0x18]
call sub.MPR.dll_WNetEnumResourceW
cmp eax, edi
mov dword [ebp - 0x1c], eax
je 0x100229b
cmp eax, 0x103
jne 0x10023d1
cmp dword [ebp + 8], 0xffffffff
je 0x10023c7
cmp dword [ebp + 8], edi
je 0x10023c7
mov dword [ebp - 0xc], edi
jbe 0x10023a2
mov esi, dword [ebp - 0x10]
add esi, 0x10
mov eax, dword [ebp + 0xc]
and dword [ebp - 4], 0
cmp dword [ebp - 8], 0
mov edi, dword [eax]
jbe 0x1002313
mov eax, dword [edi]
test eax, eax
je 0x10022fd
mov ecx, dword [esi]
test ecx, ecx
je 0x10022fd
cmp word [eax], 0
je 0x10022f7
push eax
call dword [sym.imp.msvcrt.dll_wcslen]
push eax
push dword [edi]
push dword [esi]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0x10
test eax, eax
jmp 0x10022fb
cmp word [ecx], 0
je 0x100230b
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
add edi, 0x20
cmp eax, dword [ebp - 8]
jb 0x10022cc
mov eax, dword [ebp - 8]
cmp dword [ebp - 4], eax
jb 0x1002389
mov ecx, dword [ebp + 0x10]
mov eax, dword [ecx]
cmp dword [ebx], eax
jb 0x1002335
push dword [ebp + 0xc]
add eax, 0x40
mov dword [ecx], eax
shl eax, 5
push eax
call fcn.01005461
test eax, eax
jne 0x10023d1
mov eax, dword [ebx]
mov ecx, dword [ebp + 0xc]
mov edi, dword [0x10092dc]
shl eax, 5
add eax, dword [ecx]
mov ecx, dword [esi]
test ecx, ecx
jne 0x100234d
mov ecx, edi
mov dword [eax], ecx
mov edx, dword [esi + 4]
test edx, edx
jne 0x1002358
mov edx, edi
mov dword [eax + 4], edx
mov edx, dword [esi + 0xc]
test edx, edx
jne 0x1002364
mov edx, edi
mov dword [eax + 8], edx
mov edx, dword [esi - 0xc]
mov dword [eax + 0xc], edx
xor edx, edx
push ecx
mov dword [eax + 0x1c], edx
mov dword [eax + 0x10], 0xfffe
mov dword [eax + 0x18], edx
mov dword [eax + 0x14], edx
call dword [sym.imp.msvcrt.dll__wcsupr]
inc dword [ebx]
pop ecx
inc dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
add esi, 0x20
cmp eax, dword [ebp + 8]
jb 0x10022bd
xor edi, edi
mov esi, 0x1000
cmp dword [ebp - 0x1c], edi
jne 0x10023c7
lea eax, [ebp - 0x10]
push eax
push esi
mov dword [ebp - 0x14], esi
call fcn.01005451
cmp eax, edi
je 0x1002272
push eax
call fcn.0100524c
jmp 0x1002272
push dword [ebp - 0x18]
call sub.MPR.dll_WNetCloseEnum
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x1002a7a
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push esi
lea ecx, [ebp - 8]
mov eax, 0x200
xor esi, esi
push ecx
inc esi
push eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], esi
call fcn.01005451
test eax, eax
je 0x1002aa5
push eax
call fcn.0100524c
lea eax, [ebp - 4]
push eax
push esi
push 0
push 0x1001300
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x1002ac4
xor eax, eax
jmp 0x1002b3a
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push ebx
push edi
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 8]
lea eax, [ebp - 0x10]
push eax
push 0
mov edi, 0x10012f4
push edi
push dword [ebp - 4]
call esi
mov ebx, eax
cmp ebx, 0xea
jne 0x1002b24
lea eax, [ebp - 8]
push eax
push dword [ebp - 0xc]
call fcn.01005451
mov ebx, eax
test ebx, ebx
je 0x1002b0f
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebx
call fcn.0100524c
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 8]
lea eax, [ebp - 0x10]
push eax
push 0
push edi
push dword [ebp - 4]
call esi
mov ebx, eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
neg eax
sbb eax, eax
not eax
and eax, dword [ebp - 8]
pop edi
pop ebx
pop esi
leave
ret
Function at 0x1003aed
Capabilities:
Connect network resource
Enumerate network shares

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
push ebx
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], eax
mov eax, 0x2000
push ecx
xor ebx, ebx
push eax
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x1c], eax
call fcn.01005451
cmp eax, ebx
jne 0x1003ca0
push esi
push edi
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 8]
push ebx
push ebx
push 2
call sub.MPR.dll_WNetOpenEnumW
mov edi, eax
mov esi, 0x4dc
cmp edi, esi
jne 0x1003c4d
push ebx
push ebx
push ebx
push dword [ebp + 8]
call sub.MPR.dll_WNetAddConnection2W
test eax, eax
jne 0x1003c4b
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 8]
push ebx
push ebx
push 2
call sub.MPR.dll_WNetOpenEnumW
mov edi, eax
cmp edi, ebx
jne 0x1003c3c
mov dword [ebp - 0x10], 1
mov edi, dword [ebp + 0x14]
or dword [ebp - 8], 0xffffffff
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x14]
lea eax, [ebp - 8]
push eax
push dword [ebp - 0xc]
call sub.MPR.dll_WNetEnumResourceW
cmp eax, ebx
mov dword [ebp - 0x18], eax
je 0x1003b9e
cmp eax, 0x103
jne 0x1003c81
cmp dword [ebp - 8], 0xffffffff
je 0x1003c77
cmp dword [ebp - 8], ebx
mov esi, dword [ebp - 0x14]
mov dword [ebp + 0x14], ebx
jbe 0x1003c04
mov eax, dword [ebp - 4]
add dword [ebp - 4], 4
mov ecx, dword [ebp + 0xc]
mov dword [eax], esi
inc dword [edi]
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov ecx, dword [ecx]
add ecx, eax
cmp dword [ebp - 4], ecx
jb 0x1003bf6
push dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
add eax, eax
push eax
mov dword [ecx], eax
call fcn.01005461
cmp eax, ebx
je 0x1003be9
push eax
call fcn.0100524c
mov ecx, dword [ebp + 0xc]
mov eax, dword [edi]
mov ecx, dword [ecx]
lea eax, [ecx + eax*4]
mov dword [ebp - 4], eax
inc dword [ebp + 0x14]
mov eax, dword [ebp + 0x14]
add esi, 0x20
cmp eax, dword [ebp - 8]
jb 0x1003bb3
cmp dword [ebp - 0x18], ebx
jne 0x1003c59
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x1c]
call fcn.01005451
mov esi, eax
cmp esi, ebx
je 0x1003b75
cmp dword [ebp - 0x10], ebx
je 0x1003c31
mov eax, dword [ebp + 8]
push ebx
push ebx
push dword [eax + 0x14]
call sub.MPR.dll_WNetCancelConnection2W
push esi
call fcn.0100524c
jmp 0x1003b75
mov eax, dword [ebp + 8]
push ebx
push ebx
push dword [eax + 0x14]
call sub.MPR.dll_WNetCancelConnection2W
jmp 0x1003c4d
mov edi, esi
cmp edi, ebx
je 0x1003b72
mov eax, edi
jmp 0x1003c9e
push dword [ebp - 0xc]
call sub.MPR.dll_WNetCloseEnum
cmp dword [ebp - 0x10], ebx
je 0x1003c73
mov eax, dword [ebp + 8]
push ebx
push ebx
push dword [eax + 0x14]
call sub.MPR.dll_WNetCancelConnection2W
xor eax, eax
jmp 0x1003c9e
cmp eax, 0x103
jne 0x1003c81
mov dword [ebp - 0x18], ebx
push dword [ebp - 0xc]
call sub.MPR.dll_WNetCloseEnum
cmp dword [ebp - 0x10], ebx
je 0x1003c9b
mov eax, dword [ebp + 8]
push ebx
push ebx
push dword [eax + 0x14]
call sub.MPR.dll_WNetCancelConnection2W
mov eax, dword [ebp - 0x18]
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x1003caa
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
xor eax, eax
lea ecx, [ebp - 4]
push ecx
inc eax
push eax
push 0
push 0x1001420
push 0x80000002
mov dword [ebp - 8], 0x200
mov dword [ebp - 0xc], eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x1003cde
xor eax, eax
jmp 0x1003d13
push esi
push edi
lea eax, [ebp - 8]
push eax
mov esi, 0x100c2e8
push esi
lea eax, [ebp - 0xc]
push eax
push 0
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 4]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
neg eax
sbb eax, eax
not eax
pop edi
and eax, esi
pop esi
leave
ret 4

Function at 0x1003d1c
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x614
mov eax, dword [0x100933c]
push edi
mov dword [ebp - 4], eax
lea eax, [ebp - 0x60c]
push eax
push 1
xor edi, edi
push edi
push 0x1001420
push 0x80000002
mov dword [ebp - 0x608], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, edi
je 0x1003d69
cmp eax, 2
jne 0x1003e25
mov eax, 0x4b4
jmp 0x1003e25
push ebx
push esi
xor ebx, ebx
lea eax, [ebp - 0x610]
push eax
lea eax, [ebp - 0x604]
push eax
push edi
push edi
lea eax, [ebp - 0x614]
push eax
lea eax, [ebp - 0x204]
push eax
push ebx
push dword [ebp - 0x60c]
mov dword [ebp - 0x614], 0x100
mov dword [ebp - 0x610], 0x400
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
mov esi, eax
cmp esi, edi
jne 0x1003dee
cmp dword [ebp - 0x608], edi
jne 0x1003dd3
call fcn.010051a6
push 0x1262
call fcn.010051d2
mov dword [ebp - 0x608], 1
lea eax, [ebp - 0x604]
push eax
lea eax, [ebp - 0x204]
push eax
push 0x1001498
call fcn.01004e56
add esp, 0xc
inc ebx
cmp esi, edi
je 0x1003d6d
push dword [ebp - 0x60c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, 0x103
jne 0x1003e21
mov eax, dword [ebp - 0x608]
neg eax
sbb eax, eax
and eax, 0xfffffb4c
add eax, 0x4b4
jmp 0x1003e23
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
pop edi
call fcn.010048b9
leave
ret
Function at 0x10049d1
Capabilities:
Parse pe header

Disassembly:
push 0x28
push 0x1001508
call fcn.01004bc8
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp word [eax], 0x5a4d
jne 0x1004a0c
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x1004a0c
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x1004a24
cmp eax, 0x20b
je 0x1004a11
mov dword [ebp - 0x1c], edi
jmp 0x1004a38
cmp dword [ecx + 0x84], 0xe
jbe 0x1004a0c
xor eax, eax
cmp dword [ecx + 0xf8], edi
jmp 0x1004a32
cmp dword [ecx + 0x74], 0xe
jbe 0x1004a0c
xor eax, eax
cmp dword [ecx + 0xe8], edi
setne al
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], edi
push 1
call dword [sym.imp.msvcrt.dll___set_app_type]
pop ecx
or dword [0x100fb80], 0xffffffff
or dword [0x100fb84], 0xffffffff
call dword [sym.imp.msvcrt.dll___p__fmode]
mov ecx, dword [0x100c4f4]
mov dword [eax], ecx
call dword [sym.imp.msvcrt.dll___p__commode]
mov ecx, dword [0x100c4f0]
mov dword [eax], ecx
mov eax, dword [sym.imp.msvcrt.dll__adjust_fdiv]
mov eax, dword [eax]
mov dword [0x100fb88], eax
call fcn.01004bc0
cmp dword [0x1009340], edi
jne 0x1004a93
push fcn.01004bc0
call dword [sym.imp.msvcrt.dll___setusermatherr]
pop ecx
call fcn.01004ba9
push 0x1009010
push 0x100900c
call sub.msvcrt.dll__initterm
mov eax, dword [0x100c4ec]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
push eax
push dword [0x100c4e8]
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.msvcrt.dll___getmainargs]
mov dword [ebp - 0x34], eax
push 0x1009008
push section..data
call sub.msvcrt.dll__initterm
mov eax, dword [ebp - 0x20]
mov ecx, dword [sym.imp.msvcrt.dll___initenv]
mov dword [ecx], eax
push dword [ebp - 0x20]
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
call fcn.01001a44
add esp, 0x30
mov esi, eax
mov dword [ebp - 0x38], esi
cmp dword [ebp - 0x1c], edi
jne 0x1004b0a
push esi
call dword [sym.imp.msvcrt.dll_exit]
call dword [sym.imp.msvcrt.dll__cexit]
jmp 0x1004b3f
or dword [ebp - 4], 0xffffffff
mov eax, esi
call fcn.01004c03
ret
Function at 0x1005ff7
Capabilities:
Terminate process

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x418
mov eax, dword [0x100933c]
push ebx
mov bl, byte [ebp + 0x18]
test bl, 4
push esi
mov esi, dword [ebp + 0x14]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x1c]
mov dword [ebp - 0x410], esi
je 0x1006031
test bl, 0xa
je 0x1006031
push 0x57
pop eax
jmp 0x10060f1
xor ecx, ecx
mov cl, bl
and ecx, 8
mov dword [ebp - 0x418], ecx
xor ecx, ecx
mov cl, bl
and ecx, 2
mov dword [ebp - 0x414], ecx
lea ecx, [ebp - 0x40c]
push ecx
push dword [ebp + 0x10]
lea ecx, [ebp - 0x404]
push 0x200
push ecx
push dword [ebp + 0xc]
push eax
call fcn.01007f27
test eax, eax
mov dword [ebp - 0x408], eax
je 0x1006079
test bl, 4
jne 0x10060b3
push dword [ebp - 0x40c]
lea eax, [ebp - 0x404]
push eax
mov esi, 0x1012240
push esi
call dword [sym.imp.msvcrt.dll_wcsncpy]
mov eax, dword [ebp - 0x40c]
and word [eax*2 + 0x1012240], 0
add esp, 0xc
push 0
push esi
push edi
call fcn.010077f7
mov esi, dword [ebp - 0x410]
xor eax, eax
cmp esi, eax
je 0x10060c1
mov ecx, dword [ebp - 0x40c]
mov dword [esi], ecx
cmp word [ebp - 0x418], ax
je 0x10060da
cmp dword [ebp - 0x408], eax
je 0x10060da
push dword [ebp - 0x408]
jmp 0x10060e5
cmp word [ebp - 0x414], ax
je 0x10060eb
push 0xffffffffffffffff
call dword [sym.imp.msvcrt.dll_exit]
mov eax, dword [ebp - 0x408]
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.010048b9
leave
ret 0x18

Function at 0x100644b
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
and dword [ebp - 4], 0
and dword [ebp - 8], 0
push ebx
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 8]
call dword [sym.imp.msvcrt.dll_ftell]
test eax, eax
mov esi, dword [sym.imp.msvcrt.dll_fread]
pop ecx
jne 0x10064ae
push dword [ebp + 0x10]
lea eax, [ebp - 4]
push 1
push 2
push eax
call esi
add esp, 0x10
cmp dword [ebp - 4], 0xfeff
je 0x10064ae
push 0x1001810
mov ebx, 0x1012240
push ebx
call dword [sym.imp.msvcrt.dll_swprintf]
pop ecx
pop ecx
push 0
push ebx
push dword [0x100d374]
call fcn.010077f7
push dword [ebp + 0x10]
push 1
push 2
pop ebx
jmp 0x10064e0
mov eax, dword [ebp - 4]
cmp eax, 0xd
je 0x10064db
cmp eax, 0xa
je 0x10064f4
cmp eax, 9
je 0x10064d2
mov word [edi], ax
add edi, ebx
inc dword [ebp - 8]
mov ecx, dword [ebp + 0xc]
dec ecx
cmp dword [ebp - 8], ecx
jge 0x10064fb
push dword [ebp + 0x10]
push 1
lea eax, [ebp - 4]
push ebx
push eax
call esi
add esp, 0x10
cmp eax, 1
jae 0x10064b8
or eax, 0xffffffff
jmp 0x10064fb
mov word [edi], 0xa
add edi, ebx
and word [edi], 0
cmp eax, 0xffffffff
jne 0x100650d
cmp edi, dword [ebp + 8]
jne 0x100650d
xor eax, eax
jmp 0x1006510
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x1007778
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push dword [ebp + 8]
call fcn.01007755
test eax, eax
je 0x10077a0
push 0
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
jmp 0x10077ee
mov eax, dword [ebp + 0x10]
push esi
push edi
add eax, eax
push eax
xor esi, esi
push esi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
cmp edi, esi
je 0x10077ec
mov eax, dword [ebp + 0x10]
push esi
push esi
lea ecx, [eax + eax]
push ecx
push edi
push eax
push dword [ebp + 0xc]
push esi
push 1
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp eax, esi
mov dword [ebp + 0x10], eax
je 0x10077e5
push esi
lea ecx, [ebp + 0x10]
push ecx
push eax
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop esi
pop ebp
ret 0xc

Function at 0x1007849
Capabilities:
List domain servers

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 0x10]
xor ebx, ebx
push ebx
push dword [ebp + 0x1c]
lea eax, [ebp + 0x18]
push dword [ebp + 0x18]
push eax
push esi
push 0xffffffffffffffff
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call sub.NETAPI32.dll_NetServerEnum
cmp eax, ebx
mov dword [ebp + 0x1c], eax
je 0x1007881
cmp eax, 0xea
jne 0x10078d5
cmp dword [ebp + 0xc], 0x64
mov edi, dword [edi]
jne 0x10078b0
cmp dword [esi], ebx
jbe 0x10078d5
lea eax, [edi + 4]
mov dword [ebp + 0xc], eax
push 4
push dword [ebp + 0xc]
push edi
call dword [sym.imp.msvcrt.dll_memmove]
add dword [ebp + 0xc], 8
add esp, 0xc
inc ebx
add edi, 4
cmp ebx, dword [esi]
jb 0x1007893
jmp 0x10078d5
cmp dword [esi], ebx
jbe 0x10078d5
lea eax, [edi + 4]
mov dword [ebp + 0xc], eax
push 0x14
push dword [ebp + 0xc]
push edi
call dword [sym.imp.msvcrt.dll_memmove]
add dword [ebp + 0xc], 0x18
add esp, 0xc
inc ebx
add edi, 0x14
cmp ebx, dword [esi]
jb 0x10078ba
mov eax, dword [ebp + 0x1c]
pop edi
pop esi
pop ebx
pop ebp
ret 0x18
Function at 0x402cf4
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebx
push esi
add esp, 0xfffffdf0
mov esi, edx
mov ebx, eax
test bl, bl
je 0x402d31
xor eax, eax
mov al, bl
add eax, 0x41
dec eax
mov byte [esp], al
mov byte [esp + 1], 0x3a
mov byte [esp + 2], 0
lea eax, [esp + 0x109]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryA
push esp
call sub.kernel32.dll_SetCurrentDirectoryA
lea eax, [esp + 4]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryA
test bl, bl
je 0x402d51
lea eax, [esp + 0x109]
push eax
call sub.kernel32.dll_SetCurrentDirectoryA
mov eax, esi
lea edx, [esp + 4]
mov ecx, 0x105
call fcn.00404be0
add esp, 0x210
pop esi
pop ebx
ret

Function at 0x402f30
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
xor eax, eax
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x402f89
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
call sub.kernel32.dll_GetCommandLineA
lea edx, [ebp - 8]
call fcn.00402dcc
mov dword [ebp - 4], eax
lea edx, [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.00402dcc
mov dword [ebp - 4], eax
cmp dword [ebp - 8], 0
je 0x402f73
inc ebx
jmp 0x402f5c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x402f90
lea eax, [ebp - 8]
call fcn.00404960
ret

Function at 0x402f98
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
add esp, 0xfffffef4
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.00404960
test esi, esi
jne 0x402fcf
push 0x105
lea eax, [esp + 8]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
lea edx, [esp + 4]
mov eax, ebx
call fcn.00404a50
jmp 0x402ff0
call sub.kernel32.dll_GetCommandLineA
mov dword [esp], eax
mov edx, ebx
mov eax, dword [esp]
call fcn.00402dcc
mov dword [esp], eax
test esi, esi
je 0x402ff0
cmp dword [ebx], 0
je 0x402ff0
dec esi
jmp 0x402fd7
add esp, 0x10c
pop esi
pop ebx
ret

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

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

Function at 0x40397c
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x502024]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x403a14
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x4039f4
xor eax, eax
push ebp
push 0x4039ed
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 0x403a30
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 0x4039f4
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x502024]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x502024], ax
mov esp, ebp
pop ebp
ret
Function at 0x404758
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x50504c], 0
je 0x4047b9
cmp word [0x505220], 0xd7b2
jne 0x404781
cmp dword [0x505228], 0
jbe 0x404781
mov eax, 0x50521c
call dword [0x505238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x502078
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 0x4047e0
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x502034], 0
jne 0x4047d5
push 0
push 0x502070
push 0x502078
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x404914
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
mov ebx, eax
mov eax, 8
call fcn.00402b04
mov dword [eax], edi
mov edx, dword [ebp + 0x10]
mov dword [eax + 4], edx
mov byte [0x50504d], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x4048dc
push eax
push esi
push ebx
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ebp
ret 0xc
Function at 0x406fb4
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
xor edx, edx
mov dword [ebp - 0x10], edx
xor edx, edx
push ebp
push 0x40701a
push dword fs:[edx]
mov dword fs:[edx], esp
push 7
lea edx, [ebp - 0xb]
push edx
push 0x1004
push eax
call sub.kernel32.dll_GetLocaleInfoA
lea eax, [ebp - 0x10]
lea edx, [ebp - 0xb]
mov ecx, 7
call fcn.00404be0
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 4]
call fcn.004033b4
mov ebx, eax
cmp dword [ebp - 4], 0
je 0x407004
xor ebx, ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x407021
lea eax, [ebp - 0x10]
call fcn.00404960
ret

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

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

Function at 0x40d510
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 0x40d549
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.00404a50
jmp 0x40d552
mov eax, ebx
mov edx, esi
call fcn.004049b4
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

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

Function at 0x40e5a0
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
xor edx, edx
mov dword [ebp - 8], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x40e676
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 4], 0xffffffff
lea eax, [ebp - 8]
mov edx, ebx
call fcn.004049f8
lea eax, [ebp - 8]
call fcn.00404e80
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
call fcn.00404e30
push eax
call sub.version.dll_GetFileVersionInfoSizeA
mov ebx, eax
test ebx, ebx
je 0x40e660
mov eax, ebx
call fcn.00402b04
mov dword [ebp - 0x10], eax
xor eax, eax
push ebp
push 0x40e659
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 - 8]
call fcn.00404e30
push eax
call sub.version.dll_GetFileVersionInfoA
test eax, eax
je 0x40e643
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x40e688
mov eax, dword [ebp - 0x10]
push eax
call sub.version.dll_VerQueryValueA
test eax, eax
je 0x40e643
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 8]
mov dword [ebp - 4], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40e660
mov eax, dword [ebp - 0x10]
call fcn.00402b34
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40e67d
lea eax, [ebp - 8]
call fcn.00404960
ret