joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403ac0
Capabilities:
Allocate or change rwx memory
Create thread
Inject thread
Spawn thread to rwx shellcode

Disassembly:
push ecx
mov eax, dword [0x438008]
push esi
push 0x40
push 0x1000
push 0xe
push 0
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov esi, eax
test esi, esi
je 0x403b20
mov edx, dword [0x438008]
lea ecx, [esp + 4]
push ecx
push 0xe
push str..plugins.dll
push esi
push edx
mov dword [esp + 0x18], 0
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x403b25
cmp dword [esp + 4], 0xe
je 0x403b25
mov eax, dword [0x438008]
push 0x4000
push 0xe
push esi
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
xor al, al
pop esi
pop ecx
ret
push 0x40d494
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x403b20
mov ecx, dword [0x438008]
push edi
push 0
push 0
push esi
push eax
push 0
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov edi, eax
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [0x438008]
push 0x4000
push 0xe
push esi
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov al, 1
pop esi
pop ecx
ret

Function at 0x403bc0
Capabilities:
Check os version

Disassembly:
sub esp, 0x98
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x94], eax
lea eax, [esp]
push eax
mov dword [esp + 4], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esp + 0x10]
xor eax, eax
cmp ecx, 1
jne 0x403c78
mov ecx, dword [esp + 8]
cmp ecx, 0xa
jne 0x403c4c
mov ecx, dword [esp + 0xc]
and ecx, 0xffff
cmp ecx, 0x7ce
jne 0x403c2a
mov eax, 1
mov ecx, dword [esp + 0x94]
xor ecx, esp
call fcn.004098be
add esp, 0x98
ret
cmp ecx, 0x8ae
jne 0x403c94
mov eax, 2
mov ecx, dword [esp + 0x94]
xor ecx, esp
call fcn.004098be
add esp, 0x98
ret
cmp ecx, 0x5a
jne 0x403c94
movzx ecx, word [esp + 0xc]
cmp ecx, 0xbb8
jne 0x403c94
mov eax, 3
mov ecx, dword [esp + 0x94]
xor ecx, esp
call fcn.004098be
add esp, 0x98
ret
cmp ecx, 2
jne 0x403c94
mov eax, 4
cmp dword [esp + 4], eax
jbe 0x403c94
xor eax, eax
cmp dword [esp + 8], eax
setne al
add eax, 5
mov ecx, dword [esp + 0x94]
xor ecx, esp
call fcn.004098be
add esp, 0x98
ret
Function at 0x403cb0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
sub esp, 0x2c
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x28], eax
mov ecx, dword [0x438028]
push ebx
push edi
push fcn.00401000
lea eax, [esp + 0x14]
push eax
push ecx
mov eax, 0x500000
mov ebx, 8
mov byte [esp + 0x1c], 0x83
mov byte [esp + 0x1d], 0xe0
mov byte [esp + 0x1e], 0x70
mov byte [esp + 0x1f], 0x33
mov byte [esp + 0x20], 0xd2
mov byte [esp + 0x21], 0x66
mov byte [esp + 0x22], 0x8b
mov byte [esp + 0x23], 0x11
call fcn.004011c0
mov edi, eax
xor ebx, ebx
add esp, 0xc
mov dword [esp + 0xc], edi
cmp edi, ebx
je 0x403dd8
mov edx, dword [0x438028]
push esi
push 0x40
push 0x1000
push 5
push ebx
push edx
mov byte [esp + 0x40], 0xe9
mov dword [esp + 0x41], ebx
mov dword [esp + 0x20], ebx
mov byte [esp + 0x30], 0x25
mov byte [esp + 0x31], 0xf0
mov byte [esp + 0x32], bl
mov byte [esp + 0x33], bl
mov byte [esp + 0x34], bl
mov byte [esp + 0x35], 0x33
mov byte [esp + 0x36], 0xd2
mov byte [esp + 0x37], 0x68
mov byte [esp + 0x38], bl
mov byte [esp + 0x39], bl
mov byte [esp + 0x3a], bl
mov byte [esp + 0x3b], bl
mov byte [esp + 0x3c], 0xc3
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov esi, eax
mov dword [esp + 0x14], esi
cmp esi, ebx
je 0x403dd7
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x10]
sub eax, ebx
sub eax, 5
mov dword [esp + 0x2d], eax
lea eax, [esp + 0x1c]
add eax, 8
mov ecx, dword [esp + 0x10]
add ecx, 5
mov dword [eax], ecx
mov edx, dword [0x438028]
lea eax, [esp + 0xc]
push eax
push 5
lea ecx, [esp + 0x34]
push ecx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push edx
call edi
mov edx, dword [0x438028]
lea eax, [esp + 0xc]
push eax
push 0xd
lea ecx, [esp + 0x24]
push ecx
push esi
push edx
call edi
pop esi
mov ecx, dword [esp + 0x30]
pop edi
pop ebx
xor ecx, esp
call fcn.004098be
add esp, 0x2c
ret
Function at 0x403df0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
sub esp, 0x44
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x40], eax
xor eax, eax
push ebx
mov bl, 0x72
mov byte [esp + 0x15], bl
mov byte [esp + 0x25], bl
mov bl, 0xff
push esi
mov cl, 0x3d
mov dword [esp + 0x1d], eax
mov byte [esp + 0x15], al
mov byte [esp + 0x16], al
mov byte [esp + 0x18], al
mov byte [esp + 0x25], al
mov byte [esp + 0x26], al
mov byte [esp + 0x28], al
mov byte [esp + 0x2d], al
mov byte [esp + 0x2e], al
mov byte [esp + 0x2f], al
mov byte [esp + 0x30], al
mov byte [esp + 0x34], al
mov byte [esp + 0x36], al
mov byte [esp + 0x37], al
mov byte [esp + 0x38], al
mov byte [esp + 0x39], al
mov byte [esp + 0x3c], al
mov byte [esp + 0x3d], al
mov byte [esp + 0x3f], al
mov byte [esp + 0x41], al
mov byte [esp + 0x42], al
mov byte [esp + 0x43], al
mov byte [esp + 0x44], al
mov dword [esp + 8], eax
mov byte [esp + 0x31], bl
mov byte [esp + 0x32], bl
mov bl, 0xc3
push fcn.00401000
lea eax, [esp + 0x18]
mov byte [esp + 0x18], cl
mov byte [esp + 0x28], cl
mov byte [esp + 0x3f], cl
mov ecx, dword [0x438028]
push eax
mov dl, 4
mov byte [esp + 0x42], bl
mov byte [esp + 0x4d], bl
push ecx
mov eax, 0x500000
mov ebx, 7
mov byte [esp + 0x28], 0xe9
mov byte [esp + 0x23], dl
mov byte [esp + 0x26], 0xc
mov byte [esp + 0x33], 0xa
mov byte [esp + 0x36], 0x10
mov byte [esp + 0x37], 0xc7
mov byte [esp + 0x38], 5
mov byte [esp + 0x3f], 0xf
mov byte [esp + 0x41], 0x68
mov byte [esp + 0x4a], dl
mov byte [esp + 0x4c], 0x68
call fcn.004011c0
mov esi, eax
add esp, 0xc
mov dword [esp + 0x10], esi
test esi, esi
je 0x403fad
mov edx, dword [0x438028]
push edi
push 0x40
push 0x1000
push 5
push 0
push edx
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov edi, eax
mov dword [esp + 0x18], edi
test edi, edi
je 0x403fac
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x14]
sub eax, ebx
sub eax, 5
mov dword [esp + 0x21], eax
lea eax, [esp + 0x28]
add eax, 0x1d
mov ecx, dword [esp + 0x14]
add ecx, 5
mov dword [eax], ecx
lea eax, [esp + 0x28]
add eax, 0x12
mov ecx, dword [esp + 0x14]
add ecx, 0x11
add ecx, 0x41
mov dword [eax], ecx
mov edx, dword [0x438028]
push 0
push 4
lea eax, [esp + 0x18]
push eax
lea ecx, [esi + 9]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
lea eax, [esp + 0x28]
add eax, 9
lea ecx, [esp + 0x10]
mov ecx, dword [ecx]
mov dword [eax], ecx
mov edx, dword [0x438028]
lea eax, [esp + 0xc]
push eax
push 5
lea ecx, [esp + 0x28]
push ecx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push edx
call esi
mov edx, dword [0x438028]
lea eax, [esp + 0xc]
push eax
push 0x22
lea ecx, [esp + 0x30]
push ecx
push edi
push edx
call esi
pop edi
mov ecx, dword [esp + 0x48]
pop esi
pop ebx
xor ecx, esp
call fcn.004098be
add esp, 0x44
ret
Function at 0x403fc0
Capabilities:
Allocate or change rwx memory

