joyce8/EMBER2024-capa huggingface dataset:
Function at 0x408890
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x417900
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x8048
call fcn.0040a170
mov eax, dword [0x41e3a8]
push ebx
push esi
xor ebx, ebx
push edi
cmp eax, ebx
mov dword [ebp - 0x10], esp
je 0x408a35
mov esi, dword [ebp + 8]
cmp esi, eax
jg 0x408a35
lea eax, [ebp - 0x24]
mov dword [ebp - 4], ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push esi
call fcn.00408a50
mov edi, eax
add esp, 4
cmp edi, 0xffffffff
je 0x408a35
mov esi, dword [edi*4 + 0x41e398]
cmp esi, ebx
jne 0x40890c
push edi
call fcn.00408a80
add esp, 4
mov esi, eax
jmp 0x408959
mov ecx, dword [0x41e3c8]
mov edx, dword [ebp - 0x24]
add ecx, 0x76c
and edx, 0xffff
cmp edx, ecx
jne 0x40894a
mov eax, dword [0x41e3c4]
mov ecx, dword [ebp - 0x22]
inc eax
and ecx, 0xffff
cmp ecx, eax
jne 0x40894a
mov edx, dword [ebp - 0x1e]
mov eax, dword [0x41e3c0]
and edx, 0xffff
cmp edx, eax
je 0x408959
push edi
call fcn.00408860
push edi
call fcn.00408a80
add esp, 8
cmp esi, ebx
je 0x408a35
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edx, dword [ebp - 0x16]
mov ecx, dword [ebp - 0x1a]
push eax
mov eax, dword [ebp - 0x18]
and edx, 0xffff
and eax, 0xffff
push edx
mov edx, dword [ebp - 0x1c]
and ecx, 0xffff
push eax
and edx, 0xffff
push ecx
push edx
lea eax, [ebp - 0x8058]
push str._02d:_02d:_02d:_03d____5d____30s____5d
push eax
call fcn.00409b2c
mov edx, dword [ebp + 0x14]
mov edi, eax
lea ecx, [ebp + 0x18]
push ecx
push edx
lea eax, [ebp + edi - 0x8058]
push 0x8000
push eax
call fcn.0040b297
add edi, eax
push 0x41b040
lea ecx, [ebp + edi - 0x8058]
push ecx
call fcn.00409b2c
lea edi, [ebp - 0x8058]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x3c
repne scasb al, byte es:[edi]
not ecx
push 2
push eax
dec ecx
push eax
mov dword [ebp + 8], ebx
push esi
mov ebx, ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, eax
push 0
lea eax, [edi + ebx]
push eax
push 0
push edi
push esi
mov dword [ebp + 0x10], eax
call dword [sym.imp.KERNEL32.dll_LockFile]
lea edx, [ebp + 8]
push 0
push edx
lea eax, [ebp - 0x8058]
push ebx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp + 0x10]
push 0
push ecx
push 0
push edi
push esi
call dword [sym.imp.KERNEL32.dll_UnlockFile]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x408c20
Capabilities:
Enumerate files on windows

