joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10047b1
Capabilities:
Persist via winlogon helper dll registry key
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80c
lea eax, [ebp - 4]
push eax
push 0xf003f
push 0
push dword [0x1006020]
mov dword [ebp - 8], 0x800
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x10048a3
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x80c]
push eax
lea eax, [ebp - 0xc]
push eax
push 0
push dword [0x1006024]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x100489a
push dword [0x100601c]
lea eax, [ebp - 0x80c]
push eax
call dword [sym.imp.msvcrt.dll_wcsstr]
test eax, eax
pop ecx
pop ecx
jne 0x100489a
push esi
push edi
push dword [0x100601c]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
call edi
mov esi, eax
lea eax, [ebp - 0x80c]
push eax
call edi
lea eax, [esi + eax + 2]
cmp eax, 0x400
jae 0x1004898
push dword [0x1006028]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x80c]
push eax
call esi
push dword [0x100601c]
lea eax, [ebp - 0x80c]
push eax
call esi
lea eax, [ebp - 0x80c]
push eax
call edi
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x80c]
push eax
push 1
push 0
push dword [0x1006024]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
pop edi
pop esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
leave
ret

Function at 0x10048a5
Capabilities:
Persist via winlogon helper dll registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80c
lea eax, [ebp - 4]
push eax
push 0xf003f
push 0
push dword [0x1006020]
mov dword [ebp - 8], 0x800
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x100496c
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x80c]
push eax
lea eax, [ebp - 0xc]
push eax
push 0
push dword [0x1006024]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1004963
push esi
mov esi, dword [sym.imp.msvcrt.dll_wcsstr]
push edi
push dword [0x100601c]
lea eax, [ebp - 0x80c]
push eax
call esi
mov edi, eax
test edi, edi
pop ecx
pop ecx
je 0x1004961
push dword [0x1006028]
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x100493a
add eax, 2
push eax
push edi
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
jmp 0x1004961
lea eax, [ebp - 0x80c]
cmp eax, edi
jae 0x100495d
mov eax, dword [0x100601c]
mov ax, word [eax]
cmp ax, word [edi]
je 0x100495d
dec edi
dec edi
lea ecx, [ebp - 0x80c]
cmp ecx, edi
jb 0x100494c
and word [edi], 0
pop edi
pop esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
leave
ret
Function at 0x100496e
Capabilities:
Modify service

Disassembly:
push ecx
push ebx
push 0x2000000
xor ebx, ebx
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
cmp eax, ebx
mov dword [esp + 4], eax
je 0x10049cf
push ebp
push esi
push edi
push 0x22
mov edi, 0x10013e8
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebp, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
cmp esi, ebx
je 0x10049c6
mov eax, dword [esp + 0x18]
push edi
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
neg eax
push 0xffffffffffffffff
sbb eax, eax
add eax, 3
push eax
push 0x10
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
push esi
call ebp
push dword [esp + 0x10]
call ebp
pop edi
pop esi
pop ebp
cmp dword [esp + 0xc], ebx
pop ebx
je 0x10049dd
call fcn.010047b1
jmp 0x10049e2
call fcn.010048a5
pop ecx
ret 4

Function at 0x10049e6
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
cmp dword [ebp + 0xc], edi
push 4
pop ebx
mov dword [ebp - 4], edi
mov dword [ebp - 0xc], esi
je 0x1004a33
push dword [ebp + 0xc]
lea eax, [ebp - 0x20c]
push 0x100141c
xor ebx, ebx
push eax
inc ebx
mov dword [ebp - 4], 2
call dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebp - 0x20c]
add esp, 0xc
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], esi
push dword [0x1006018]
push edi
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
cmp esi, edi
je 0x1004a61
push edi
lea eax, [ebp - 0xc]
push eax
push edi
push dword [ebp - 4]
push edi
push edi
push edi
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x1004ed5
Capabilities:
Terminate process

Disassembly:
mov eax, dword [esp + 0xc]
mov cx, word [eax]
cmp cx, 0x2f
je 0x1004ee8
cmp cx, 0x2d
jne 0x1004ef8
mov ax, word [eax + 2]
cmp ax, 0x49
je 0x1004eff
cmp ax, 0x69
je 0x1004eff
call fcn.01004dc6
jmp 0x1004f04
call fcn.01004744
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x1008531
Capabilities:
Encode data using xor

