joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40812c
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x348
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push 0x2a
push ebx
call fcn.0040a260
pop ecx
test eax, eax
pop ecx
jne 0x408181
push 0x3f
push ebx
call fcn.0040a260
pop ecx
test eax, eax
pop ecx
jne 0x408181
push ebx
call fcn.0040829d
cmp dword [ebp + 0x10], 0
pop ecx
je 0x408295
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0
je 0x408295
push ebx
push eax
call fcn.004096fc
pop ecx
jmp 0x408294
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push ebx
call edi
cmp eax, 3
jl 0x408205
lea eax, [eax + ebx - 3]
push 0x4115f8
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x408205
push ebx
call edi
cmp eax, 4
jl 0x4081fe
lea eax, [ebp - 0x100]
push 0x100
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea eax, [ebp - 0x100]
push eax
push ebx
call esi
test eax, eax
je 0x4081fe
lea eax, [ebp - 0x100]
push 0x100
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [ebp - 0x100]
push eax
push ebx
call esi
test eax, eax
je 0x4081fe
push dword [0x4148b8]
push ebx
call esi
test eax, eax
jne 0x408205
xor eax, eax
jmp 0x408298
lea eax, [ebp - 0x100]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push eax
call ebx
lea eax, [ebp - 0x100]
push eax
call edi
lea esi, [ebp + eax - 0x101]
lea eax, [ebp - 0x100]
cmp esi, eax
jbe 0x408237
cmp byte [esi], 0x5c
je 0x40823c
dec esi
jmp 0x408225
cmp byte [esi], 0x5c
jne 0x40823d
inc esi
lea eax, [ebp - 0x348]
push eax
lea eax, [ebp - 0x100]
push 7
push eax
call fcn.00408b64
add esp, 0xc
test eax, eax
jne 0x408288
test byte [ebp - 0x248], 0x10
jne 0x408279
lea eax, [ebp - 0x348]
push eax
push esi
call ebx
lea eax, [ebp - 0x100]
push eax
call fcn.0040829d
pop ecx
lea eax, [ebp - 0x348]
push eax
call fcn.00408ba6
pop ecx
jmp 0x408255
lea eax, [ebp - 0x348]
push eax
call fcn.00408be3
pop ecx
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40832c
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x454
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push edi
push dword [ebp + 8]
push dword [0x4148d0]
call esi
mov edi, dword [ebp + 0xc]
push edi
push dword [0x4148d0]
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push dword [0x4148d0]
push 0x3ef
push dword [0x414838]
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call fcn.00407d39
pop ecx
pop ecx
push dword [0x4148d0]
call fcn.00407537
pop ecx
lea eax, [ebp - 0x154]
push edi
push eax
call esi
lea eax, [ebp - 0x154]
push eax
call fcn.00409911
pop ecx
xor ebx, ebx
lea ecx, [ebp - 0x154]
cmp eax, ecx
jbe 0x4083aa
mov byte [eax - 1], bl
lea eax, [ebp - 0x154]
push ebx
push eax
call fcn.00408bfa
pop ecx
lea eax, [ebp - 0x154]
pop ecx
push eax
call fcn.0040a150
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [eax + edi - 3]
cmp eax, edi
jae 0x4083d7
mov eax, edi
push 0x411190
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
push edi
jne 0x408461
lea eax, [ebp - 0x254]
push eax
call esi
lea eax, [ebp - 0x254]
push ebx
push eax
call fcn.00408bfa
pop ecx
lea eax, [ebp - 0x54]
pop ecx
push 0x44
pop esi
push esi
push ebx
push eax
call fcn.0040a1f0
add esp, 0xc
lea eax, [ebp - 0x254]
mov dword [ebp - 0x54], esi
push eax
lea eax, [ebp - 0x454]
push str._s__UNREGSERVER
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x54]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x454]
push ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x4084dc
push 0xffffffffffffffff
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x4084dc
call fcn.00408da4
cmp eax, ebx
pop ecx
je 0x4084dc
push str.OLE32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmp eax, ebx
mov dword [ebp + 8], eax
je 0x4084dc
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.OleInitialize
push eax
call esi
cmp eax, ebx
je 0x4084c3
push ebx
call eax
test eax, eax
jne 0x4084c3
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x4084c3
cmp dword [ebp + 0x10], ebx
mov eax, str.DllRegisterServer
jne 0x4084b2
mov eax, str.DllUnregisterServer
push eax
push edi
call esi
cmp eax, ebx
je 0x4084bc
call eax
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push str.OleUninitialize
push dword [ebp + 8]
call esi
cmp eax, ebx
je 0x4084d3
call eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4084e1
Capabilities:
Delete registry key
Query or enumerate registry key
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30c
push ebx
push esi
xor esi, esi
push edi
cmp dword [0x414854], esi
je 0x4086de
lea eax, [ebp - 4]
mov edi, str.SoftwareBorlandDatabase_Engine
push eax
push 0x1f
push esi
push edi
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4086de
lea eax, [ebp - 8]
mov ebx, 0x100
push eax
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0xc]
push eax
push esi
mov esi, str.UseCount
mov dword [ebp - 8], ebx
push esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4086d5
or eax, 0xffffffff
cmp dword [ebp - 0xc], 1
jne 0x408562
lea eax, [ebp - 0x10c]
push eax
call fcn.0040a660
pop ecx
jmp 0x40857a
cmp dword [ebp - 0xc], 4
je 0x408574
cmp dword [ebp - 0xc], 3
jne 0x40857a
cmp dword [ebp - 8], 4
jne 0x40857a
mov eax, dword [ebp - 0x10c]
cmp eax, 1
jne 0x408698
push 0
push str.IB_Server
call dword [sym.imp.USER32.dll_FindWindowA]
test eax, eax
je 0x4085e7
lea eax, [ebp - 0x30c]
push ebx
push eax
push 0x1c
push dword [0x414bf0]
call fcn.00408ff4
add esp, 0x10
lea eax, [ebp - 0x20c]
push ebx
push eax
push 0x19
push dword [0x414bf0]
call fcn.00408ff4
add esp, 0x10
lea eax, [ebp - 0x20c]
push 2
push eax
lea eax, [ebp - 0x30c]
push eax
push dword [0x414838]
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 3
je 0x4085f1
jmp 0x4085ea
push 5
pop eax
cmp eax, 5
je 0x4085f9
jmp 0x408583
push 1
pop eax
jmp 0x4086e0
push dword [ebp - 4]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
push 2
push edi
call fcn.004086e5
pop ecx
pop ecx
push 2
push str.SoftwareBorlandBLW32
call fcn.004086e5
pop ecx
lea eax, [ebp - 4]
pop ecx
mov edi, str.SoftwareBorland
push eax
push 0x1f
push 0
push edi
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4086de
push eax
push eax
push eax
lea ecx, [ebp - 8]
push eax
push ecx
lea ecx, [ebp - 0x10c]
push ecx
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
xor ecx, ecx
cmp eax, ecx
je 0x408691
push ecx
push ecx
push ecx
lea eax, [ebp - 8]
push ecx
push eax
lea eax, [ebp - 0x10c]
mov dword [ebp - 8], ebx
push eax
push ecx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
push dword [ebp - 4]
mov ebx, eax
call esi
test ebx, ebx
je 0x4086de
push edi
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
jmp 0x4086de
push dword [ebp - 4]
call esi
jmp 0x4086de
jle 0x4086de
dec eax
push eax
lea eax, [ebp - 0x10c]
push 0x411678
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
lea eax, [ebp - 0x10c]
push eax
push 1
push 0
push esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4086e5
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x190
push ebx
push esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 4], ebx
push dword [ebp + 8]
lea eax, [ebp - 0x190]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x190]
push 0x4110cc
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp dword [0x414854], ebx
lea esi, [ebp + eax - 0x18f]
je 0x40877b
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp + 0xc]
push 0x1f
push ebx
push dword [ebp + 8]
push dword [eax*4 + 0x411020]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4087bf
push ebx
push ebx
push ebx
lea eax, [ebp - 0x10]
push ebx
push eax
push esi
push ebx
push dword [ebp - 0xc]
mov dword [ebp - 0x10], 0x100
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
push dword [ebp - 0xc]
mov esi, eax
call edi
cmp esi, ebx
jne 0x4087bf
jmp 0x4087ac
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x4087bf
push 0x100
push esi
push ebx
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
push dword [ebp - 8]
mov esi, eax
call edi
cmp esi, ebx
jne 0x4087bf
push dword [ebp + 0xc]
lea eax, [ebp - 0x190]
push eax
call fcn.004086e5
pop ecx
pop ecx
jmp 0x4087c6
mov dword [ebp - 4], 0x800
inc dword [ebp - 4]
cmp dword [ebp - 4], 0x800
jl 0x4086fc
cmp dword [0x414854], ebx
push dword [ebp + 8]
je 0x4087ed
mov eax, dword [ebp + 0xc]
push dword [eax*4 + 0x411020]
jmp 0x4087f2
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x408869
Capabilities:
Delete directory

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
push 0
push edi
call fcn.00408b41
pop ecx
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov esi, eax
neg esi
sbb esi, esi
inc esi
cmp dword [0x41487c], 0
je 0x4088a5
test esi, esi
jne 0x4088a5
mov eax, dword [0x414cec]
test eax, eax
je 0x4088a5
push esi
push edi
push 1
push 0x10
call eax
mov eax, esi
pop edi
pop esi
ret
Function at 0x408b41
Capabilities:
Set file attributes