Disassembly:
sub esp, 0x378
push ebp
push esi
push edi
xor esi, esi
push esi
call fcn.00408860
add esp, 4
inc esi
cmp esi, 4
jl 0x408c2b
mov ebp, dword [esp + 0x38c]
lea eax, [esp + 0x280]
push ebp
push str._s
push eax
call fcn.00409b2c
add esp, 0xc
lea ecx, [esp + 0x140]
lea edx, [esp + 0x280]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
test edi, edi
mov dword [esp + 0xc], edi
je 0x408dfd
lea eax, [esp + 0x140]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x408df6
mov esi, 0x41b0d4
lea eax, [esp + 0x16c]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x408cc2
test cl, cl
je 0x408cbe
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x408cc2
add eax, 2
add esi, 2
test cl, cl
jne 0x408c9e
xor eax, eax
jmp 0x408cc7
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x408ddf
mov esi, 0x41b0d0
lea eax, [esp + 0x16c]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x408cff
test cl, cl
je 0x408cfb
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x408cff
add eax, 2
add esi, 2
test cl, cl
jne 0x408cdb
xor eax, eax
jmp 0x408d04
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x408ddf
lea eax, [esp + 0x16c]
lea ecx, [esp + 0x3c]
push eax
push 0x5c
push ebp
push str._s_c_s
push ecx
call fcn.00409b2c
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x30]
mov dword [esp + 0x2c], 0
rep stosd dword es:[edi], eax
lea edx, [esp + 0x2c]
lea eax, [esp + 0x50]
push edx
push eax
call fcn.00416d10
add esp, 0x1c
cmp eax, 0xffffffff
je 0x408ddb
lea ecx, [esp + 0x10]
push ecx
call fcn.0040aa25
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x14]
push edx
push eax
call fcn.0040b3b6
call fcn.0040b3c8
mov dword [esp + 0x20], eax
add esp, 4
fild dword [esp + 0x1c]
fmul qword [0x4182f8]
fstp qword [esp]
call fcn.0040b2e7
add esp, 8
call fcn.0040b3c8
cmp eax, dword [esp + 0x388]
jle 0x408ddb
mov eax, dword [esp + 0x1e]
test ah, 0x40
je 0x408db3
lea ecx, [esp + 0x3c]
push ecx
call fcn.00408f20
jmp 0x408dbd
lea edx, [esp + 0x3c]
push edx
call fcn.004170f7
add esp, 4
lea eax, [esp + 0x3c]
push eax
push str.File__s_is_expired
push 0
push str.ClearLog
push 0x14
call fcn.00408890
add esp, 0x14
mov edi, dword [esp + 0xc]
lea ecx, [esp + 0x140]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x408c92
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
pop edi
pop esi
pop ebp
add esp, 0x378
ret
Function at 0x408e90
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
push esi
push edi
push ebx
xor ebp, ebp
call fcn.00411e16
mov esi, eax
push 0x5c
push esi
call fcn.0040a700
mov edi, eax
add esp, 0xc
test edi, edi
je 0x408f09
sub eax, esi
cmp eax, 0xffffffff
je 0x408f09
push 1
push 0x41a658
push ebx
call fcn.0040b3f0
add esp, 0xc
test eax, eax
je 0x408f09
push 2
push 0x41b0e0
push ebx
call fcn.0040b3f0
add esp, 0xc
test eax, eax
je 0x408f09
push esi
mov byte [edi], 0
call fcn.00408e90
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x408efe
test al, 0x10
jne 0x408f09
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ebp, eax
push esi
call fcn.0040a19f
add esp, 4
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x408f20
Capabilities:
Enumerate files on windows

