Function at 0x40a690
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x426e90
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x42e2f4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x4c], ecx
mov ecx, dword [ebp - 0x4c]
call fcn.0040d3b0
push 0x4284b8
mov ecx, dword [ebp + 8]
call fcn.004056f0
push eax
call fcn.00410c41
add esp, 8
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x40a6e7
mov eax, dword [ebp - 0x4c]
jmp 0x40a928
push 2
push 0
mov eax, dword [ebp - 0x1c]
push eax
call fcn.00411854
add esp, 0xc
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.00411765
add esp, 4
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x20]
add edx, 2
push edx
call fcn.00411b27
add esp, 4
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x2c], eax
push 0
push 0
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.00411854
add esp, 0xc
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x20]
push eax
push 1
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.004115b4
add esp, 0x10
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x1c]
push edx
call fcn.0041093e
add esp, 4
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x20]
jne 0x40a761
cmp dword [ebp - 0x20], 0
jne 0x40a77b
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x34], ecx
mov edx, dword [ebp - 0x34]
push edx
call fcn.0041015b
add esp, 4
mov eax, dword [ebp - 0x4c]
jmp 0x40a928
mov eax, dword [ebp - 0x2c]
add eax, dword [ebp - 0x20]
mov byte [eax], 0
mov ecx, dword [ebp - 0x2c]
add ecx, dword [ebp - 0x20]
mov byte [ecx + 1], 0
mov edx, dword [ebp - 0x2c]
movzx eax, byte [edx]
cmp eax, 0xff
jne 0x40a7b3
mov ecx, dword [ebp - 0x2c]
movzx edx, byte [ecx + 1]
cmp edx, 0xfe
jne 0x40a7b3
mov dword [ebp - 0x50], 1
jmp 0x40a7ba
mov dword [ebp - 0x50], 0
mov al, byte [ebp - 0x50]
mov byte [ebp - 0x21], al
mov ecx, dword [ebp - 0x2c]
movzx edx, byte [ecx]
cmp edx, 0xef
jne 0x40a7f4
mov eax, dword [ebp - 0x2c]
movzx ecx, byte [eax + 1]
cmp ecx, 0xbb
jne 0x40a7f4
mov edx, dword [ebp - 0x2c]
movzx eax, byte [edx + 2]
cmp eax, 0xbf
jne 0x40a7f4
mov dword [ebp - 0x54], 1
jmp 0x40a7fb
mov dword [ebp - 0x54], 0
mov cl, byte [ebp - 0x54]
mov byte [ebp - 0x15], cl
lea ecx, [ebp - 0x28]
call fcn.00404570
mov dword [ebp - 4], 0
movzx edx, byte [ebp - 0x21]
test edx, edx
je 0x40a829
mov eax, dword [ebp - 0x2c]
add eax, 2
push eax
lea ecx, [ebp - 0x28]
call fcn.00405740
jmp 0x40a87f
movzx ecx, byte [ebp - 0x15]
test ecx, ecx
je 0x40a873
mov edx, dword [ebp - 0x2c]
add edx, 3
push edx
lea ecx, [ebp - 0x28]
call fcn.00405700
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x28]
call fcn.00404230
mov dword [ebp - 0x58], eax
mov ecx, dword [ebp - 0x58]
mov dword [ebp - 0x5c], ecx
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x5c]
push edx
lea ecx, [ebp - 0x28]
call fcn.00404a10
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x38]
call fcn.00404890
jmp 0x40a87f
mov eax, dword [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x28]
call fcn.00405700
lea ecx, [ebp - 0x10]
call fcn.00404570
mov byte [ebp - 4], 2
push 0x4284c0
lea ecx, [ebp - 0x40]
call fcn.004057c0
mov byte [ebp - 4], 3
push 0
lea ecx, [ebp - 0x40]
push ecx
lea ecx, [ebp - 0x28]
call fcn.00407cf0
mov byte [ebp - 0x39], al
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x40]
call fcn.00404890
movzx edx, byte [ebp - 0x39]
test edx, edx
je 0x40a8d0
push 0x4284c4
lea ecx, [ebp - 0x10]
call fcn.00405700
jmp 0x40a8dd
push 0x4284c8
lea ecx, [ebp - 0x10]
call fcn.00405700
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x10]
call fcn.004056f0
push eax
mov ecx, dword [ebp - 0x4c]
call fcn.0040b600
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp - 0x44]
push edx
call fcn.0041015b
add esp, 4
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x48], eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x10]
call fcn.00404890
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.00404890
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret 4