Disassembly:
cmp dword [esp + 8], 0
jne 0x408b50
mov dword [esp + 8], 0x80
push dword [esp + 8]
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
neg eax
sbb eax, eax
inc eax
ret

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

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
dec ecx
mov eax, ecx
ret

Function at 0x408da4
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
push ebx
push edi
push dword [ebp + 8]
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
xor edi, edi
lea eax, [ebp - 0x108]
push edi
push eax
call fcn.00408bfa
cmp dword [0x414854], edi
pop ecx
pop ecx
mov dword [ebp - 4], edi
je 0x408e40
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll__lopen]
mov ebx, eax
cmp ebx, edi
jl 0x408e40
push esi
mov esi, dword [sym.imp.KERNEL32.dll__lread]
lea eax, [ebp + 0xa]
push 2
push eax
push ebx
call esi
cmp word [ebp + 0xa], 0x5a4d
jne 0x408e38
push edi
mov edi, dword [sym.imp.KERNEL32.dll__llseek]
push 0x3c
push ebx
call edi
lea eax, [ebp - 8]
push 4
push eax
push ebx
call esi
push 0
push dword [ebp - 8]
push ebx
call edi
lea eax, [ebp + 0xa]
push 2
push eax
push ebx
call esi
cmp word [ebp + 0xa], 0x4550
jne 0x408e38
mov dword [ebp - 4], 1
push ebx
call dword [sym.imp.KERNEL32.dll__lclose]
pop esi
mov eax, dword [ebp - 4]
pop edi
pop ebx
leave
ret

