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

Disassembly:
mov eax, 0x404bd0
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x30
push ebx
push ebp
push esi
mov esi, ecx
push edi
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::CString
and dword [esp + 0x48], 0
lea ebx, [esi + 0x170]
push ebx
lea ecx, [esi + 0x168]
call sub.MFC42.DLL_CString::operator_1
lea eax, [esp + 0x1c]
lea edi, [esi + 0x64]
push eax
push edi
call dword [sym.imp.MSVCRT.dll__stat]
mov eax, dword [esp + 0x38]
pop ecx
test eax, eax
pop ecx
mov dword [0x407034], eax
je 0x402e0d
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
test eax, eax
pop ecx
mov dword [esi + 0x16c], eax
je 0x402e0d
push 0x40741c
push edi
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
pop ecx
test edi, edi
pop ecx
je 0x402e00
push edi
mov ebp, dword [sym.imp.MSVCRT.dll_fread]
push dword [0x407034]
push 1
push dword [esi + 0x16c]
call ebp
push edi
mov dword [esp + 0x24], eax
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x24]
add esp, 0x14
cmp eax, dword [0x407034]
jne 0x402e00
mov eax, dword [ebx]
lea ecx, [esp + 0x1c]
push ecx
push eax
call dword [sym.imp.MSVCRT.dll__stat]
pop ecx
test eax, eax
pop ecx
jne 0x402f56
cmp dword [esp + 0x30], eax
je 0x402f56
mov ecx, esi
call fcn.00402fd0
test al, al
je 0x402e00
mov ebx, dword [ebx]
push 0x40741c
push ebx
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
pop ecx
test edi, edi
pop ecx
mov dword [esp + 0x14], edi
je 0x402e00
push dword [0x407034]
call dword [sym.imp.MSVCRT.dll_malloc]
mov ebx, eax
pop ecx
test ebx, ebx
je 0x402e0d
push edi
push dword [0x407034]
push 1
push ebx
call ebp
mov ecx, dword [0x407034]
add esp, 0x10
add ecx, 0xfffffffb
xor eax, eax
test ecx, ecx
jbe 0x402dd3
cmp byte [eax + ebx], 0x6b
jne 0x402dce
cmp byte [eax + ebx + 1], 0x64
jne 0x402dce
cmp byte [eax + ebx + 2], 0x63
jne 0x402dce
cmp byte [eax + ebx + 3], 0x79
jne 0x402dce
cmp byte [eax + ebx + 4], 0x79
je 0x402e24
inc eax
cmp eax, ecx
jb 0x402dac
push ebx
call dword [sym.imp.MSVCRT.dll_free]
push 0
push 0
push edi
call dword [sym.imp.MSVCRT.dll_fseek]
mov eax, dword [esi + 0x178]
push 0x407418
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebx, eax
add esp, 0x18
test ebx, ebx
jne 0x402e43
push dword [esi + 0x16c]
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
xor bl, bl
or dword [esp + 0x48], 0xffffffff
lea ecx, [esp + 0x18]
call fcn.004041e0
mov al, bl
jmp 0x402f73
push dword [esi + 0x16c]
mov esi, dword [sym.imp.MSVCRT.dll_free]
call esi
push ebx
call esi
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0xc
mov bl, 1
jmp 0x402e0f
push ebx
mov edi, dword [sym.imp.MSVCRT.dll_fwrite]
push dword [esp + 0x14]
push 1
push dword [esi + 0x16c]
call edi
mov dword [esp + 0x20], eax
push ebx
push 4
lea eax, [esp + 0x48]
push 1
push eax
call edi
add dword [esp + 0x30], eax
push ebx
push 4
lea eax, [esp + 0x40]
push 1
push eax
call edi
push dword [esp + 0x44]
add dword [esp + 0x44], eax
push dword [0x407034]
push 1
push dword [esi + 0x16c]
call ebp
add esp, 0x40
test eax, eax
je 0x402ec0
push ebx
push eax
push 1
push dword [esi + 0x16c]
call edi
push dword [esp + 0x24]
add dword [esp + 0x24], eax
push dword [0x407034]
push 1
push dword [esi + 0x16c]
call ebp
add esp, 0x20
jmp 0x402e93
push dword [esp + 0x14]
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esi + 0x174]
mov dword [esp], 0x40741c
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
pop ecx
mov dword [esp + 0x18], eax
test eax, eax
pop ecx
je 0x402f56
push eax
push dword [0x407034]
push 1
push dword [esi + 0x16c]
call ebp
add esp, 0x10
test eax, eax
je 0x402f29
push ebx
push eax
push 1
push dword [esi + 0x16c]
call edi
push dword [esp + 0x24]
add dword [esp + 0x24], eax
push dword [0x407034]
push 1
push dword [esi + 0x16c]
call ebp
add esp, 0x20
jmp 0x402efc
push dword [esp + 0x14]
mov edi, dword [sym.imp.MSVCRT.dll_fclose]
call edi
push ebx
call edi
push dword [esi + 0x16c]
call dword [sym.imp.MSVCRT.dll_free]
add esp, 0xc
inc dword [0x408668]
mov byte [esi + 0x180], 1
jmp 0x402f63
push dword [esi + 0x16c]
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
or dword [esp + 0x48], 0xffffffff
lea ecx, [esp + 0x18]
call fcn.004041e0
xor al, al
mov ecx, dword [esp + 0x40]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
leave
ret