Disassembly:
sub esp, 0x348
lea eax, [esp + 0x140]
push ebp
mov ebp, dword [esp + 0x350]
push edi
push ebp
push str._s
push eax
call fcn.00409b2c
add esp, 0xc
lea ecx, [esp + 8]
lea edx, [esp + 0x148]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x40905e
lea eax, [esp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_FindNextFileA]
push eax
push edi
call ebx
test eax, eax
je 0x409056
push esi
test byte [esp + 0x10], 0x10
je 0x40901d
mov esi, 0x41b0d4
lea eax, [esp + 0x3c]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x408fb3
test cl, cl
je 0x408faf
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x408fb3
add eax, 2
add esi, 2
test cl, cl
jne 0x408f8f
xor eax, eax
jmp 0x408fb8
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x409045
mov esi, 0x41b0d0
lea eax, [esp + 0x3c]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x408fed
test cl, cl
je 0x408fe9
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x408fed
add eax, 2
add esi, 2
test cl, cl
jne 0x408fc9
xor eax, eax
jmp 0x408ff2
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x409045
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x150]
push eax
push ebp
push str._s_s
push ecx
call fcn.00409b2c
lea edx, [esp + 0x160]
push edx
call fcn.00417102
jmp 0x409042
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x254]
push eax
push ebp
push str._s_s
push ecx
call fcn.00409b2c
lea edx, [esp + 0x264]
push edx
call fcn.004170f7
add esp, 0x14
lea eax, [esp + 0x10]
push eax
push edi
call ebx
test eax, eax
jne 0x408f7b
pop esi
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
pop ebx
push ebp
call fcn.00417102
add esp, 4
pop edi
pop ebp
add esp, 0x348
ret
Function at 0x4090f0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
push esi
push edi
push ebx
xor ebp, ebp
call fcn.00411e16
mov esi, eax
push 0x5c
push esi
call fcn.0040a700
mov edi, eax
add esp, 0xc
test edi, edi
je 0x409169
sub eax, esi
cmp eax, 0xffffffff
je 0x409169
push 1
push 0x41a658
push ebx
call fcn.0040b3f0
add esp, 0xc
test eax, eax
je 0x409169
push 2
push 0x41b0e0
push ebx
call fcn.0040b3f0
add esp, 0xc
test eax, eax
je 0x409169
push esi
mov byte [edi], 0
call fcn.004090f0
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40915e
test al, 0x10
jne 0x409169
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ebp, eax
push esi
call fcn.0040a19f
add esp, 4
test ebp, ebp
pop edi
pop esi
pop ebp
pop ebx
setne al
ret

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

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x411df0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00411e41
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x411e13
test byte [esp + 8], 2
je 0x411e13
call fcn.00411eb4
mov dword [eax], 0xd
call fcn.00411ebd
mov dword [eax], 5
jmp 0x411dec
xor eax, eax
ret
Function at 0x430000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
mov eax, section..text
nop
mov ebx, 0x408e84
nop
nop
mov ecx, 0x170055da
nop
nop
nop
test eax, eax
nop
nop
nop
nop
je 0x43004e
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
jne 0x430024
nop
nop
nop
mov eax, section..data
nop
mov ebx, 0x42e1d0
nop
nop
mov ecx, 0x7d9e5a66
nop
test eax, eax
nop
nop
nop
nop
je 0x430084
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
nop
add eax, 4
nop
cmp eax, ebx
nop
nop
nop
nop
nop
nop
nop
nop
jne 0x43006c
nop
nop
nop
nop
popal
nop
jmp 0x401219
Function at 0x401310
Capabilities:
Create shortcut via ishelllink

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
mov esi, edx
push edi
mov edi, ecx
test esi, esi
je 0x40135a
lea eax, [ebp - 4]
push eax
push 0x4122b0
push 1
push 0
push 0x4122d0
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x40135a
mov eax, dword [ebp - 4]
lea edx, [ebp - 8]
push edx
push 0x4122c0
push eax
mov ecx, dword [eax]
call dword [ecx]
test eax, eax
jns 0x401362
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
test edi, edi
jne 0x40137e
call fcn.00408610
mov ecx, dword [eax]
call fcn.00401410
mov ecx, dword [ebp - 4]
push eax
push ecx
mov edx, dword [ecx]
call dword [edx + 0x50]
jmp 0x401388
mov eax, dword [ebp - 4]
push edi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x50]
mov eax, dword [ebp - 4]
push 0x416e8c
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
mov eax, dword [ebp - 4]
push 1
push eax
mov ecx, dword [eax]
call dword [ecx + 0x3c]
add esi, 0xfffffffe
lea edx, [esi + 2]
nop word [eax + eax]
mov ax, word [esi + 2]
lea esi, [esi + 2]
test ax, ax
jne 0x4013b0
mov eax, dword [0x416d58]
mov dword [esi], eax
mov eax, dword [0x416d5c]
mov dword [esi + 4], eax
mov eax, dword [0x416d60]
mov dword [esi + 8], eax
mov eax, dword [0x416d64]
mov dword [esi + 0xc], eax
mov eax, dword [0x416d68]
mov dword [esi + 0x10], eax
mov eax, dword [ebp - 8]
push 1
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x18]
mov ecx, dword [ebp - 8]
mov esi, eax
push ecx
mov edx, dword [ecx]
call dword [edx + 8]
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ecx]
call dword [edx + 8]
xor eax, eax
test esi, esi
pop edi
setns al
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x10005cad
Capabilities:
Find taskbar