Function at 0x408ff4
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x220
push ebx
push esi
push edi
lea eax, [ebp - 0x20]
push dword [ebp + 0xc]
push str.Msg_d
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, dword [ebp + 0x10]
add esp, 0xc
lea eax, [ebp - 0x20]
push dword [0x414c14]
push dword [ebp + 0x14]
push ebx
push 0x411750
push eax
push str.Language
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
cmp byte [ebx], 0x7f
mov dword [ebp + 0x10], eax
jne 0x409055
cmp eax, 1
jne 0x409055
push dword [ebp + 0x14]
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_LoadStringA]
jmp 0x40909d
push 0x7c
push ebx
call fcn.0040a260
mov edi, eax
pop ecx
test edi, edi
pop ecx
je 0x40909d
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [edi + 1]
push eax
lea eax, [ebp - 0x220]
push eax
call esi
push 0x411740
push edi
call esi
lea eax, [ebp - 0x220]
add edi, 2
push eax
push edi
call esi
push 0x7c
push ebx
call fcn.0040a260
mov edi, eax
pop ecx
test edi, edi
pop ecx
jne 0x40906b
mov eax, dword [ebp + 0x10]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4090a5
Capabilities:
Delete service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push 1
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
je 0x4090f7
push edi
push esi
push 0x10020
push dword [ebp + 8]
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
test edi, edi
je 0x4090f2
lea eax, [ebp - 0x1c]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push edi
call esi
push ebx
call esi
pop esi
pop edi
pop ebx
leave
ret
Function at 0x4093a8
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x100
push ebx
push esi
push edi
push dword [0x414840]
call dword [sym.imp.USER32.dll_GetDC]
push dword [0x414c14]
mov ebx, eax
mov edi, 0x100
lea eax, [ebp - 0x100]
push edi
push eax
push 0x414440
mov esi, str.Settings
push str.Text_Font
push esi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
cmp byte [ebp - 0x100], 0
je 0x40940e
push edi
call fcn.00409a43
pop ecx
mov dword [0x414844], eax
lea ecx, [ebp - 0x100]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push dword [0x414c14]
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push 0
push str.Font_Character_Set
push esi
call edi
push dword [0x414c14]
mov byte [0x414874], al
push 8
push str.Font_Character_Size
push esi
call edi
mov esi, dword [sym.imp.GDI32.dll_GetDeviceCaps]
push 0xc
push ebx
mov byte [0x4148c0], al
call esi
push 0xe
push ebx
call esi
push 8
push ebx
call esi
push 0xa
push ebx
mov dword [0x414914], eax
call esi
pop edi
pop esi
mov dword [0x414918], eax
pop ebx
leave
ret
Function at 0x4096fc
Capabilities:
Copy file
Get common file path
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x500
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CopyFileA]
push edi
push 0
push ebx
push dword [ebp + 8]
call esi
test eax, eax
je 0x409722
push dword [ebp + 8]
jmp 0x409744
lea eax, [ebp - 0x300]
push ebx
push eax
call fcn.004098c9
pop ecx
lea eax, [ebp - 0x300]
pop ecx
push 0
push eax
push dword [ebp + 8]
call esi
test eax, eax
jne 0x40974f
push ebx
call fcn.0040829d
pop ecx
jmp 0x4098c4
push 1
pop edi
push dword [ebp + 8]
mov dword [0x414884], edi
call fcn.0040829d
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
pop ecx
lea eax, [ebp - 0x300]
push eax
lea eax, [ebp - 0x200]
push eax
call esi
lea eax, [ebp - 0x100]
push ebx
push eax
call esi
xor esi, esi
lea eax, [ebp - 0x200]
push esi
push eax
call fcn.00408bfa
pop ecx
lea eax, [ebp - 0x100]
pop ecx
push esi
push eax
call fcn.00408bfa
mov eax, dword [0x414854]
pop ecx
cmp eax, 2
pop ecx
jne 0x4097ce
lea eax, [ebp - 0x200]
push str.WININIT.INI
push eax
lea eax, [ebp - 0x100]
push eax
push str.rename
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
jmp 0x4098c4
cmp eax, edi
jne 0x4097ef
push 4
push esi
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExA]
push ebx
call esi
push 4
lea eax, [ebp - 0x200]
push ebx
push eax
call esi
jmp 0x4098c4
lea eax, [ebp - 0x100]
push eax
call fcn.00409911
pop ecx
push eax
lea eax, [ebp - 0x200]
push eax
lea eax, [ebp - 0x100]
push eax
lea eax, [ebp - 0x500]
push str.del__s_r_nrename__s__s_r_n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
lea eax, [ebp - 0x100]
push 0x100
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x100]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [ebp + eax - 0x101], 0x5c
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
je 0x40985d
lea eax, [ebp - 0x100]
push 0x4110cc
push eax
call ebx
lea eax, [ebp - 0x100]
push 0x411700
push eax
call ebx
lea eax, [ebp - 0x100]
push edi
push eax
call dword [sym.imp.KERNEL32.dll__lopen]
mov edi, eax
cmp edi, 0xffffffff
jne 0x409892
lea eax, [ebp - 0x100]
push esi
push eax
call dword [sym.imp.KERNEL32.dll__lcreat]
mov edi, eax
jmp 0x40989c
push 2
push esi
push edi
call dword [sym.imp.KERNEL32.dll__llseek]
cmp edi, 0xffffffff
je 0x4098c4
lea eax, [ebp - 0x500]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [ebp - 0x500]
push eax
push edi
call dword [sym.imp.KERNEL32.dll__lwrite]
push edi
call dword [sym.imp.KERNEL32.dll__lclose]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x409933
Capabilities:
Delete file
Get common file path
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x300
cmp dword [0x414854], 2
push esi
push edi
jne 0x409a32
lea eax, [ebp - 0x100]
push 0x100
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [ebp - 0x100]
push eax
call esi
cmp byte [ebp + eax - 0x101], 0x5c
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
je 0x40998a
lea eax, [ebp - 0x100]
push 0x4110cc
push eax
call edi
lea eax, [ebp - 0x100]
push str.WININIT.INI
push eax
call edi
lea eax, [ebp - 0x100]
push 1
push eax
call dword [sym.imp.KERNEL32.dll__lopen]
mov edi, eax
cmp edi, 0xffffffff
je 0x4099e3
push dword [ebp + 8]
lea eax, [ebp - 0x300]
push str.NUL_s_r_n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 2
push 0
push edi
call dword [sym.imp.KERNEL32.dll__llseek]
lea eax, [ebp - 0x300]
push eax
call esi
push eax
lea eax, [ebp - 0x300]
jmp 0x409a21
lea eax, [ebp - 0x100]
push 0
push eax
call dword [sym.imp.KERNEL32.dll__lcreat]
mov edi, eax
cmp edi, 0xffffffff
je 0x409a3f
push dword [ebp + 8]
lea eax, [ebp - 0x300]
push str._rename__r_nNUL_s_r_n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x300]
push eax
call esi
push eax
lea eax, [ebp - 0x300]
push eax
push edi
call dword [sym.imp.KERNEL32.dll__lwrite]
push edi
call dword [sym.imp.KERNEL32.dll__lclose]
jmp 0x409a3f
push 4
push 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
pop edi
pop esi
leave
ret

