Function at 0x408640
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x453917
mov eax, dword fs:[0]
push eax
sub esp, 0x174
push ebx
push esi
push edi
push ecx
lea edi, [ebp - 0xc0]
mov ecx, 0x2d
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
pop ecx
mov eax, dword [0x46f020]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x18], ecx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x18]
call fcn.00407de0
mov ecx, dword [ebp - 0x18]
call fcn.00401f80
push eax
lea eax, [ebp - 0x148]
push eax
call fcn.00408310
add esp, 8
mov dword [ebp - 0x180], eax
mov ecx, dword [ebp - 0x180]
push ecx
mov ecx, dword [ebp - 0x18]
add ecx, 0x1c
call fcn.00402020
lea ecx, [ebp - 0x148]
call fcn.00401f90
call fcn.0042b1a0
mov dword [eax], 0x8000
push 0
mov eax, dword [ebp + 8]
push eax
call fcn.0042c120
add esp, 8
test eax, eax
je 0x4086f0
xor al, al
jmp 0x408947
push 0x46ba48
mov ecx, dword [ebp - 0x18]
call fcn.00401f80
push eax
call fcn.00425170
add esp, 8
mov dword [ebp - 0x180], eax
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x180]
mov dword [eax + 0x38], ecx
cmp dword [ebp - 0x180], 0
je 0x408945
mov dword [ebp - 0x24], 0
xor eax, eax
mov word [ebp - 0x30], ax
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 0x38]
push ecx
push 1
push 4
mov edx, dword [ebp - 0x18]
add edx, 0x44
push edx
call fcn.00429c30
add esp, 0x10
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 0x38]
push ecx
push 1
push 1
mov edx, dword [ebp - 0x18]
add edx, 0x64
push edx
call fcn.00429c30
add esp, 0x10
mov eax, dword [ebp - 0x18]
movzx ecx, byte [eax + 0x64]
xor ecx, 0x55
mov edx, dword [ebp - 0x18]
mov byte [edx + 0x64], cl
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax + 0x64]
xor ecx, ecx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040ca90
add esp, 4
mov dword [ebp - 0x154], eax
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x154]
mov dword [eax + 0x68], ecx
mov byte [ebp - 0x61], 0
jmp 0x4087b6
mov al, byte [ebp - 0x61]
add al, 1
mov byte [ebp - 0x61], al
movzx eax, byte [ebp - 0x61]
mov ecx, dword [ebp - 0x18]
movzx edx, byte [ecx + 0x64]
cmp eax, edx
jge 0x408941
push 0x20
push 0
lea eax, [ebp - 0x58]
push eax
call fcn.00410bf0
add esp, 0xc
push 0x20
call fcn.0040c1f0
add esp, 4
mov dword [ebp - 0x160], eax
cmp dword [ebp - 0x160], 0
je 0x408805
mov ecx, dword [ebp - 0x160]
call fcn.00407cb0
mov dword [ebp - 0x180], eax
jmp 0x40880f
mov dword [ebp - 0x180], 0
movzx eax, byte [ebp - 0x61]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + 0x68]
mov ecx, dword [ebp - 0x180]
mov dword [edx + eax*4], ecx
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 0x38]
push ecx
push 1
push 1
lea edx, [ebp - 0x30]
push edx
call fcn.00429c30
add esp, 0x10
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 0x38]
push ecx
push 1
movsx edx, word [ebp - 0x30]
push edx
lea eax, [ebp - 0x58]
push eax
call fcn.00429c30
add esp, 0x10
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 0x38]
push ecx
push 1
push 4
lea edx, [ebp - 0x24]
push edx
call fcn.00429c30
add esp, 0x10
movzx eax, byte [ebp - 0x61]
shl eax, 2
and eax, 0xff
movzx ecx, word [eax*2 + 0x454420]
xor ecx, dword [ebp - 0x24]
mov dword [ebp - 0x24], ecx
lea eax, [ebp - 0x58]
push eax
movzx ecx, byte [ebp - 0x61]
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 0x68]
mov ecx, dword [eax + ecx*4]
call fcn.00407de0
push 0x3c
call fcn.0040c1f0
add esp, 4
mov dword [ebp - 0x178], eax
mov dword [ebp - 4], 0
cmp dword [ebp - 0x178], 0
je 0x4088cd
mov ecx, dword [ebp - 0x178]
call fcn.00409900
mov dword [ebp - 0x180], eax
jmp 0x4088d7
mov dword [ebp - 0x180], 0
mov eax, dword [ebp - 0x180]
mov dword [ebp - 0x16c], eax
mov dword [ebp - 4], 0xffffffff
movzx ecx, byte [ebp - 0x61]
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 0x68]
mov ecx, dword [eax + ecx*4]
mov edx, dword [ebp - 0x16c]
mov dword [ecx + 0x1c], edx
cmp dword [ebp - 0x16c], 0
je 0x40893c
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + 0x38]
push edx
movzx eax, byte [ebp - 0x61]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + 0x68]
mov ecx, dword [edx + eax*4]
call fcn.00401f80
push eax
movzx eax, byte [ebp - 0x61]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + 0x68]
mov eax, dword [edx + eax*4]
mov ecx, dword [eax + 0x1c]
call fcn.0040a740
jmp 0x4087ae
mov al, 1
jmp 0x408947
xor al, al
push edx
mov ecx, ebp
push eax
lea edx, [0x408984]
call fcn.0040d090
pop eax
pop edx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040c1e0
add esp, 0x180
cmp ebp, esp
call fcn.0040d0f0
mov esp, ebp
pop ebp
ret 4