Disassembly:
and dword [ebp + 0x4c46], 0
inc dword [ebp + 0x4c46]
call esi
xor eax, edi
je 0x1008531
jmp 0x1008633
call 0x1008531
lea ecx, [esp + 0x20]
mov dword [ecx + 0x18], edx
mov dword [ecx + 0x14], eax
mov dword [ecx + 0x10], edi
jmp 0x100852a
xor edi, eax
rdtsc
ret
call esi
lea edi, [eax]
jmp 0x10085da
Function at 0x10085a2
Capabilities:
Resolve function by parsing pe exports

Disassembly:
movzx eax, byte [edi]
sub dword [esp], eax
lea edi, [edi + 1]
jmp 0x1008593
lodsd eax, dword [esi]
lea edi, [eax + ebx]
cmp ecx, dword [edx + 0x18]
je 0x100d10b
push 0
jmp 0x10085f1
xor eax, 0xebd9c5c5
sbb eax, dword [esp + 4]
jne 0x1008511
lea esi, [ebx]
lea edi, [ebx]
jmp 0x100d125
push 0xffffffffffffffff
add esi, dword [edx + 0x20]
pop ecx
inc ecx
jmp 0x10084d9
cmp byte [edi], 1
pop eax
ja 0x10085f2
jmp 0x10084f3
mov edx, ebx
mov esi, ebx
mov eax, ebx
add eax, dword [ebx + 0x3c]
add edx, dword [eax + 0x78]
jmp 0x100850b
pop eax
imul eax, eax, 0xf
push eax
jmp 0x100841b
ret 4
movzx eax, word [esi]
pop esi
add esi, dword [edi + eax*4]
jmp 0x1008620
ret
add edi, dword [edx + 0x1c]
add esi, dword [edx + 0x24]
push ebx
lea esi, [esi + ecx*2]
jmp 0x1008651
Function at 0x4034c4
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov eax, dword [eax]
cmp dword [eax - 8], 0
jne 0x4034d6
xor al, al
pop ebp
ret
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
setne al
pop ebp
ret

Function at 0x403725
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
lea eax, [ebp - 8]
push ebx
push eax
lea eax, [ebp - 4]
xor ebx, ebx
push eax
push ebx
push 0xf003f
push ebx
push ebx
push ebx
push str.softwareSymantecNorton_GhostGhost_Boot_Wizard
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x403756
xor eax, eax
jmp 0x40378d
mov eax, dword [ebp + 0xc]
push esi
push edi
mov esi, dword [eax]
mov eax, dword [ebp + 8]
push esi
mov edi, dword [eax]
call fcn.0041da60
pop ecx
inc eax
push eax
push esi
push 1
push ebx
push edi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
pop edi
pop esi
test eax, eax
jne 0x403782
push 1
pop ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
pop ebx
leave
ret

Function at 0x403790
Capabilities:
Query or enumerate registry value

Disassembly:
mov eax, 0x43d377
call fcn.0041d644
sub esp, 0x10
mov eax, dword [0x457f44]
push ebx
xor ebx, ebx
push edi
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x10], eax
push 1
lea ecx, [ebp - 0x10]
pop edi
push 0x45b8a8
mov dword [ebp - 4], edi
call fcn.004361e7
lea eax, [ebp - 0x14]
push eax
push edi
push ebx
push str.softwareSymantecNorton_GhostGhost_Boot_Wizard
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x4037ea
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
call fcn.00435e1f
mov dword [ebp - 0x18], edi
jmp 0x403848
push esi
mov esi, 0x100
push esi
lea ecx, [ebp - 0x10]
call fcn.0043648e
mov ecx, dword [ebp + 0xc]
lea edx, [ebp - 0x1c]
push edx
push eax
mov ecx, dword [ecx]
push ebx
push ebx
push ecx
push dword [ebp - 0x14]
mov dword [ebp - 0x1c], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push 0xffffffffffffffff
lea ecx, [ebp - 0x10]
mov esi, eax
call fcn.004364dd
cmp esi, ebx
pop esi
je 0x403830
push 0x45b8a8
lea ecx, [ebp - 0x10]
call fcn.004361e7
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
call fcn.00435e1f
mov dword [ebp - 0x18], edi
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], bl
call fcn.004360aa
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
pop edi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x403864
Capabilities:
Query or enumerate registry value

