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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x443f7c
mov eax, dword fs:[0]
push eax
mov eax, 0x3ecc
call fcn.004292b0
mov eax, dword [0x452ef0]
xor eax, ebp
mov dword [ebp - 0x1c], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x447d54
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x1f60]
push ecx
call fcn.0042bb64
add esp, 0xc
cmp dword [ebp - 0x1f60], 0
jne 0x40bcf7
xor al, al
jmp 0x40bff8
mov dword [ebp - 0x3ea8], 0xfa0
mov dword [ebp - 0x3eac], 0
mov edx, dword [ebp - 0x1f60]
push edx
call fcn.0042ba6c
add esp, 4
push eax
call fcn.0042b96d
add esp, 4
mov dword [ebp - 0x3eac], eax
cmp dword [ebp - 0x3eac], 0xffffffff
jne 0x40bd39
xor al, al
jmp 0x40bff8
mov eax, dword [ebp - 0x3eac]
xor edx, edx
mov ecx, 0xfa0
div ecx
mov dword [ebp - 0x3eac], eax
push 0x447d4c
mov edx, dword [ebp + 0x10]
push edx
lea eax, [ebp - 0x10]
push eax
call fcn.0042bb64
add esp, 0xc
cmp dword [ebp - 0x10], 0
jne 0x40bd70
xor al, al
jmp 0x40bff8
xor ecx, ecx
mov word [ebp - 0x1f5c], cx
push 0x1f3e
push 0
lea edx, [ebp - 0x1f5a]
push edx
call fcn.0042ae50
add esp, 0xc
xor eax, eax
mov word [ebp - 0x3ea4], ax
push 0x1f3e
push 0
lea ecx, [ebp - 0x3ea2]
push ecx
call fcn.0042ae50
add esp, 0xc
mov dword [ebp - 0x18], 0
cmp dword [ebp + 0xc], 0
je 0x40be1d
push 0xd4
call fcn.0042836c
add esp, 4
mov dword [ebp - 0x3ebc], eax
mov dword [ebp - 4], 0
cmp dword [ebp - 0x3ebc], 0
je 0x40bdf5
mov edx, dword [ebp + 0xc]
push edx
mov ecx, dword [ebp - 0x3ebc]
call section..text
mov dword [ebp - 0x3ed0], eax
jmp 0x40bdff
mov dword [ebp - 0x3ed0], 0
mov eax, dword [ebp - 0x3ed0]
mov dword [ebp - 0x3eb8], eax
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x3eb8]
mov dword [ebp - 0x14], ecx
jmp 0x40be79
push 0xd4
call fcn.0042836c
add esp, 4
mov dword [ebp - 0x3ec4], eax
mov dword [ebp - 4], 1
cmp dword [ebp - 0x3ec4], 0
je 0x40be53
mov ecx, dword [ebp - 0x3ec4]
call fcn.00401300
mov dword [ebp - 0x3ed4], eax
jmp 0x40be5d
mov dword [ebp - 0x3ed4], 0
mov edx, dword [ebp - 0x3ed4]
mov dword [ebp - 0x3ec0], edx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x3ec0]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x1f60]
push ecx
call fcn.0042b939
add esp, 4
test eax, eax
jne 0x40bf66
mov edx, dword [ebp - 0x1f60]
push edx
push 0xfa0
push 2
lea eax, [ebp - 0x1f5c]
push eax
call fcn.0042b91c
add esp, 0x10
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 0x3ea4]
push ecx
mov edx, dword [ebp - 0x18]
push edx
lea eax, [ebp - 0x1f5c]
push eax
mov ecx, dword [ebp - 0x14]
call fcn.004014d0
mov dword [ebp - 0x3eb0], eax
mov ecx, dword [ebp - 0x1f60]
push ecx
call fcn.0042b939
add esp, 4
test eax, eax
je 0x40bf45
mov dword [ebp - 0x3eb4], 0
cmp dword [ebp - 0x3eb4], 8
jge 0x40bf25
mov edx, dword [ebp - 0x3eb0]
lea eax, [ebp + edx*2 - 0x3ea4]
mov ecx, dword [ebp - 0x3eb4]
shl ecx, 1
sub eax, ecx
movzx edx, word [eax]
test edx, edx
jne 0x40bf25
mov eax, dword [ebp - 0x3eb4]
add eax, 1
mov dword [ebp - 0x3eb4], eax
jmp 0x40beed
cmp dword [ebp - 0x3eb4], 0
je 0x40bf45
mov ecx, dword [ebp - 0x3eb4]
sub ecx, 1
mov edx, dword [ebp - 0x3eb0]
sub edx, ecx
mov dword [ebp - 0x3eb0], edx
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x3eb0]
push ecx
push 2
lea edx, [ebp - 0x3ea4]
push edx
call fcn.0042b5fa
add esp, 0x10
jmp 0x40be79
mov eax, dword [ebp - 0x10]
push eax
call fcn.0042b43c
add esp, 4
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.0042b03f
add esp, 4
mov edx, dword [ebp - 0x1f60]
push edx
call fcn.0042b03f
add esp, 4
push 0xfa0
push 0
lea eax, [ebp - 0x3ea4]
push eax
call fcn.0042ae50
add esp, 0xc
push 0xfa0
push 0
lea ecx, [ebp - 0x1f5c]
push ecx
call fcn.0042ae50
add esp, 0xc
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x3ecc], edx
mov eax, dword [ebp - 0x3ecc]
mov dword [ebp - 0x3ec8], eax
cmp dword [ebp - 0x3ec8], 0
je 0x40bfec
push 1
mov ecx, dword [ebp - 0x3ec8]
call fcn.0040c0a0
mov dword [ebp - 0x3ed8], eax
jmp 0x40bff6
mov dword [ebp - 0x3ed8], 0
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00428b2b
mov esp, ebp
pop ebp
ret