Disassembly:
sub esp, 0x20
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x1c], eax
push ebx
push esi
push 0x40
xor ebx, ebx
push 0x1000
mov al, 0xc1
push 0x17
mov byte [esp + 0x18], al
mov byte [esp + 0x26], al
mov byte [esp + 0x2b], al
mov eax, dword [0x438028]
mov cl, 8
push ebx
push eax
mov byte [esp + 0x21], 0xe2
mov byte [esp + 0x22], cl
mov byte [esp + 0x23], 0x80
mov byte [esp + 0x24], 0xbc
mov byte [esp + 0x25], 0x87
mov byte [esp + 0x26], cl
mov byte [esp + 0x27], 0x33
mov byte [esp + 0x28], bl
mov byte [esp + 0x29], bl
mov byte [esp + 0x2a], 0xf0
mov byte [esp + 0x2b], 0x72
mov byte [esp + 0x2c], 6
mov byte [esp + 0x2d], 0x81
mov byte [esp + 0x2f], bl
mov byte [esp + 0x30], 1
mov byte [esp + 0x31], bl
mov byte [esp + 0x32], bl
mov byte [esp + 0x34], 0xe1
mov byte [esp + 0x35], 0x10
mov byte [esp + 0x36], 0xc3
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov esi, eax
cmp esi, ebx
je 0x404098
mov eax, dword [0x438028]
lea ecx, [esp + 8]
push ecx
push 0x17
lea edx, [esp + 0x14]
push edx
push esi
push eax
mov dword [esp + 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x4040af
cmp dword [esp + 8], 0x17
je 0x4040af
mov ecx, dword [0x438028]
push 0x4000
push 0x17
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
pop esi
mov dword [0x43808c], ebx
pop ebx
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.004098be
add esp, 0x20
ret
mov ecx, dword [esp + 0x24]
mov dword [0x43808c], esi
pop esi
pop ebx
xor ecx, esp
call fcn.004098be
add esp, 0x20
ret

Function at 0x404310
Capabilities:
Hijack thread execution
Resume thread
Suspend thread

Disassembly:
push ebx
push ebp
push edi
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
mov ebp, dword [sym.imp.USER32.dll_PostMessageA]
push 0
push 0
push 0x400
push ebx
call ebp
push 0
push 0
push 0x400
push ebx
call ebp
push 0
push 0
push 0x400
push ebx
call ebp
mov ebx, dword [sym.imp.KERNEL32.dll_ResumeThread]
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
push esi
call ebx
push 0x1e
call ebp
push esi
call dword [sym.imp.KERNEL32.dll_SuspendThread]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
mov eax, dword [esp + 0xc]
cmp dword [edi + 0xb8], eax
jne 0x404352
pop ebp
pop ebx
ret
Function at 0x4048e0
Capabilities:
Set console window title

Disassembly:
push esi
push edi
call dword [sym.imp.KERNEL32.dll_AllocConsole]
mov esi, dword [sym.imp.MSVCR90.dll___iob_func]
call esi
mov edi, dword [sym.imp.MSVCR90.dll_freopen]
push eax
push 0x40d2f4
push str.CONIN_
call edi
call esi
add eax, 0x20
push eax
push 0x40d548
push str.CONOUT_
call edi
call esi
add eax, 0x40
push eax
push 0x40d548
push str.CONOUT_
call edi
mov eax, dword [esp + 0x30]
add esp, 0x24
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
pop edi
pop esi
ret

Function at 0x404940
Capabilities:
Create directory

Disassembly:
push 0
push str..kawaks_loader.ini
call dword [sym.imp.MSVCR90.dll__access]
add esp, 8
cmp eax, 0xffffffff
jne 0x4049aa
mov eax, dword [0x438094]
push esi
push 0
push str.kawaks_loader
push 0x40d568
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
call fcn.00408870
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push 0
push 0x40d690
call esi
push 0
push str.Romdata_neogeo
call esi
push 0
push str.Romdatacps1
call esi
push 0
push str.Romdatacps2
call esi
push 0
push str.plugins
call esi
xor al, al
pop esi
ret
mov al, 1
ret

Function at 0x4049b0
Capabilities:
Create process on windows
Create process suspended
Resume thread
Suspend thread

Disassembly:
push ecx
push 0x44
push 0
push 0x438038
mov byte [esp + 0xf], 0
call sub.MSVCR90.dll_memset
add esp, 0xc
push 0x438028
xor eax, eax
push 0x438038
push eax
push eax
push 4
push eax
push eax
push eax
push eax
push str..WinKawaks.exe
mov dword [0x438028], eax
mov dword [0x43802c], eax
mov dword [0x438030], eax
mov dword [0x438034], eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x404a02
xor al, al
pop ecx
ret
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_SuspendThread]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_ResumeThread]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, edi
mov eax, dword [0x43802c]
push eax
call esi
push 0xa
call edi
mov ecx, dword [0x43802c]
push ecx
call ebp
mov eax, dword [0x438028]
push 0
push 1
lea edx, [esp + 0x1b]
push edx
push 0x4f81a4
push eax
call ebx
cmp byte [esp + 0x13], 0x55
jne 0x404a20
mov ecx, dword [0x43802c]
push ecx
call esi
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
pop ecx
ret
Function at 0x404a70
Capabilities:
Read .ini file
Terminate process