Disassembly:
mov eax, 0x43d3b3
call fcn.0041d644
sub esp, 0x14
mov eax, dword [0x457f44]
push ebx
push esi
xor esi, esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x10], eax
push 1
mov dword [ebp - 0x14], eax
pop ebx
mov dword [ebp - 4], ebx
push dword [ebp + 0xc]
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 2
push str.softwareMicrosoftwindowsCurrentVersionApp_Paths_
push eax
call fcn.00436367
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 3
call fcn.00436197
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 2
call fcn.004360aa
lea eax, [ebp + 0xc]
push eax
push ebx
push esi
push dword [ebp - 0x14]
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x4038e1
mov ecx, dword [ebp + 8]
push 0x45b8a8
call fcn.00436118
mov dword [ebp - 0x18], ebx
jmp 0x40393a
mov eax, 0x100
push edi
push eax
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x20], eax
call fcn.0043648e
lea ecx, [ebp - 0x20]
push ecx
push eax
push esi
push esi
push esi
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push 0xffffffffffffffff
lea ecx, [ebp - 0x10]
mov edi, eax
call fcn.004364dd
cmp edi, esi
pop edi
je 0x403922
push 0x45b8a8
lea ecx, [ebp - 0x10]
call fcn.004361e7
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
call fcn.00435e1f
mov dword [ebp - 0x18], ebx
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], bl
call fcn.004360aa
and byte [ebp - 4], 0
lea ecx, [ebp - 0x10]
call fcn.004360aa
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x403a35
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, 0x43d42b
call fcn.0041d644
sub esp, 0x40c
mov eax, dword [ebp + 0x10]
push esi
push edi
push str.MSDOS
mov eax, dword [eax]
push eax
call fcn.0041dae0
pop ecx
pop ecx
test eax, eax
push str.ghostimage
jne 0x403a86
push 0xca
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
jne 0x403a8d
push 0x40a
mov ecx, 0x45b9a0
call fcn.004365f1
jmp 0x403aff
push 0x9a
jmp 0x403a67
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push esi
push 0
mov dword [ebp + 0x10], eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x403a75
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
mov dword [ebp - 0x14], eax
je 0x403a75
mov esi, dword [ebp + 8]
push 0x455314
mov eax, dword [esi]
push eax
call fcn.0041d88f
mov edi, eax
pop ecx
test edi, edi
pop ecx
jne 0x403ad3
push 0x40b
jmp 0x403a7a
push edi
push dword [ebp + 0x10]
push 1
push dword [ebp - 0x14]
call fcn.0041d725
add esp, 0x10
cmp dword [ebp + 0x10], eax
je 0x403b06
push 0x40b
mov ecx, 0x45b9a0
call fcn.004365f1
push edi
call fcn.0041d6a8
pop ecx
xor eax, eax
jmp 0x403c16
push edi
call fcn.0041d6a8
pop ecx
lea ecx, [ebp - 0x418]
call fcn.004114e4
push dword [ebp + 0xc]
and dword [ebp - 4], 0
lea ecx, [ebp - 0x10]
call fcn.00435e1f
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.004365a7
push dword [esi]
lea ecx, [ebp - 0x418]
call fcn.004115db
push dword [ebp - 0x10]
lea ecx, [ebp - 0x418]
call fcn.0041154f
lea ecx, [ebp - 0x418]
call fcn.004116a8
mov eax, dword [0x457f44]
mov dword [ebp + 0x10], eax
mov edi, dword [esi]
lea eax, [ebp + 0xc]
mov esi, 0x104
push eax
push esi
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 2
call fcn.0043648e
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
or esi, 0xffffffff
lea ecx, [ebp + 0x10]
push esi
call fcn.004364dd
mov eax, esi
mov edi, eax
inc eax
push eax
push 0x5c
lea ecx, [ebp + 0x10]
call fcn.0043655a
cmp eax, esi
jne 0x403b90
inc edi
lea eax, [ebp + 8]
push edi
push eax
lea ecx, [ebp + 0x10]
call fcn.004307fd
push eax
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 3
call fcn.00436197
lea ecx, [ebp + 8]
mov byte [ebp - 4], 2
call fcn.004360aa
push str.ImageDirectory
lea ecx, [ebp + 8]
call fcn.00436118
lea eax, [ebp + 0x10]
push eax
lea eax, [ebp + 8]
push eax
call fcn.00403725
pop ecx
pop ecx
lea ecx, [ebp + 8]
call fcn.004360aa
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 1
call fcn.004360aa
and byte [ebp - 4], 0
lea ecx, [ebp - 0x10]
call fcn.004360aa
lea ecx, [ebp - 0x418]
mov dword [ebp - 4], esi
call fcn.00411548
push 1
pop eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret
Function at 0x4040ff
Capabilities:
Check if file exists
Get file attributes
Query or enumerate registry value

