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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2014
call fcn.00405bb0
mov eax, dword [0x422050]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x2008], eax
mov ecx, dword [ebp - 0x2008]
add ecx, 0x10
mov dword [ebp - 0x2010], ecx
mov edx, dword [ebp - 0x2008]
cmp dword [edx], 0
je 0x402772
or eax, 0xffffffff
jmp 0x402bc8
mov eax, dword [ebp - 0x2010]
movzx ecx, word [eax + 6]
and ecx, 1
je 0x402795
mov edx, dword [ebp - 0x2008]
mov dword [edx], 0xffffffff
or eax, 0xffffffff
jmp 0x402bc8
mov eax, dword [ebp - 0x2010]
movzx ecx, word [eax + 8]
test ecx, ecx
je 0x4027c6
mov edx, dword [ebp - 0x2010]
movzx eax, word [edx + 8]
cmp eax, 8
je 0x4027c6
mov ecx, dword [ebp - 0x2008]
mov dword [ecx], 0xffffffff
or eax, 0xffffffff
jmp 0x402bc8
mov edx, dword [ebp - 0x2008]
mov eax, dword [ebp + 0xc]
mov dword [edx + 0x134], eax
push 0
mov ecx, dword [ebp - 0x2008]
mov edx, dword [ecx + 0xc]
push edx
mov eax, dword [ebp - 0x2008]
mov ecx, dword [eax + 0x130]
push ecx
call fcn.0040ad8a
add esp, 0xc
test eax, eax
je 0x40280e
mov edx, dword [ebp - 0x2008]
mov dword [edx], 0xffffffff
or eax, 0xffffffff
jmp 0x402bc8
push 0
push 0
mov eax, dword [ebp - 0x2008]
mov ecx, dword [eax + 0x134]
push ecx
call fcn.0040ad8a
add esp, 0xc
test eax, eax
je 0x40283f
mov edx, dword [ebp - 0x2008]
mov dword [edx], 0xffffffff
or eax, 0xffffffff
jmp 0x402bc8
push 0
mov eax, dword [ebp - 0x2008]
mov ecx, dword [eax + 0x134]
push ecx
call fcn.0040ce87
add esp, 4
push eax
call fcn.0040cc2d
add esp, 8
test eax, eax
je 0x402877
mov edx, dword [ebp - 0x2008]
mov dword [edx], 0xffffffff
or eax, 0xffffffff
jmp 0x402bc8
mov eax, dword [ebp - 0x2008]
mov dword [eax + 0x138], 0
mov ecx, dword [ebp - 0x2008]
mov dword [ecx + 0x13c], 0
mov edx, dword [ebp - 0x2010]
movzx eax, word [edx + 8]
cmp eax, 8
jne 0x402900
push 0x402d80
push 0x402d60
push 0x402ca0
mov ecx, dword [ebp - 0x2008]
push ecx
call fcn.00403060
add esp, 0x10
mov edx, dword [ebp - 0x2008]
mov dword [edx + 0x140], eax
mov eax, dword [ebp - 0x2008]
mov dword [eax + 0x148], 0xffffffff
push 0x402d80
push 0x402d60
call fcn.00405820
add esp, 8
mov ecx, dword [ebp - 0x2008]
mov dword [ecx + 0x144], eax
jmp 0x402920
mov edx, dword [ebp - 0x2008]
mov dword [edx + 0x140], 0
mov eax, dword [ebp - 0x2008]
mov dword [eax + 0x144], 0
mov ecx, dword [ebp - 0x2008]
cmp dword [ecx], 0
jne 0x402ae9
mov edx, dword [ebp - 0x2008]
mov eax, dword [ebp - 0x2010]
mov ecx, dword [edx + 0x138]
cmp ecx, dword [eax + 0x14]
jae 0x402ae9
mov edx, dword [ebp - 0x2010]
mov eax, dword [ebp - 0x2008]
mov ecx, dword [edx + 0x14]
sub ecx, dword [eax + 0x138]
cmp ecx, 0x2000
jae 0x402984
mov edx, dword [ebp - 0x2010]
mov eax, dword [ebp - 0x2008]
mov ecx, dword [edx + 0x14]
sub ecx, dword [eax + 0x138]
mov dword [ebp - 0x200c], ecx
jmp 0x40298e
mov dword [ebp - 0x200c], 0x2000
mov edx, dword [ebp - 0x2008]
mov eax, dword [edx + 0x130]
push eax
mov ecx, dword [ebp - 0x200c]
push ecx
push 1
lea edx, [ebp - 0x2004]
push edx
call fcn.0040a9a5
add esp, 0x10
cmp eax, dword [ebp - 0x200c]
je 0x4029cf
mov eax, dword [ebp - 0x2008]
mov dword [eax], 0xffffffff
or eax, 0xffffffff
jmp 0x402bc8
mov ecx, dword [ebp - 0x2008]
cmp dword [ecx + 4], 0
je 0x402a27
mov dword [ebp - 0x2014], 0
jmp 0x4029f6
mov edx, dword [ebp - 0x2014]
add edx, 1
mov dword [ebp - 0x2014], edx
mov eax, dword [ebp - 0x2014]
cmp eax, dword [ebp - 0x200c]
jge 0x402a27
mov ecx, dword [ebp - 0x2014]
movzx edx, byte [ebp + ecx - 0x2004]
xor edx, 0xed
mov eax, dword [ebp - 0x2014]
mov byte [ebp + eax - 0x2004], dl
jmp 0x4029e7
mov ecx, dword [ebp - 0x2008]
mov edx, dword [ecx + 0x138]
add edx, dword [ebp - 0x200c]
mov eax, dword [ebp - 0x2008]
mov dword [eax + 0x138], edx
mov ecx, dword [ebp - 0x2008]
cmp dword [ecx + 0x140], 0
je 0x402a8b
mov edx, dword [ebp - 0x200c]
push edx
lea eax, [ebp - 0x2004]
push eax
mov ecx, dword [ebp - 0x2008]
mov edx, dword [ecx + 0x140]
push edx
call fcn.00403150
add esp, 0xc
test eax, eax
je 0x402a89
mov eax, dword [ebp - 0x2008]
mov dword [eax], 0xffffffff
jmp 0x402ae9
jmp 0x402ae4
mov ecx, dword [ebp - 0x2008]
mov edx, dword [ecx + 0x134]
push edx
mov eax, dword [ebp - 0x200c]
push eax
push 1
lea ecx, [ebp - 0x2004]
push ecx
call fcn.0040afb6
add esp, 0x10
cmp eax, dword [ebp - 0x200c]
je 0x402ac6
mov edx, dword [ebp - 0x2008]
mov dword [edx], 0xffffffff
jmp 0x402ae9
mov eax, dword [ebp - 0x2008]
mov ecx, dword [eax + 0x13c]
add ecx, dword [ebp - 0x200c]
mov edx, dword [ebp - 0x2008]
mov dword [edx + 0x13c], ecx
jmp 0x402920
mov eax, dword [ebp - 0x2008]
cmp dword [eax + 0x140], 0
je 0x402b53
mov ecx, dword [ebp - 0x2008]
mov edx, dword [ecx + 0x140]
push edx
call fcn.004036d0
add esp, 4
test eax, eax
je 0x402b1d
mov eax, dword [ebp - 0x2008]
mov dword [eax], 0xffffffff
mov ecx, dword [ebp - 0x2008]
mov dword [ecx + 0x140], 0
mov edx, dword [ebp - 0x2010]
mov eax, dword [edx + 0x10]
xor eax, 0xffffffff
mov ecx, dword [ebp - 0x2008]
cmp dword [ecx + 0x148], eax
je 0x402b53
mov edx, dword [ebp - 0x2008]
mov dword [edx], 0xffffffff
mov eax, dword [ebp - 0x2008]
cmp dword [eax + 0x144], 0
je 0x402b97
mov ecx, dword [ebp - 0x2008]
mov edx, dword [ecx + 0x144]
push edx
call fcn.00405960
add esp, 4
test eax, eax
je 0x402b87
mov eax, dword [ebp - 0x2008]
mov dword [eax], 0xffffffff
mov ecx, dword [ebp - 0x2008]
mov dword [ecx + 0x144], 0
push 0
push 0
mov edx, dword [ebp - 0x2008]
mov eax, dword [edx + 0x134]
push eax
call fcn.0040ad8a
add esp, 0xc
test eax, eax
je 0x402bc0
mov ecx, dword [ebp - 0x2008]
mov dword [ecx], 0xffffffff
mov edx, dword [ebp - 0x2008]
mov eax, dword [edx]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405b9a
mov esp, ebp
pop ebp
ret