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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
push ebx
push esi
push edi
lea eax, [ebp - 0x44]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x60], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x10], 0
push 1
lea eax, [ebp - 0x64]
push eax
push 0
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
mov dword [ebp - 8], eax
push 0
push 0
push 0
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
push 0
lea eax, [ebp - 0x68]
push eax
push 0x40
lea eax, [ebp - 0x60]
push eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x40a044
cmp dword [ebp - 0x68], 0x40
jne 0x40a044
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x10]
mov ecx, dword [ebp - 0xc]
xor eax, dword [ecx]
cmp eax, 0x46534252
jne 0x40a03f
mov eax, dword [0x4120e8]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x14]
cmp dword [eax + 0x30], ecx
jne 0x40a03f
mov dword [ebp - 0x18], 0
jmp 0x409f91
inc dword [ebp - 0x18]
mov eax, dword [0x420018]
cmp dword [ebp - 0x18], eax
jge 0x409fdb
mov eax, dword [ebp - 0x18]
mov eax, dword [eax*4 + 0x4207c8]
push eax
mov eax, dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcmpiA]
test eax, eax
jne 0x409fc1
jmp 0x409fdb
mov eax, dword [ebp - 0x18]
mov eax, dword [eax*4 + 0x4207c8]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
inc eax
add dword [ebp - 0x10], eax
jmp 0x409f8e
mov eax, dword [0x420018]
cmp dword [ebp - 0x18], eax
jne 0x40a038
mov ebx, 0xa410
mov eax, dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
sub ebx, eax
sub ebx, 4
cmp ebx, dword [ebp - 0x10]
jle 0x40a038
mov eax, dword [ebp - 0x10]
add eax, 0x415c08
mov ecx, dword [0x420018]
mov dword [ecx*4 + 0x4207c8], eax
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [0x420018]
mov eax, dword [eax*4 + 0x4207c8]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpyA]
inc dword [0x420018]
mov dword [ebp - 0x20], 1
jmp 0x40a0c0
cmp dword [ebp + 0x14], 2
je 0x40a058
cmp dword [ebp + 0x14], 5
jne 0x40a0c0
cmp dword [ebp + 8], 4
jne 0x40a0c0
mov dword [ebp - 0x20], 1
mov eax, dword [0x4120e8]
add eax, 0x1c
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov ecx, dword [ebp - 0xc]
mov dword [ecx], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x10], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14]
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x14], eax
push 0
push 0
push 0
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
push 0
lea eax, [ebp - 0x1c]
push eax
push 0x40
lea eax, [ebp - 0x60]
push eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push 0
lea eax, [ebp - 0x64]
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
mov eax, dword [ebp - 0x20]
jmp 0x40a0de
pop edi
pop esi
pop ebx
leave
ret