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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push edi
push esi
push ebx
mov dword [ebp - 0x14], 0xffffffff
mov dword [ebp - 0x18], 0
jmp 0x402520
add esp, 0xfffffff4
push 0x8a00
call sub.msvcrt.dll_malloc
mov dword [ebp - 0x18], eax
add esp, 0x10
test eax, eax
je 0x402585
add esp, 0xfffffff4
push 0
lea edi, [ebp - 4]
push edi
push 0x8a00
push eax
mov eax, dword [ebp - 0x14]
push eax
call sub.KERNEL32.dll_ReadFile
add esp, 0xc
test eax, eax
je 0x402570
add esp, 0xfffffff4
push 0
push edi
push 0x8a00
mov eax, dword [ebp - 0x18]
push eax
push ebx
call sub.KERNEL32.dll_WriteFile
add esp, 0xc
test eax, eax
je 0x402570
add esp, 0xfffffff4
mov eax, dword [ebp - 0x18]
push eax
call sub.msvcrt.dll_free
mov dword [ebp - 0x18], 0
push 0
push 0
push 0xd0
push ebx
call sub.KERNEL32.dll_SetFilePointer
add esp, 0xfffffff4
push 0
push edi
push 4
push 0x4037b4
push ebx
call sub.KERNEL32.dll_WriteFile
add esp, 0x1c
test eax, eax
je 0x402570
push 0
push 0
push 0x10c
push ebx
call sub.KERNEL32.dll_SetFilePointer
add esp, 0xfffffff4
push 0
push edi
push 4
push 0x4037b8
push ebx
call sub.KERNEL32.dll_WriteFile
add esp, 0xc
test eax, eax
je 0x402570
push 0
push 0
push 0x220
push ebx
call sub.KERNEL32.dll_SetFilePointer
add esp, 0xfffffff4
push 0
push edi
push 4
push 0x4037b8
push ebx
call sub.KERNEL32.dll_WriteFile
add esp, 0xc
test eax, eax
je 0x402570
push 0
push 0
push 0x228
push ebx
call sub.KERNEL32.dll_SetFilePointer
add esp, 0xfffffff4
push 0
push edi
push 4
push 0x4037bc
push ebx
call sub.KERNEL32.dll_WriteFile
add esp, 0xc
test eax, eax
je 0x402570
push 0
push 0
push 0x7c0c
push ebx
call sub.KERNEL32.dll_SetFilePointer
mov dword [ebp - 8], 0
add esp, 0xfffffff4
push 0
push edi
push 4
lea esi, [ebp - 8]
push esi
push ebx
call sub.KERNEL32.dll_WriteFile
add esp, 0xc
test eax, eax
je 0x402570
add esp, 0xfffffff4
push 0
push edi
push 4
push esi
push ebx
call sub.KERNEL32.dll_WriteFile
add esp, 0xc
test eax, eax
je 0x402570
add esp, 0xfffffff4
push 0x400
call sub.msvcrt.dll_malloc
mov dword [ebp - 0x18], eax
add esp, 0x10
test eax, eax
je 0x402585
push 2
push 0
push 0xfffffc00
mov eax, dword [ebp - 0x14]
push eax
call sub.KERNEL32.dll_SetFilePointer
add esp, 0xfffffff4
push 0
push edi
push 0x400
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x14]
push eax
call sub.KERNEL32.dll_ReadFile
add esp, 0xc
test eax, eax
je 0x402570
add esp, 0xfffffff8
push 0x400
mov eax, dword [ebp - 0x18]
push eax
call fcn.00401264
push 0
push 0
push 0x8a00
push ebx
call sub.KERNEL32.dll_SetFilePointer
add esp, 0xfffffff4
push 0
push edi
push 0x400
mov eax, dword [ebp - 0x18]
push eax
push ebx
call sub.KERNEL32.dll_WriteFile
add esp, 0x1c
jmp 0x402570
add esp, 0xfffffffc
push 0
push 4
push 2
push 0
push 0
push 0x40000000
push dword [ebp + 8]
call sub.KERNEL32.dll_CreateFileA
mov ebx, eax
add esp, 4
cmp ebx, 0xffffffff
je 0x402570
add esp, 0xfffffffc
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push dword [0x40a034]
call sub.KERNEL32.dll_CreateFileA
mov dword [ebp - 0x14], eax
add esp, 4
cmp eax, 0xffffffff
jne 0x402320
cmp dword [ebp - 0x18], 0
je 0x402585
add esp, 0xfffffff4
mov eax, dword [ebp - 0x18]
push eax
call sub.msvcrt.dll_free
add esp, 0x10
cmp ebx, 0xffffffff
je 0x4025b0
mov dword [ebp - 0x10], 0x97805000
lea eax, [ebp - 0x10]
mov dword [eax + 4], 0x1c12cc6
push eax
push eax
push eax
push ebx
call sub.KERNEL32.dll_SetFileTime
add esp, 0xfffffff4
push ebx
call sub.KERNEL32.dll_CloseHandle
add esp, 0xc
cmp dword [ebp - 0x14], 0xffffffff
je 0x4025c2
add esp, 0xfffffff4
mov eax, dword [ebp - 0x14]
push eax
call sub.KERNEL32.dll_CloseHandle
lea esp, [ebp - 0x38]
pop ebx
pop esi
pop edi
leave
ret