Disassembly:
mov eax, 0x43d52f
call fcn.0041d644
sub esp, 0x118
push ebx
push esi
push edi
lea eax, [ebp - 0x10]
xor edi, edi
push 0x8023
push eax
mov dword [ebp - 0x20], edi
call fcn.00404017
pop ecx
pop ecx
mov eax, dword [ebp - 0x10]
push 1
pop ecx
mov esi, 0x4554ac
cmp dword [eax - 8], edi
mov dword [ebp - 4], ecx
je 0x40417f
lea eax, [ebp - 0x14]
push ecx
push eax
lea ecx, [ebp - 0x10]
call fcn.00430781
mov eax, dword [eax]
push esi
push eax
call fcn.0041db64
pop ecx
pop ecx
test eax, eax
lea ecx, [ebp - 0x14]
setne bl
call fcn.004360aa
test bl, bl
je 0x40416c
push esi
lea ecx, [ebp - 0x10]
call fcn.0043643a
push str.SymantecGhost_template_
lea ecx, [ebp - 0x10]
call fcn.0043643a
mov eax, dword [ebp - 0x10]
cmp dword [eax - 8], edi
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
je 0x404193
push eax
call edi
cmp eax, 0xffffffff
jne 0x40423d
lea eax, [ebp - 0x14]
xor ebx, ebx
push eax
push 0x20019
push ebx
push str.SOFTWARESymantecSymantec_Ghost
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40423d
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0x104
push eax
lea eax, [ebp - 0x124]
push eax
push ebx
push ebx
push str.CommonAppData
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x404234
lea eax, [ebp - 0x124]
lea ecx, [ebp - 0x10]
push eax
call fcn.004361e7
mov eax, dword [ebp - 0x10]
cmp dword [eax - 8], ebx
je 0x404234
lea eax, [ebp - 0x1c]
push 1
push eax
lea ecx, [ebp - 0x10]
call fcn.00430781
mov eax, dword [eax]
push esi
push eax
call fcn.0041db64
pop ecx
pop ecx
test eax, eax
lea ecx, [ebp - 0x1c]
setne bl
call fcn.004360aa
test bl, bl
je 0x404227
push esi
lea ecx, [ebp - 0x10]
call fcn.0043643a
push str.template_
lea ecx, [ebp - 0x10]
call fcn.0043643a
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x10]
cmp dword [eax - 8], 0
je 0x40424e
push eax
call edi
cmp eax, 0xffffffff
jne 0x404291
lea eax, [ebp - 0x18]
push eax
call fcn.004034e5
mov dword [esp], str._template_
push eax
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 2
push eax
call fcn.004362f3
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 3
call fcn.00436197
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 2
call fcn.004360aa
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 1
call fcn.004360aa
mov eax, dword [ebp - 0x10]
cmp dword [eax - 8], 0
je 0x4042af
push eax
call edi
cmp eax, 0xffffffff
jne 0x4042af
push 0x45b8a8
lea ecx, [ebp - 0x10]
call fcn.004361e7
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
call fcn.00435e1f
mov dword [ebp - 0x20], 1
and byte [ebp - 4], 0
lea ecx, [ebp - 0x10]
call fcn.004360aa
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x4042e0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, 0x43d56b
call fcn.0041d644
sub esp, 0x10
and dword [ebp - 0x1c], 0
push esi
push str.ImageDirectory
lea ecx, [ebp - 0x14]
call fcn.00436118
push 1
lea eax, [ebp - 0x14]
pop esi
push eax
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 4], esi
call fcn.00403790
pop ecx
pop ecx
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 3
call fcn.004360aa
mov eax, dword [ebp - 0x10]
cmp dword [eax - 8], 0
je 0x404335
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40435e
lea eax, [ebp - 0x18]
push 0x8005
push eax
call fcn.00404017
pop ecx
pop ecx
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 4
call fcn.00436197
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 3
call fcn.004360aa
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
call fcn.00435e1f
mov dword [ebp - 0x1c], esi
and byte [ebp - 4], 0
lea ecx, [ebp - 0x10]
call fcn.004360aa
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
pop esi
mov dword fs:[0], ecx
leave
ret

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