Disassembly:
cmp byte [0x438090], 1
jne 0x404a86
call fcn.00403760
push 0
call dword [sym.imp.MSVCR90.dll_exit]
cmp byte [0x438091], 1
jne 0x404adf
call fcn.004049b0
test al, al
je 0x404ba9
push str.SaveNeoGeoDat
call fcn.004048e0
push str.Playing..._n_n
call dword [sym.imp.MSVCR90.dll_printf]
add esp, 8
push 0x41a118
call fcn.0040a11e
call fcn.00409190
call dword [sym.imp.KERNEL32.dll_FreeConsole]
mov eax, dword [0x438028]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push 0
call dword [sym.imp.MSVCR90.dll_exit]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push edi
push str..kawaks_loader.ini
push 0
push str.SaveCps1Dat
push str.SaveRomData
call esi
push str..kawaks_loader.ini
push 0
push str.SaveCps2Dat
push str.SaveRomData
mov edi, eax
call esi
cmp edi, 1
pop edi
pop esi
jne 0x404b67
call fcn.004049b0
test al, al
je 0x404ba9
push str.SaveCps1Dat
call fcn.004048e0
push str.Playing..._n_n
call dword [sym.imp.MSVCR90.dll_printf]
add esp, 8
push 0x41a118
call fcn.0040a11e
call fcn.00407c20
call dword [sym.imp.KERNEL32.dll_FreeConsole]
mov ecx, dword [0x438028]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push 0
call dword [sym.imp.MSVCR90.dll_exit]
cmp eax, 1
jne 0x404ba9
call fcn.004049b0
test al, al
je 0x404ba9
push str.SaveCps2Dat
call fcn.004048e0
add esp, 4
call fcn.00407320
call fcn.00408290
call dword [sym.imp.KERNEL32.dll_FreeConsole]
mov edx, dword [0x438028]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push 0
call dword [sym.imp.MSVCR90.dll_exit]
ret

