Function at 0x40d740
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x442378
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push esi
lea ecx, [esp + 0xc]
mov dword [esp + 0x20], 0
call fcn.0043fabe
lea ecx, [esp + 0x14]
mov byte [esp + 0x20], 1
call fcn.0043fabe
lea ecx, [esp + 8]
mov byte [esp + 0x20], 2
call fcn.0043fabe
lea ecx, [esp + 0x10]
mov byte [esp + 0x20], 3
call fcn.0043fabe
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x14]
push eax
mov bl, 4
push 0x44fddc
push ecx
mov byte [esp + 0x2c], bl
call sub.MFC42.DLL_CString::Format
mov edx, dword [esp + 0x34]
push 0x44fde8
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 0x14
test esi, esi
je 0x40d9bc
push ebp
mov ebp, dword [sym.imp.MSVCRT.dll_fseek]
push edi
push 2
push 0
push esi
call ebp
push esi
call dword [sym.imp.MSVCRT.dll_ftell]
push 0
push 0
push esi
mov edi, eax
call ebp
push edi
call sub.MFC42.DLL_operatornew
push esi
mov ebp, eax
push edi
push 1
push ebp
call dword [sym.imp.MSVCRT.dll_fread]
push ebp
lea eax, [esp + 0x48]
push 0x44f214
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0x3c
lea ecx, [esp + 0x34]
push edi
push ecx
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::Left
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x2c], 5
call fcn.0043fac4
lea ecx, [esp + 0x34]
mov byte [esp + 0x28], bl
call sub.MFC42.DLL_CString::CString
lea edx, [esp + 0x14]
lea ecx, [esp + 0x10]
push edx
call fcn.0043fac4
push 0x2e
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::ReverseFind
push eax
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Left
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x2c], 6
call fcn.0043fac4
lea ecx, [esp + 0x34]
mov byte [esp + 0x28], bl
call sub.MFC42.DLL_CString::CString
push 0x5c
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::ReverseFind
mov ecx, dword [esp + 0x14]
mov edi, eax
lea edx, [esp + 0x34]
mov eax, dword [ecx - 8]
lea ecx, [esp + 0x14]
sub eax, edi
push eax
push edx
call sub.MFC42.DLL_CString::Right
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x2c], 7
call fcn.0043fac4
lea ecx, [esp + 0x34]
mov byte [esp + 0x28], bl
call sub.MFC42.DLL_CString::CString
lea eax, [esp + 0x34]
push edi
push eax
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Left
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x2c], 8
call fcn.0043fac4
lea ecx, [esp + 0x34]
mov byte [esp + 0x28], bl
call sub.MFC42.DLL_CString::CString
push 0x5f
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::ReverseFind
lea ecx, [esp + 0x34]
push eax
push ecx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Left
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x2c], 9
call fcn.0043fac4
lea ecx, [esp + 0x34]
mov byte [esp + 0x28], bl
call sub.MFC42.DLL_CString::CString
lea edx, [esp + 0x1c]
lea ecx, [esp + 0x10]
push edx
call sub.MFC42.DLL_CString::operator_1
lea eax, [esp + 0x18]
lea ecx, [esp + 0x10]
push eax
lea edx, [esp + 0x38]
push ecx
push edx
call sub.MFC42.DLL_operator
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x2c], 0xa
call fcn.0043fac4
lea ecx, [esp + 0x34]
mov byte [esp + 0x28], bl
call sub.MFC42.DLL_CString::CString
push ebp
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x18]
mov ebx, dword [eax - 8]
inc ebx
push ebx
call sub.MFC42.DLL_operatornew
mov ebp, dword [sym.imp.MSVCRT.dll_fclose]
push esi
mov edi, eax
call ebp
mov ecx, dword [esp + 0x3c]
push 0x44fde4
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
mov edx, dword [esp + 0x28]
mov esi, eax
push edx
push 0x44f214
push edi
call dword [sym.imp.MSVCRT.dll_sprintf]
dec ebx
push esi
push ebx
push 1
push edi
call dword [sym.imp.MSVCRT.dll_fwrite]
push esi
call ebp
push edi
call sub.MFC42.DLL_operatordelete
add esp, 0x38
pop edi
pop ebp
lea ecx, [esp + 0x10]
mov byte [esp + 0x20], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 8]
mov byte [esp + 0x20], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x20], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0xc]
mov byte [esp + 0x20], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x28]
mov dword [esp + 0x20], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x18]
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x1c
ret