Disassembly:
mov eax, dword [esp + 4]
push esi
xor esi, esi
cmp eax, esi
jne 0x10005cc8
push esi
push str.Shell_TrayWnd
call dword [sym.imp.USER32.dll_FindWindowW]
cmp eax, esi
je 0x10005cd3
push 0xffffffffffffffec
push eax
call dword [sym.imp.USER32.dll_GetWindowLongW]
jmp 0x10005cd5
xor eax, eax
shr eax, 0x16
test al, 1
je 0x10005ce1
mov esi, 0x180000
mov eax, esi
pop esi
ret

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

Disassembly:
push ebp
sub esp, 0x250
lea ebp, [esp - 4]
mov eax, dword [0x10053130]
xor eax, ebp
mov dword [ebp + 0x250], eax
push 0x18
mov eax, 0x100395ff
call fcn.10022028
mov esi, ecx
mov dword [ebp - 0x24], esi
call sym.SoftwareUpdateFiles.dll_public:_void___thiscall_CSUXMLObject::constructor_void_
xor edi, edi
lea ecx, [esi + 0x58]
mov dword [ebp - 4], edi
mov dword [esi], vtable.CSUCatalogObject.0
call fcn.100019d2
lea ecx, [esi + 0x64]
mov dword [esi + 0x5c], 0x64
call fcn.100019d2
lea ecx, [esi + 0x68]
call fcn.100019d2
lea ecx, [esi + 0x78]
mov dword [esi + 0x6c], edi
mov dword [esi + 0x70], edi
mov dword [esi + 0x74], edi
call fcn.100019d2
lea ecx, [esi + 0x7c]
mov byte [ebp - 4], 4
call sym.SoftwareUpdateFiles.dll_public:_void___thiscall_CIgnoreList::constructor_void_
lea ecx, [esi + 0x94]
call fcn.100019d2
push 0xa
lea ecx, [esi + 0x98]
mov byte [ebp - 4], 6
call fcn.1001b7f5
push 0xa
lea ecx, [esi + 0xc0]
mov byte [ebp - 4], 7
mov dword [esi + 0xb4], edi
mov dword [esi + 0xb8], edi
mov dword [esi + 0xbc], edi
call fcn.1001b202
lea ebx, [esi + 0xdc]
mov ecx, ebx
call fcn.100019d2
push 0xa
mov ecx, esi
mov byte [ebp - 4], 9
call sym.SoftwareUpdateFiles.dll_public_virtual:_void___thiscall_CSUDownloadFileObject::SetDownloadProgressWeight_unsigned_int_
lea eax, [ebp - 0x10]
push eax
mov ecx, esi
call sym.SoftwareUpdateFiles.dll_public:_class_ATL::CStringT_wchar_t__class_StrTraitMFC_wchar_t__class_ATL::ChTraitsCRT_wchar_t______thiscall_CSUFileObject::GetDistCacheDir_void_
push str..
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x18]
push eax
mov byte [ebp - 4], 0xa
call fcn.10001efb
add esp, 0xc
lea eax, [ebp]
push eax
push dword [ebp - 0x18]
mov byte [ebp - 4], 0xb
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x20], eax
cmp eax, 0xffffffff
je 0x1000653d
test byte [ebp], 0x10
jne 0x10006523
push 0x1003d890
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.10001efb
mov ecx, dword [edi + 0x3c]
lea eax, [ecx + eax*8]
mov eax, dword [eax + edi + 0x78]
add eax, edi
mov ecx, dword [eax + 0x20]
mov ebx, dword [eax + 0x1c]
add ecx, edi
mov ebp, dword [eax + 0x24]
add ebx, edi
mov eax, dword [eax + 0x18]
add ebp, edi
inc eax
sbb byte [ebx], al
out dx, eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x14], eax
test eax, eax
je 0x1000656f
mov eax, dword [ecx + esi*4]
add eax, edi
push eax
push dword [esp + 0x20]
call fcn.100064eb
pop ecx
pop ecx
cmp eax, dword [esp + 0x18]
je 0x10006576
mov ecx, dword [esp + 0x20]
inc esi
cmp esi, dword [esp + 0x14]
jb 0x1000654d
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
movzx eax, word [ebp + esi*2]
mov eax, dword [ebx + eax*4]
add eax, edi
jmp 0x10006571
Function at 0x10006515
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov eax, dword [esp + 0x10]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x14]
xor esi, esi