Function at 0x409f65
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
movzx eax, word [ebp + 8]
push esi
push 2
push eax
xor esi, esi
push dword [0x414bf0]
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x409ffa
push edi
push eax
push dword [0x414bf0]
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push 0
mov esi, eax
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
lea eax, [ebp + 8]
push eax
push esi
call fcn.00409fff
pop ecx
pop ecx
mov ecx, dword [ebp + 0xc]
test eax, eax
mov dword [ecx], eax
je 0x409fcd
push 0
push eax
push edi
call dword [sym.imp.GDI32.dll_SelectPalette]
push edi
call dword [sym.imp.GDI32.dll_RealizePalette]
mov eax, dword [esi]
mov ecx, dword [ebp + 8]
push 0
push esi
lea eax, [eax + ecx*4]
add eax, esi
push eax
push 4
push esi
push edi
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
push edi
push 0
mov esi, eax
call dword [sym.imp.USER32.dll_ReleaseDC]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop edi
mov eax, esi
pop esi
leave
ret
Function at 0x40a150
Capabilities:
Get common file path
Set current directory
Set environment variable

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x10c
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x40a1d0
lea ecx, [esp + 4]
push ecx
push 0x105
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x40a1d0
mov eax, dword [esp + 4]
cmp al, 0x5c
je 0x40a185
cmp al, 0x2f
jne 0x40a192
cmp al, ah
jne 0x40a192
xor eax, eax
add esp, 0x10c
ret
and eax, 0xff
mov byte [esp], 0x3d
push eax
call fcn.0040b220
add esp, 4
mov byte [esp + 1], al
lea edx, [esp + 4]
lea eax, [esp]
push edx
push eax
mov byte [esp + 0xa], 0x3a
mov byte [esp + 0xb], 0
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
je 0x40a1d0
xor eax, eax
add esp, 0x10c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040b1b0
add esp, 4
or eax, 0xffffffff
add esp, 0x10c
ret