Disassembly:
mov eax, 0x43d59f
call fcn.0041d644
sub esp, 0xc
mov eax, dword [0x457f44]
and dword [ebp - 0x18], 0
push ebx
mov dword [ebp - 0x10], eax
push 1
lea eax, [ebp - 0x14]
pop ebx
push str.imgedit.dll
push 0x45b9a8
push eax
mov dword [ebp - 4], ebx
call fcn.004362f3
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 2
call fcn.00436197
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], bl
call fcn.004360aa
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4043ea
lea ecx, [ebp - 0x10]
call fcn.00436035
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
call fcn.00435e1f
mov dword [ebp - 0x18], ebx
and byte [ebp - 4], 0
lea ecx, [ebp - 0x10]
call fcn.004360aa
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x406fe6
Capabilities:
Set current directory

Disassembly:
mov eax, 0x43dc2f
call fcn.0041d644
sub esp, 0x110
mov eax, dword [0x457f44]
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x1c], eax
xor ebx, ebx
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], ebx
push edi
lea ecx, [ebp - 0x11c]
mov byte [ebp - 4], 1
call fcn.00410a28
push dword [edi + 0x1c]
mov byte [ebp - 4], 2
call dword [sym.imp.USER32.dll_GetParent]
push eax
call fcn.00433116
push ebx
push 0x455790
push 0x455210
push ebx
push eax
call fcn.0041e267
add esp, 0x14
mov esi, eax
push dword [0x45b9a8]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov eax, dword [esi + 0x6bc]
sub eax, ebx
je 0x407065
dec eax
jne 0x407065
push 0x4559c4
jmp 0x40706a
push 0x455340
lea ecx, [ebp - 0x10]
call fcn.004361e7
mov dword [ebp - 0x18], 1
lea ecx, [ebp - 0x11c]
mov dword [ebp - 0x14], 1
call fcn.00410d85
cmp dword [esi + 0x6c0], ebx
je 0x4070a1
lea eax, [ebp - 0x11c]
mov ecx, esi
push eax
call fcn.0040c6b0
lea eax, [ebp - 0x10]
push ebx
push eax
lea eax, [ebp - 0x11c]
push eax
mov ecx, esi
call fcn.0040e070
lea ecx, [ebp - 0x11c]
call fcn.00410d64
mov ecx, 0x163e00
cmp eax, ecx
jle 0x407100
sub eax, dword [esi + 0x1804]
push 0xffffffffffffffff
push ebx
cmp eax, ecx
jg 0x40718c
push 0xc1c
call fcn.00438ec5
push ecx
lea eax, [ebp - 0x10]
mov ecx, esp
mov dword [ebp - 0x20], esp
push eax
call fcn.00435e1f
lea eax, [ebp - 0x11c]
mov ecx, edi
push eax
call fcn.00406f69
lea ecx, [ebp - 0x11c]
call fcn.004327ac
cmp dword [ebp - 0x30], ebx
jne 0x407198
cmp eax, 1
je 0x40713e
push ebx
push ebx
push dword [0x45b9a0]
call fcn.00438e8d
push 0xffffffffffffffff
push 5
push 0x3f5
call fcn.00438ec5
cmp eax, 4
mov dword [ebp - 0x14], eax
jne 0x4071ac
jmp 0x40717c
mov ecx, esi
call fcn.0040fab8
mov eax, dword [ebp - 0x18]
cmp eax, dword [esi + 0x6c4]
jge 0x407179
push dword [ebp - 0x10]
inc eax
push eax
lea eax, [ebp - 0x1c]
push 0x3f6
push eax
call fcn.00430c30
add esp, 0x10
push ebx
push 1
push dword [ebp - 0x1c]
call fcn.00438e8d
cmp eax, 2
mov dword [ebp - 0x14], eax
je 0x4071ac
inc dword [ebp - 0x18]
mov eax, dword [ebp - 0x18]
cmp eax, dword [esi + 0x6c4]
jg 0x4071ac
jmp 0x407079
push 0xc1a
call fcn.00438ec5
jmp 0x4071b4
push ebx
push ebx
push dword [0x45b9a0]
call fcn.00438e8d
mov dword [ebp - 0x14], 2
push 1
pop esi
cmp dword [ebp - 0x14], esi
je 0x4071b6
xor esi, esi
lea ecx, [ebp - 0x11c]
mov byte [ebp - 4], 1
call fcn.00410ac6
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], bl
call fcn.004360aa
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call fcn.004360aa
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret
Function at 0x40ff56
Capabilities:
Get geographical location

