Function at 0x403ee0
Capabilities:
Copy file
Create directory
Create process on windows
Delete file
Get common file path
Get file attributes
Set file attributes

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x408adc
push eax
mov dword fs:[0], esp
sub esp, 0x114
push ebx
push ebp
push esi
push edi
mov esi, ecx
call fcn.004030d0
mov bl, al
cmp bl, 5
jne 0x403f12
call fcn.00403160
push 0
push str.C:OKGFile
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push str.C:OKGFile
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
or al, 2
push eax
push str.C:OKGFile
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp + 0x10]
call fcn.0040809a
push 1
lea ecx, [esp + 0x14]
mov dword [esp + 0x130], 0
call sub.MFC42.DLL_CString::LoadStringA
push str.C:OKGFileOKGCon.exe
push 0x9c
call fcn.00403170
add esp, 8
test eax, eax
jne 0x403f9b
mov eax, dword [esp + 0x10]
push 0x30
push eax
push 0x40d984
mov ecx, esi
call sub.MFC42.DLL_CWnd::MessageBoxA
lea ecx, [esp + 0x10]
mov dword [esp + 0x12c], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor eax, eax
jmp 0x4044c9
push str.C:OKGFileXSBIndex.ref
push 0xa7
call fcn.00403170
push str.C:OKGFileubs.okd
push 0xac
call fcn.00403170
mov ecx, dword [esi + 0x80]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
add esp, 0x10
push 0
push 0xa
push 0x402
push ecx
call ebp
push str.C:OKGFileupdate.exe
push 0xa0
call fcn.00403170
push str.C:OKGFileOKSvc.exe
push 0xa3
call fcn.00403170
mov edx, dword [esi + 0x80]
add esp, 0x10
push 0
push 0x14
push 0x402
push edx
call ebp
push str.C:OKGFile_sbghost.img
push 0xae
call fcn.00403170
add esp, 8
test eax, eax
jne 0x40404b
mov eax, dword [esp + 0x10]
push 0x30
push eax
push 0x40d954
mov ecx, esi
call sub.MFC42.DLL_CWnd::MessageBoxA
lea ecx, [esp + 0x10]
mov dword [esp + 0x12c], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor eax, eax
jmp 0x4044c9
lea ecx, [esp + 0x18]
push ecx
call fcn.00401cb0
add esp, 4
lea edx, [esp + 0x18]
push str.SBGHOST.IMG
lea eax, [esp + 0x20]
push edx
push eax
mov byte [esp + 0x138], 1
call sub.MFC42.DLL_operator
mov eax, dword [eax]
mov edi, dword [sym.imp.KERNEL32.dll_CopyFileA]
push 0
push str.C:OKGFile_sbghost.img
push eax
call edi
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::CString
push 0
push str.C:OKGFileDOSTOOLS
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push str.C:OKGFileDOSTOOLSGhost.exe
push 0xad
call fcn.00403170
add esp, 8
test eax, eax
jne 0x4040de
lea ecx, [esp + 0x18]
mov byte [esp + 0x12c], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov dword [esp + 0x12c], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor eax, eax
jmp 0x4044c9
lea ecx, [esp + 0x18]
push str._top.bmp
lea edx, [esp + 0x20]
push ecx
push edx
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push 0
push str.C:OKGFile_top.bmp
push eax
call edi
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::CString
lea eax, [esp + 0x18]
push str.okgstr.ini
lea ecx, [esp + 0x20]
push eax
push ecx
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push 0
push str.C:OKGFileokgstr.ini
push eax
call edi
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::CString
mov edx, dword [esi + 0x80]
push 0
push 0x1e
push 0x402
push edx
call ebp
cmp bl, 5
je 0x404150
cmp bl, 6
jne 0x4041e1
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x20]
push 0x104
rep stosd dword es:[edi], eax
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::CString_2
push str.Drivers_sioctl.sys
lea ecx, [esp + 0x20]
mov byte [esp + 0x130], 2
call sub.MFC42.DLL_CString::operator
mov edx, dword [esp + 0x1c]
push edx
push 0x9f
call fcn.00403170
add esp, 8
test eax, eax
jne 0x4041d0
mov eax, dword [esp + 0x10]
push 0x10
push eax
push 0x40d93c
mov ecx, esi
call sub.MFC42.DLL_CWnd::MessageBoxA
lea ecx, [esp + 0x1c]
mov byte [esp + 0x12c], 1
call sub.MFC42.DLL_CString::CString
jmp 0x4040b2
lea ecx, [esp + 0x1c]
mov byte [esp + 0x12c], 1
call sub.MFC42.DLL_CString::CString
cmp bl, 5
jne 0x404374
lea ecx, [esp + 0x14]
call fcn.0040809a
movsx ecx, byte [0x40d031]
push ecx
lea edx, [esp + 0x18]
push str._c:_sbldr
push edx
mov byte [esp + 0x138], 3
call sub.MFC42.DLL_CString::Format
mov eax, dword [esp + 0x20]
mov edi, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
add esp, 0xc
push 0x80
push eax
call edi
mov ecx, dword [esp + 0x14]
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileA]
push ecx
call ebx
mov edx, dword [esp + 0x14]
push edx
push 0x98
call fcn.00403170
add esp, 8
test eax, eax
jne 0x40425b
mov eax, dword [esp + 0x10]
push 0x10
push eax
push 0x40d928
jmp 0x404309
movsx ecx, byte [0x40d031]
push ecx
lea edx, [esp + 0x18]
push str._c:_sbldr.mbr
push edx
call sub.MFC42.DLL_CString::Format
mov eax, dword [esp + 0x20]
add esp, 0xc
push eax
call ebx
mov ecx, dword [esp + 0x14]
push ecx
push 0x9e
call fcn.00403170
add esp, 8
test eax, eax
jne 0x4042a0
mov edx, dword [esp + 0x10]
push 0x10
push edx
push 0x40d910
jmp 0x404309
mov al, byte [0x40d031]
cmp al, 0x43
je 0x404339
movsx eax, al
push eax
lea ecx, [esp + 0x18]
push str._c:OKGFile
push ecx
call sub.MFC42.DLL_CString::Format
mov edx, dword [esp + 0x20]
add esp, 0xc
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
movsx eax, byte [0x40d031]
push eax
lea ecx, [esp + 0x18]
push str._c:OKGFile_sbghost.img
push ecx
call sub.MFC42.DLL_CString::Format
mov edx, dword [esp + 0x20]
push edx
push 0xae
call fcn.00403170
add esp, 0x14
test eax, eax
jne 0x404326
mov eax, dword [esp + 0x10]
push 0x10
push eax
push 0x40d8f4
mov ecx, esi
call sub.MFC42.DLL_CWnd::MessageBoxA
lea ecx, [esp + 0x14]
mov byte [esp + 0x12c], 1
call sub.MFC42.DLL_CString::CString
jmp 0x4040b2
push 0x80
push str.C:_sbldr
call edi
push str.C:_sbldr
call ebx
lea ecx, [esp + 0x14]
mov byte [esp + 0x12c], 1
call sub.MFC42.DLL_CString::CString
or edi, 0xffffffff
push str.C:OKGFileUninst.exe
push 0x9d
call fcn.00403170
add esp, 8
test eax, eax
jne 0x4043cf
mov edx, dword [esp + 0x10]
push 0x10
push edx
push 0x40d8d8
jmp 0x40442c
cmp bl, 6
je 0x40434a
push 0
push str.C:_sbldr
call dword [sym.imp.MSVCRT.dll__access]
or edi, 0xffffffff
add esp, 8
cmp eax, edi
je 0x4043ab
push 0x80
push str.C:_sbldr
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push str.C:_sbldr
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push str.C:_sbldr
push 0x98
call fcn.00403170
add esp, 8
test eax, eax
jne 0x40434d
mov ecx, dword [esp + 0x10]
push 0x10
push ecx
push 0x40d928
jmp 0x40442c
mov eax, dword [esi + 0x80]
push 0
push 0x46
push 0x402
push eax
call ebp
push str.C:OKGFileXSBInst.exe
push 0xa9
call fcn.00403170
add esp, 8
test eax, eax
jne 0x404405
mov ecx, dword [esp + 0x10]
push 0x10
push ecx
push 0x40d8bc
jmp 0x40442c
mov edx, dword [esi + 0x80]
push 0
push 0x50
push 0x402
push edx
call ebp
call fcn.00402680
test eax, eax
jne 0x404458
mov eax, dword [esp + 0x10]
push 0x10
push eax
push 0x40d8ac
mov ecx, esi
call sub.MFC42.DLL_CWnd::MessageBoxA
lea ecx, [esp + 0x18]
mov byte [esp + 0x12c], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov dword [esp + 0x12c], edi
call sub.MFC42.DLL_CString::CString
xor eax, eax
jmp 0x4044c9
mov ecx, dword [esi + 0x80]
push 0
push 0x5a
push 0x402
push ecx
call ebp
call fcn.00401380
call fcn.004018c0
push 0
push 0
push str._Service
push str.C:OKGFileOKSvc.exe
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
call fcn.00403400
mov edx, dword [esi + 0x80]
push 0
push 0x64
push 0x402
push edx
call ebp
lea ecx, [esp + 0x18]
mov byte [esp + 0x12c], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov dword [esp + 0x12c], edi
call sub.MFC42.DLL_CString::CString
mov eax, 1
mov ecx, dword [esp + 0x124]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x120
ret