Function at 0x401850
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
mov dword [ebp - 8], eax
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0xc], ecx
cmp dword [ebp - 8], 0
je 0x401874
mov edx, dword [ebp - 8]
movsx eax, byte [edx + 0x5c]
cmp eax, 0x72
je 0x40187e
mov eax, 0xfffffffe
jmp 0x401c2a
mov ecx, dword [ebp - 8]
cmp dword [ecx + 0x38], 0xfffffffd
je 0x401890
mov edx, dword [ebp - 8]
cmp dword [edx + 0x38], 0xffffffff
jne 0x401898
or eax, 0xffffffff
jmp 0x401c2a
mov eax, dword [ebp - 8]
cmp dword [eax + 0x38], 1
jne 0x4018a8
xor eax, eax
jmp 0x401c2a
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 8]
mov eax, dword [ebp + 0xc]
mov dword [edx + 0xc], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 0x10]
mov dword [ecx + 0x10], edx
mov eax, dword [ebp - 8]
cmp dword [eax + 0x10], 0
je 0x401943
mov ecx, dword [ebp - 8]
cmp dword [ecx + 0x6c], 0xffffffff
je 0x401943
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 8]
mov cl, byte [eax + 0x6c]
mov byte [edx], cl
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0xc]
add ecx, 1
mov edx, dword [ebp - 8]
mov dword [edx + 0xc], ecx
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x10]
sub ecx, 1
mov edx, dword [ebp - 8]
mov dword [edx + 0x10], ecx
mov eax, dword [ebp - 8]
mov dword [eax + 0x6c], 0xffffffff
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x68]
add edx, 1
mov eax, dword [ebp - 8]
mov dword [eax + 0x68], edx
mov ecx, dword [ebp - 0xc]
add ecx, 1
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 8]
cmp dword [edx + 0x70], 0
je 0x401943
mov eax, dword [ebp - 8]
mov dword [eax + 0x38], 1
mov eax, 1
jmp 0x401c2a
mov ecx, dword [ebp - 8]
cmp dword [ecx + 0x10], 0
je 0x401bda
mov edx, dword [ebp - 8]
cmp dword [edx + 0x58], 0
je 0x401a4b
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 4]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
cmp eax, dword [edx + 0x10]
jbe 0x40197a
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x10]
mov dword [ebp - 0x10], edx
cmp dword [ebp - 0x10], 0
jbe 0x4019d6
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
push edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0xc]
push ecx
call fcn.00467d70
add esp, 0xc
mov edx, dword [ebp - 4]
add edx, dword [ebp - 0x10]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
mov dword [eax + 0xc], ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx]
add eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 8]
mov dword [ecx], eax
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x10]
sub eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x10], eax
mov edx, dword [ebp - 8]
mov eax, dword [edx + 4]
sub eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 8]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 8]
cmp dword [edx + 0x10], 0
jbe 0x401a09
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x40]
push ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x10]
push eax
push 1
mov ecx, dword [ebp - 4]
push ecx
call fcn.004748bb
add esp, 0x10
mov edx, dword [ebp - 8]
mov ecx, dword [edx + 0x10]
sub ecx, eax
mov edx, dword [ebp - 8]
mov dword [edx + 0x10], ecx
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 0x10]
sub ecx, dword [eax + 0x10]
mov dword [ebp + 0x10], ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x64]
add eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x64], eax
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x68]
add eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x68], eax
cmp dword [ebp + 0x10], 0
jne 0x401a43
mov edx, dword [ebp - 8]
mov dword [edx + 0x3c], 1
mov eax, dword [ebp + 0x10]
jmp 0x401c2a
mov eax, dword [ebp - 8]
cmp dword [eax + 4], 0
jne 0x401acb
mov ecx, dword [ebp - 8]
cmp dword [ecx + 0x3c], 0
jne 0x401acb
call fcn.00474f29
mov dword [eax], 0
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x40]
push eax
push 0x4000
push 1
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x44]
push edx
call fcn.004748bb
add esp, 0x10
mov ecx, dword [ebp - 8]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 8]
cmp dword [edx + 4], 0
jne 0x401ac0
mov eax, dword [ebp - 8]
mov dword [eax + 0x3c], 1
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x40]
push edx
call fcn.0047577a
add esp, 4
test eax, eax
je 0x401ac0
mov eax, dword [ebp - 8]
mov dword [eax + 0x38], 0xffffffff
jmp 0x401bda
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x44]
mov dword [ecx], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x64]
mov eax, dword [ebp - 8]
add edx, dword [eax + 4]
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x64], edx
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x68]
mov ecx, dword [ebp - 8]
add eax, dword [ecx + 0x10]
mov edx, dword [ebp - 8]
mov dword [edx + 0x68], eax
push 0
mov eax, dword [ebp - 8]
push eax
call fcn.00405e40
add esp, 8
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x38], eax
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 8]
mov ecx, dword [edx + 0x64]
sub ecx, dword [eax + 4]
mov edx, dword [ebp - 8]
mov dword [edx + 0x64], ecx
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 8]
mov edx, dword [eax + 0x68]
sub edx, dword [ecx + 0x10]
mov eax, dword [ebp - 8]
mov dword [eax + 0x68], edx
mov ecx, dword [ebp - 8]
cmp dword [ecx + 0x38], 1
jne 0x401bc1
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0xc]
sub eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x4c]
push eax
call fcn.004051b0
add esp, 0xc
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x4c], eax
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0xc]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 8]
push ecx
call fcn.00402350
add esp, 4
mov edx, dword [ebp - 8]
cmp eax, dword [edx + 0x4c]
je 0x401b80
mov eax, dword [ebp - 8]
mov dword [eax + 0x38], 0xfffffffd
jmp 0x401bc1
mov ecx, dword [ebp - 8]
push ecx
call fcn.00402350
add esp, 4
mov edx, dword [ebp - 8]
push edx
call fcn.00401420
add esp, 4
mov eax, dword [ebp - 8]
cmp dword [eax + 0x38], 0
jne 0x401bc1
mov ecx, dword [ebp - 8]
push ecx
call fcn.00405c10
add esp, 4
push 0
push 0
push 0
call fcn.004051b0
add esp, 0xc
mov edx, dword [ebp - 8]
mov dword [edx + 0x4c], eax
mov eax, dword [ebp - 8]
cmp dword [eax + 0x38], 0
jne 0x401bd3
mov ecx, dword [ebp - 8]
cmp dword [ecx + 0x3c], 0
je 0x401bd5
jmp 0x401bda
jmp 0x401943
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0xc]
sub eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x4c]
push eax
call fcn.004051b0
add esp, 0xc
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x4c], eax
mov edx, dword [ebp - 8]
mov eax, dword [ebp + 0x10]
cmp eax, dword [edx + 0x10]
jne 0x401c1f
mov ecx, dword [ebp - 8]
cmp dword [ecx + 0x38], 0xfffffffd
je 0x401c1a
mov edx, dword [ebp - 8]
cmp dword [edx + 0x38], 0xffffffff
jne 0x401c1f
or eax, 0xffffffff
jmp 0x401c2a
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 0x10]
sub ecx, dword [eax + 0x10]
mov eax, ecx
mov esp, ebp
pop ebp
ret