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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x878
mov eax, dword [0x41bee4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 0x41637c
call fcn.00406d20
add esp, 4
mov ebx, 0x104
push ebx
push 0x41d568
push esi
mov dword [0x41d140], esi
call dword [0x416044]
xor eax, eax
movzx ecx, word [eax + 0x41d568]
mov word [ebp + eax - 0x40c], cx
add eax, 2
test cx, cx
jne 0x401fc0
lea eax, [ebp - 0x40c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401fe0
sub eax, edx
sar eax, 1
lea ecx, [ebp + eax*2 - 0x40c]
js 0x40200b
cmp word [ecx], 0x5c
je 0x402006
sub ecx, 2
dec eax
jns 0x401ff8
jmp 0x40200b
xor eax, eax
mov word [ecx], ax
lea ecx, [ebp - 0x40c]
push ecx
push 0x416374
push ebx
push 0x41d148
call fcn.00406f02
push 0x416294
push 0x41d568
call fcn.00406eeb
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x402068
push eax
push 0x41628c
push 0x416344
call dword [0x416138]
push eax
call dword [0x41614c]
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406fd2
mov esp, ebp
pop ebp
ret 0x10
push edi
call fcn.004024e0
mov edx, 0xfffffffc
push 2
sub edx, eax
push edx
push edi
call fcn.004076c4
push edi
push 4
lea eax, [ebp - 0xc]
push 1
push eax
call fcn.0040761d
add esp, 0x20
mov byte [ebp - 8], 0
mov ecx, 0x41633c
lea eax, [ebp - 0xc]
jmp 0x4020a0
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4020c0
test dl, dl
je 0x4020bc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4020c0
add eax, 2
add ecx, 2
test dl, dl
jne 0x4020a0
xor eax, eax
jmp 0x4020c5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4020fc
push edi
call fcn.00406db9
add esp, 4
push 0
push 0x401050
call dword [0x416138]
push eax
push 0x65
push esi
call dword [0x41613c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406fd2
mov esp, ebp
pop ebp
ret 0x10
push ebx
lea ecx, [ebp - 0x614]
push 0
push ecx
call fcn.00407740
push 0x58
lea edx, [ebp - 0x878]
push 0
push edx
call fcn.00407740
add esp, 0x18
lea edx, [ebp - 0x878]
lea eax, [ebp - 0x614]
lea ecx, [ebp - 0x81c]
push edx
mov dword [ebp - 0x878], 0x58
mov dword [ebp - 0x86c], 0x416320
mov dword [ebp - 0x85c], eax
mov dword [ebp - 0x858], ebx
mov dword [ebp - 0x854], ecx
mov dword [ebp - 0x850], ebx
call dword [section..rdata]
test eax, eax
je 0x4022be
mov eax, dword [ebp - 0x854]
push eax
push 0x41d148
push 0x41630c
lea ecx, [ebp - 0x40c]
push 0x200
push ecx
call fcn.00406f02
lea edx, [ebp - 0x40c]
push 0x416304
push edx
call fcn.00406eeb
mov esi, eax
add esp, 0x1c
test esi, esi
je 0x40228e
mov eax, dword [ebp - 0x85c]
push 0x416294
push eax
call fcn.00406eeb
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x402294
push 0
push 0
push edi
call fcn.004076c4
push edi
call fcn.004073ab
add esp, 0x10
test eax, eax
jne 0x402211
push edi
push 0x200
lea ecx, [ebp - 0x40c]
push 1
push ecx
call fcn.0040761d
push esi
push eax
lea edx, [ebp - 0x40c]
push 1
push edx
call fcn.00407331
push edi
call fcn.004073ab
add esp, 0x24
test eax, eax
je 0x4021e0
push ebx
call fcn.004073ab
add esp, 4
test eax, eax
jne 0x402251
mov edi, edi
push ebx
push 0x200
lea eax, [ebp - 0x40c]
push 1
push eax
call fcn.0040761d
push esi
push eax
lea ecx, [ebp - 0x40c]
push 1
push ecx
call fcn.00407331
push ebx
call fcn.004073ab
add esp, 0x24
test eax, eax
je 0x402220
push ebx
call fcn.00407175
push esi
push 1
lea edx, [ebp - 0x820]
push 4
push edx
mov dword [ebp - 0x820], eax
call fcn.00407331
push esi
push 1
push 4
push 0x41633c
call fcn.00407331
add esp, 0x24
push 0
push 0x4162fc
push 0x4162f0
jmp 0x4022a0
mov ebx, dword [ebp - 0x820]
push 0
push 0x41628c
push 0x4162e0
call dword [0x416138]
push eax
call dword [0x41614c]
push esi
call fcn.00406db9
push ebx
call fcn.00406db9
add esp, 8
jmp 0x4022d7
push 0
push 0x41628c
push 0x4162d0
call dword [0x416138]
push eax
call dword [0x41614c]
push edi
call fcn.00406db9
mov ecx, dword [ebp - 4]
add esp, 4
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.00406fd2
mov esp, ebp
pop ebp
ret 0x10