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

Disassembly:
push ebp
lea ebp, [esp - 0xd6dc]
mov eax, 0xd6dc
call fcn.00489ce0
push 0xffffffffffffffff
push 0x4a8f4c
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x4f1a20]
xor eax, ebp
mov dword [ebp + 0xd6d8], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push ecx
xor ebx, ebx
lea eax, [ebp + 0xd6e4]
mov dword [ebp - 0x1c], esp
mov ecx, esp
inc ebx
push eax
mov dword [ebp - 4], ebx
call fcn.004013d2
call fcn.00418d2d
pop ecx
test al, al
je 0x414159
and dword [ebp - 0x28], 0
mov esi, 0x4b0220
push esi
push dword [ebp + 0xd6e4]
call fcn.0048aa51
add esp, 4
mov dword [ebp - 0x14], eax
lea eax, [ebp + 0xd6e4]
mov dword [ebp - 0x1c], esp
mov ecx, esp
push eax
call fcn.004013d2
call fcn.00418d9d
cmp dword [ebp - 0x14], 0
mov edi, eax
pop ecx
mov dword [ebp - 0x24], edi
je 0x413fcb
push 0
lea eax, [edi - 4]
push eax
push dword [ebp - 0x14]
call fcn.0048b5fa
push dword [ebp - 0x14]
lea eax, [ebp - 0x28]
push ebx
push 4
push eax
call fcn.0048b2b5
push dword [ebp - 0x14]
call fcn.0048a72d
add esp, 0x20
cmp dword [ebp - 0x28], 0x221af5
jne 0x414159
push esi
push dword [ebp + 0xd6e4]
call fcn.0048aa51
push 0x4af82c
push dword [ebp + 0xd6e8]
mov dword [ebp - 0x14], eax
call fcn.0048aa51
add esp, 0x10
mov dword [ebp - 0x18], eax
test eax, eax
je 0x414150
and dword [ebp - 0x20], 0
push 0
lea eax, [edi - 8]
push eax
push dword [ebp - 0x14]
call fcn.0048b5fa
push dword [ebp - 0x14]
lea eax, [ebp - 0x20]
push ebx
push 4
push eax
call fcn.0048b2b5
push dword [ebp - 0x14]
call fcn.0048a72d
push esi
push dword [ebp + 0xd6e4]
call fcn.0048aa51
mov esi, edi
sub esi, dword [ebp - 0x20]
add esp, 0x28
sub esi, 4
mov dword [ebp - 0x14], eax
xor edi, edi
mov byte [ebp - 0xd], 0
lea ecx, [edi + 0xc350]
cmp ecx, esi
mov eax, 0xc350
jle 0x414064
mov eax, esi
sub eax, edi
mov byte [ebp - 0xd], bl
push dword [ebp - 0x14]
push eax
lea eax, [ebp]
push ebx
push eax
call fcn.0048b2b5
push dword [ebp - 0x18]
mov dword [ebp - 0x1c], eax
push eax
lea eax, [ebp]
push ebx
push eax
call fcn.0048a90b
add edi, dword [ebp - 0x1c]
add esp, 0x20
cmp byte [ebp - 0xd], 0
je 0x41404e
push dword [ebp - 0x14]
lea eax, [ebp - 0x2c]
push ebx
push 4
push eax
call fcn.0048b2b5
push dword [ebp - 0x18]
lea eax, [ebp + 0xd6ec]
push ebx
push 4
push eax
call fcn.0048a90b
add esp, 0x20
add edi, 4
mov byte [ebp - 0xd], 0
lea ecx, [edi + 0xc350]
cmp ecx, dword [ebp - 0x24]
mov eax, 0xc350
jle 0x4140d2
mov eax, dword [ebp - 0x24]
sub eax, edi
mov byte [ebp - 0xd], bl
push dword [ebp - 0x14]
push eax
lea eax, [ebp]
push ebx
push eax
call fcn.0048b2b5
push dword [ebp - 0x18]
mov esi, eax
push esi
lea eax, [ebp]
push ebx
push eax
call fcn.0048a90b
add esp, 0x20
add edi, esi
cmp byte [ebp - 0xd], 0
je 0x4140ba
push dword [ebp - 0x14]
call fcn.0048a72d
push dword [ebp - 0x18]
call fcn.0048a72d
pop ecx
pop ecx
mov ecx, dword [ebp + 0xd6e4]
add ecx, 0xfffffff0
call fcn.004010a3
mov ecx, dword [ebp + 0xd6e8]
add ecx, 0xfffffff0
call fcn.004010a3
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0xd6d8]
xor ecx, ebp
call fcn.0048893b
add ebp, 0xd6dc
leave
ret 0xc
push dword [ebp - 0x14]
call fcn.0048a72d
pop ecx
xor bl, bl
jmp 0x41410d