Function at 0x404cf0
Capabilities:
Read .ini file

Disassembly:
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push edi
push str..kawaks_loader.ini
push 0
push str.OpenGameTitle
push str.Options
call esi
push str..kawaks_loader.ini
push 0
push str.OpenHackRomdata
push str.Options
mov edi, eax
call esi
push str..kawaks_loader.ini
push 0
push str.OpenPlugins
push str.Plugins
mov ebx, eax
call esi
cmp eax, 1
jne 0x404d40
call fcn.004036f0
mov eax, dword [0x43802c]
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp edi, 1
jne 0x404d58
call fcn.00409640
jmp 0x404d62
cmp ebx, 1
jne 0x404d62
call fcn.00404c30
mov ecx, dword [0x438098]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [0x438098]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
ret
Function at 0x404dc0
Capabilities:
Check for software breakpoints
Create process on windows
Create process suspended
Create thread
Read .ini file
Suspend thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
push 0x438028
push 0x438038
push 0
push 0
push 4
push 0
push 0
push 0
push 0
push str..WinKawaks.exe
mov byte [ebp - 1], 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x404e12
push eax
mov eax, dword [0x438094]
push str.kawaks_loader
push 0x40d318
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str..kawaks_loader.ini
push 0
push str.Unpack
push str.Process
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov esi, eax
test esi, esi
jne 0x404e32
lea esi, [eax + 0xa]
mov edi, dword [sym.imp.KERNEL32.dll_ResumeThread]
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, edi
mov ecx, dword [0x43802c]
push ecx
call edi
push esi
call ebx
mov edx, dword [0x43802c]
push edx
call dword [sym.imp.KERNEL32.dll_SuspendThread]
mov ecx, dword [0x438028]
push 0
push 1
lea eax, [ebp - 1]
push eax
push 0x4f81a4
push ecx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
cmp byte [ebp - 1], 0x55
jne 0x404e40
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0x40d4b4
push str.kernel32.dll
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call edi
push 0x40d4c8
push str.kernel32.dll
mov ebx, eax
call esi
push eax
call edi
cmp byte [ebx], 0xcc
je 0x404eaf
cmp byte [eax], 0xcc
jne 0x404eb8
push 0xc350c483
mov eax, esp
call eax
lea edx, [ebp - 8]
push edx
push 0
push 0
push 0x404d90
push 0
push 0
call dword [sym.imp.MSVCR90.dll__beginthreadex]
add esp, 0x18
mov dword [0x438098], eax
call fcn.00404cf0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x405440
Capabilities:
Create process on windows
Create thread