Disassembly:
mov eax, 0x43ff3e
call fcn.0041d644
sub esp, 0x38
and dword [ebp - 0x10], 0
cmp byte [ecx + 0x90], 0
jne 0x410151
push esi
push edi
push str.COUNTRY.SYS
lea ecx, [ebp - 0x44]
call fcn.00436118
and dword [ebp - 4], 0
push str.DISPLAY.SYS
lea ecx, [ebp - 0x40]
call fcn.00436118
push str.KEYB.COM
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 1
call fcn.00436118
push str.MODE.COM
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 2
call fcn.00436118
push str.EGA.CPI
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 3
call fcn.00436118
push str.KEYBOARD.SYS
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 4
call fcn.00436118
mov eax, dword [ebp + 8]
mov byte [ebp - 4], 5
add eax, 0xdc
lea esi, [ebp - 0x44]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x14], 6
push 0x24
call fcn.00432bb3
pop ecx
mov dword [ebp - 0x1c], eax
test eax, eax
mov byte [ebp - 4], 6
je 0x41007f
push 0x45b8a8
lea ecx, [ebp + 8]
call fcn.00436118
or dword [ebp - 0x10], 1
and dword [ebp - 0x18], 0
push esi
push dword [ebp + 0xc]
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 7
push eax
call fcn.0043628d
or dword [ebp - 0x10], 2
mov edi, eax
push str.common_
lea eax, [ebp - 0x28]
push 0x45b9b0
push eax
mov dword [ebp - 4], 8
call fcn.004362f3
or dword [ebp - 0x10], 4
push esi
push eax
lea eax, [ebp - 0x24]
mov dword [ebp - 4], 9
push eax
call fcn.0043628d
or dword [ebp - 0x10], 8
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0xa
push ecx
lea ecx, [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x1c]
push edi
push eax
call fcn.00410dde
jmp 0x410081
xor eax, eax
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 4], 0xe
push eax
call fcn.0040a108
test byte [ebp - 0x10], 8
mov dword [ebp - 4], 0xd
je 0x4100b0
and dword [ebp - 0x10], 0xfffffff7
lea ecx, [ebp - 0x24]
call fcn.004360aa
test byte [ebp - 0x10], 4
mov dword [ebp - 4], 0xc
je 0x4100c9
and dword [ebp - 0x10], 0xfffffffb
lea ecx, [ebp - 0x28]
call fcn.004360aa
test byte [ebp - 0x10], 2
mov dword [ebp - 4], 0xb
je 0x4100e2
and dword [ebp - 0x10], 0xfffffffd
lea ecx, [ebp - 0x2c]
call fcn.004360aa
test byte [ebp - 0x10], 1
mov dword [ebp - 4], 5
je 0x4100fb
and dword [ebp - 0x10], 0xfffffffe
lea ecx, [ebp + 8]
call fcn.004360aa
add esi, 4
dec dword [ebp - 0x14]
jne 0x40fff1
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 4
call fcn.004360aa
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 3
call fcn.004360aa
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 2
call fcn.004360aa
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 1
call fcn.004360aa
and byte [ebp - 4], 0
lea ecx, [ebp - 0x40]
call fcn.004360aa
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x44]
call fcn.004360aa
pop edi
pop esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
leave
ret 8