Function at 0x40a780
Capabilities:
Clear file content

Disassembly:
mov eax, 0x1004
call fcn.0040a670
mov eax, dword [0x414e20]
push ebx
mov ebx, dword [esp + 0x100c]
push ebp
xor ebp, ebp
push esi
cmp ebx, eax
push edi
jae 0x40a8e2
mov eax, ebx
mov ecx, ebx
sar eax, 5
and ecx, 0x1f
mov edx, dword [eax*4 + 0x414d20]
test byte [edx + ecx*8 + 4], 1
je 0x40a8e2
push 1
push ebp
push ebx
call fcn.0040bee0
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
mov dword [esp + 0x10], edi
je 0x40a8ec
push 2
push ebp
push ebx
call fcn.0040bee0
add esp, 0xc
cmp eax, 0xffffffff
je 0x40a8ec
mov ecx, dword [esp + 0x101c]
mov esi, ecx
sub esi, eax
test esi, esi
jle 0x40a888
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x14]
push 0x8000
rep stosd dword es:[edi], eax
push ebx
call fcn.0040be60
add esp, 8
mov edi, eax
cmp esi, 0x1000
mov eax, 0x1000
jge 0x40a82f
mov eax, esi
push eax
lea eax, [esp + 0x18]
push eax
push ebx
call fcn.0040bc40
add esp, 0xc
cmp eax, 0xffffffff
je 0x40a84b
sub esi, eax
test esi, esi
jle 0x40a861
jmp 0x40a820
cmp dword [0x414488], 5
jne 0x40a85e
mov dword [0x414484], 0xd
or ebp, 0xffffffff
push edi
push ebx
call fcn.0040be60
mov edi, dword [esp + 0x18]
add esp, 8
push 0
push edi
push ebx
call fcn.0040bee0
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
jge 0x40a8c9
push 0
push ecx
push ebx
call fcn.0040bee0
add esp, 0xc
push ebx
call fcn.0040b9f0
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov ebp, eax
neg ebp
sbb ebp, ebp
neg ebp
dec ebp
cmp ebp, 0xffffffff
jne 0x40a8c9
mov dword [0x414484], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x414488], eax
push 0
push edi
push ebx
call fcn.0040bee0
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
mov dword [0x414484], 9
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1004
ret