Disassembly:
sub esp, 0x40
push esi
push 0x38
xor esi, esi
lea eax, [esp + 0x10]
push esi
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
lea ecx, [esp + 8]
push ecx
mov dword [esp + 0xc], 0x3c
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], str.runas
mov dword [esp + 0x1c], str..WinKawaks.exe
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], 5
mov dword [esp + 0x2c], esi
mov dword [esp + 0x10], 0x40
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
mov edx, dword [esp + 0x40]
lea eax, [esp + 4]
push eax
push esi
push esi
push 0x404d90
push esi
push esi
mov dword [0x438028], edx
mov dword [0x43802c], esi
call dword [sym.imp.MSVCR90.dll__beginthreadex]
add esp, 0x18
mov dword [0x438098], eax
call fcn.00404cf0
pop esi
add esp, 0x40
ret

Function at 0x4054d0
Capabilities:
Create process on windows
Create thread
Read .ini file
Resume thread

Disassembly:
push ecx
push 0x438028
push 0x438038
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push str..WinKawaks.exe
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x405511
push eax
mov eax, dword [0x438094]
push str.kawaks_loader
push 0x40d318
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
pop ecx
ret
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [esp]
push ecx
push 0
push 0
push 0x404d90
push 0
push 0
call dword [sym.imp.MSVCR90.dll__beginthreadex]
mov dword [0x438098], eax
add esp, 0x1c
jmp fcn.00404cf0

Function at 0x405540
Capabilities:
Read .ini file

Disassembly:
call fcn.00401270
cmp al, 1
jne 0x4055e4
push 0x44
push 0
push 0x438038
call sub.MSVCR90.dll_memset
add esp, 0xc
xor eax, eax
push str..kawaks_loader.ini
push eax
push str.Create
push str.Process
mov dword [0x438028], eax
mov dword [0x43802c], eax
mov dword [0x438030], eax
mov dword [0x438034], eax
mov dword [0x438038], 0x44
mov dword [0x438064], 0x80
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
test eax, eax
jne 0x4055a9
call fcn.00404dc0
jmp 0x4055cb
cmp eax, 1
jne 0x4055b5
call fcn.00405120
jmp 0x4055cb
cmp eax, 2
jne 0x4055c1
call fcn.00405440
jmp 0x4055cb
cmp eax, 3
jne 0x4055e4
call fcn.004054d0
mov eax, dword [0x438028]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov ecx, dword [0x43802c]
push ecx
call esi
pop esi
ret
Function at 0x406060
Capabilities:
Allocate or change rwx memory
Create thread
Inject thread
Spawn thread to rwx shellcode