Function at 0x100065c1
Capabilities:
Access peb ldr_data

Disassembly:
mov eax, dword fs:[0x30]
push esi
push edi
mov edi, dword [eax + 0xc]
add edi, 0xc
mov esi, dword [edi]
jmp 0x100065e4
push dword [esi + 0x30]
call fcn.10006623
pop ecx
cmp dword [esp + 0xc], eax
je 0x100065ed
mov esi, dword [esi]
cmp esi, edi
jne 0x100065d3
xor eax, eax
pop edi
pop esi
ret
mov eax, dword [esi + 0x18]
jmp 0x100065ea

Function at 0x10008e24
Capabilities:
Check os version

Disassembly:
push ebp
sub esp, 0x338
lea ebp, [esp - 4]
mov eax, dword [0x10053130]
xor eax, ebp
mov dword [ebp + 0x338], eax
push 0x64
mov eax, 0x10039c2c
call fcn.10022028
mov edi, 0x11c
push edi
xor esi, esi
lea eax, [ebp]
push esi
push eax
call fcn.10022680
add esp, 0xc
lea eax, [ebp]
mov dword [ebp], edi
mov edi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
push eax
call edi
test eax, eax
jne 0x10008fa1
lea eax, [ebp]
push eax
mov dword [ebp], 0x114
call edi
test eax, eax
jne 0x10008fa1
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
xor eax, eax
push 0x1fe
mov word [ebp + 0x138], ax
lea eax, [ebp + 0x13a]
push esi
push eax
call fcn.10022680
movzx eax, word [ebp - 0xe]
push eax
movzx eax, word [ebp - 0x10]
push eax
movzx eax, word [ebp - 0x12]
push eax
movzx eax, word [ebp - 0x14]
push eax
movzx eax, word [ebp - 0x16]
push eax
movzx eax, word [ebp - 0x1a]
push eax
movzx eax, word [ebp - 0x1c]
push eax
push str.__04d__02d__02d__02d:_02d:_02d:_04d_
lea eax, [ebp + 0x138]
push 0x100
push eax
call fcn.100016e6
add esp, 0x34
push esi
lea ecx, [ebp + 0x11c]
mov dword [ebp + 0x134], 7
call fcn.10001816
push str.Error__CSUComUtil::IsWindowsVistaOrLater__GetVersionEx_failed_with_error__d._n
lea ecx, [ebp - 0x70]
mov dword [ebp - 4], esi
call fcn.1000217b
mov edi, eax
lea eax, [ebp + 0x138]
push eax
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 1
call fcn.1000217b
push edi
push eax
lea eax, [ebp - 0x54]
push eax
mov byte [ebp - 4], 2
call fcn.1000219d
add esp, 0xc
push 0xffffffffffffffff
push esi
push eax
lea ecx, [ebp + 0x11c]
mov byte [ebp - 4], 3
call fcn.10001fc3
push esi
push 1
lea ecx, [ebp - 0x54]
call fcn.10001987
push esi
push 1
lea ecx, [ebp - 0x38]
call fcn.10001987
push esi
push 1
lea ecx, [ebp - 0x70]
call fcn.10001987
cmp dword [ebp + 0x134], 8
mov edi, dword [ebp + 0x120]
jae 0x10008f80
lea edi, [ebp + 0x120]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
call fcn.100226fa
pop ecx
pop ecx
push esi
push 1
lea ecx, [ebp + 0x11c]
call fcn.10001987
xor eax, eax
jmp 0x10008fac
cmp dword [ebp + 4], 6
jb 0x10008faa
xor esi, esi
inc esi
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x338]
xor ecx, ebp
call fcn.10022019
add ebp, 0x33c
leave
ret
Function at 0x402e08
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 0x402e45
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 0x402e65
lea eax, [esp + 0x109]
push eax
call sub.kernel32.dll_SetCurrentDirectoryA
mov eax, esi
lea edx, [esp + 4]
mov ecx, 0x105
call fcn.00405284
add esp, 0x210
pop esi
pop ebx
ret

