Function at 0x40b091
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 0x40b214
cmp dword [ebp - 0x68], 0x40
jne 0x40b214
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x10]
sub eax, 0x46534252
cmp eax, 1
sbb eax, eax
neg eax
mov ecx, dword [ebp - 0xc]
cmp eax, dword [ecx]
je 0x40b20f
mov eax, dword [0x40d6d0]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x14]
cmp dword [eax + 0x30], ecx
jne 0x40b20f
mov dword [ebp - 0x18], 0
jmp 0x40b161
inc dword [ebp - 0x18]
mov eax, dword [0x40f9e0]
cmp dword [ebp - 0x18], eax
jge 0x40b1ab
mov eax, dword [ebp - 0x18]
mov eax, dword [eax*4 + 0x40fb70]
push eax
mov eax, dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcmpiA]
test eax, eax
jne 0x40b191
jmp 0x40b1ab
mov eax, dword [ebp - 0x18]
mov eax, dword [eax*4 + 0x40fb70]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
inc eax
add dword [ebp - 0x10], eax
jmp 0x40b15e
mov eax, dword [0x40f9e0]
cmp dword [ebp - 0x18], eax
jne 0x40b208
mov ebx, 0x1770
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 0x40b208
mov eax, dword [ebp - 0x10]
add eax, 0x40e270
mov ecx, dword [0x40f9e0]
mov dword [ecx*4 + 0x40fb70], eax
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [0x40f9e0]
mov eax, dword [eax*4 + 0x40fb70]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpyA]
inc dword [0x40f9e0]
mov dword [ebp - 0x20], 1
jmp 0x40b290
cmp dword [ebp + 0x14], 2
je 0x40b228
cmp dword [ebp + 0x14], 5
jne 0x40b290
cmp dword [ebp + 8], 4
jne 0x40b290
mov dword [ebp - 0x20], 1
mov eax, dword [0x40d6d0]
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 0x40b2ae
pop edi
pop esi
pop ebx
leave
ret