Disassembly:
sub esp, 0x14
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x10], eax
cmp byte [0x43807c], 1
je 0x40616b
push ebx
xor ebx, ebx
mov al, 0xc3
push esi
mov byte [esp + 0xc], 0xb8
mov byte [esp + 0xd], bl
mov byte [esp + 0xe], bl
mov byte [esp + 0xf], bl
mov byte [esp + 0x10], bl
mov byte [esp + 0x11], 0xc6
mov byte [esp + 0x12], bl
mov byte [esp + 0x13], al
mov byte [esp + 0x14], al
mov eax, 0x430380
lea ecx, [esp + 0xc]
add ecx, 1
mov dword [ecx], eax
mov eax, dword [0x438028]
push 0x40
push 0x1000
push 9
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov esi, eax
cmp esi, ebx
je 0x406169
mov eax, dword [0x438028]
lea ecx, [esp + 8]
push ecx
push 9
lea edx, [esp + 0x14]
push edx
push esi
push eax
mov dword [esp + 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x406123
cmp dword [esp + 8], 9
je 0x406123
mov ecx, dword [0x438028]
push 0x4000
push 9
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
pop esi
pop ebx
mov ecx, dword [esp + 0x10]
xor ecx, esp
call fcn.004098be
add esp, 0x14
ret
mov edx, dword [0x438028]
push edi
push ebx
push ebx
push ebx
push esi
push ebx
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov edi, eax
cmp edi, ebx
je 0x406154
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [0x43807c], 1
mov eax, dword [0x438028]
push 0x4000
push 9
push esi
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x10]
xor ecx, esp
call fcn.004098be
add esp, 0x14
ret
Function at 0x406fb0
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 8
push ebx
push esi
push edi
push 0
push 0x80
push 4
push 0
push 3
push 0xc0000000
push eax
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x407020
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
je 0x407020
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push 0
lea ecx, [esp + 0x14]
push ecx
push esi
mov ebx, eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
push ebx
call fcn.004067d0
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
add esp, 8
ret
Function at 0x407030
Capabilities:
Enumerate files on windows
Get common file path
Get file size
Read file on windows

Disassembly:
sub esp, 0x46c
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x464], eax
push ebx
push ebp
push esi
push edi
push 0x103
lea eax, [esp + 0x36d]
push 0
push eax
mov esi, ecx
mov byte [esp + 0x374], 0
call sub.MSVCR90.dll_memset
add esp, 0xc
push 0x103
lea ecx, [esp + 0x265]
push 0
push ecx
mov byte [esp + 0x26c], 0
call sub.MSVCR90.dll_memset
add esp, 0xc
push 0x103
lea edx, [esp + 0x15d]
push 0
push edx
mov byte [esp + 0x164], 0
call sub.MSVCR90.dll_memset
add esp, 0xc
lea eax, [esp + 0x158]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov ebx, dword [sym.imp.MSVCR90.dll_sprintf]
push str.RomdataNeoGeo
lea ecx, [esp + 0x15c]
push ecx
mov edx, ecx
push str._s_s
push edx
call ebx
push esi
lea eax, [esp + 0x16c]
push eax
lea ecx, [esp + 0x380]
push str._s._s
push ecx
call ebx
add esp, 0x20
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x36c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
mov dword [esp + 0x10], edi
cmp edi, 0xffffffff
je 0x407219
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x15c]
push edx
lea eax, [esp + 0x268]
push str._s_s
push eax
call ebx
add esp, 0x10
lea eax, [esp + 0x260]
call fcn.00406fb0
lea ecx, [esp + 0x18]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x407212
push 0x104
lea edx, [esp + 0x264]
push 0
push edx
call sub.MSVCR90.dll_memset
add esp, 0xc
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x15c]
push ecx
lea edx, [esp + 0x268]
push str._s_s
push edx
call ebx
add esp, 0x10
push 0
push 0x80
push 4
push 0
push 3
push 0xc0000000
lea eax, [esp + 0x278]
push eax
mov dword [esp + 0x30], 0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4071fe
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
test ebp, ebp
je 0x4071fe
push ebp
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push 0
lea ecx, [esp + 0x18]
push ecx
push ebp
mov edi, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebp
push edi
call fcn.004067d0
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esp + 0x10]
lea edx, [esp + 0x18]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x407153
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [esp + 0x474]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004098be
add esp, 0x46c
ret