Function at 0x4030e0
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 0x403139
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
call sub.kernel32.dll_GetCommandLineA
lea edx, [ebp - 8]
call fcn.00402f7c
mov dword [ebp - 4], eax
lea edx, [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.00402f7c
mov dword [ebp - 4], eax
cmp dword [ebp - 8], 0
je 0x403123
inc ebx
jmp 0x40310c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x403140
lea eax, [ebp - 8]
call fcn.00405014
ret

Function at 0x403148
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
add esp, 0xfffffef4
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.00405014
test esi, esi
jne 0x40317f
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.00405104
jmp 0x4031a0
call sub.kernel32.dll_GetCommandLineA
mov dword [esp], eax
mov edx, ebx
mov eax, dword [esp]
call fcn.00402f7c
mov dword [esp], eax
test esi, esi
je 0x4031a0
cmp dword [ebx], 0
je 0x4031a0
dec esi
jmp 0x403187
add esp, 0x10c
pop esi
pop ebx
ret

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

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

Function at 0x403f48
Capabilities:
Query or enumerate registry value

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

Disassembly:
push ecx
cmp byte [0x60104c], 0
je 0x404e6d
cmp word [0x601220], 0xd7b2
jne 0x404e35
cmp dword [0x601228], 0
jbe 0x404e35
mov eax, 0x60121c
call dword [0x601238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x5e9074
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 0x404e94
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x5e9034], 0
jne 0x404e89
push 0
push 0x5e906c
push 0x5e9074
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x404fc8
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.00402bd0
mov dword [eax], edi
mov edx, dword [ebp + 0x10]
mov dword [eax + 4], edx
mov byte [0x60104d], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x404f90
push eax
push esi
push ebx
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ebp
ret 0xc
Function at 0x407560
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 0x4075c6
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.00405284
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 4]
call fcn.00403940
mov ebx, eax
cmp dword [ebp - 4], 0
je 0x4075b0
xor ebx, ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4075cd
lea eax, [ebp - 0x10]
call fcn.00405014
ret

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

Disassembly:
push ebx
mov ebx, eax
mov eax, ebx
call fcn.004054d4
push eax
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
je 0x40a7e9
test al, 0x10
jne 0x40a7ed
xor eax, eax
pop ebx
ret
mov al, 1
pop ebx
ret

Function at 0x40a984
Capabilities:
Get file attributes

Disassembly:
push ebx
mov ebx, eax
mov eax, ebx
call fcn.004054d4
push eax
call sub.kernel32.dll_GetFileAttributesA
pop ebx
ret

Function at 0x40a998
Capabilities:
Set file attributes

Disassembly:
push ebx
push esi
push edi
mov edi, edx
mov esi, eax
xor ebx, ebx
push edi
mov eax, esi
call fcn.004054d4
push eax
call sub.kernel32.dll_SetFileAttributesA
test eax, eax
jne 0x40a9ba
call sub.kernel32.dll_GetLastError_1
mov ebx, eax
mov eax, ebx
pop edi
pop esi
pop ebx
ret

Function at 0x40e1d0
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 0x40e209
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.00405104
jmp 0x40e212
mov eax, ebx
mov edx, esi
call fcn.00405068
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

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