Function at 0x401360
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
mov eax, dword [0x6292ec]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
push edi
xor edi, edi
mov esi, ecx
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x40], edi
cmp esi, edi
je 0x4016bd
cmp eax, edi
je 0x4016bd
push ebx
push 0x40f2d0
push esi
call fcn.00403a7a
mov ebx, eax
add esp, 8
cmp ebx, edi
jne 0x4013c3
pop ebx
pop edi
mov eax, 0x8007
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402c1f
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x34]
push eax
push esi
call fcn.00402e9c
add esp, 8
test eax, eax
je 0x4013f3
push ebx
call fcn.0040394a
add esp, 4
pop ebx
pop edi
mov eax, 0x8008
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402c1f
mov esp, ebp
pop ebp
ret
push 0x10
call fcn.00403849
add esp, 4
mov dword [ebp - 0x38], eax
cmp eax, edi
jne 0x40141a
pop ebx
pop edi
mov eax, 0x8006
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402c1f
mov esp, ebp
pop ebp
ret
mov dword [eax], 0xdeadbee0
mov dword [eax + 4], edi
cmp dword [ebp - 0x48], edi
je 0x401431
cmp dword [ebp - 0x44], edi
jne 0x4015d3
push ebx
call fcn.00403755
add esp, 4
cmp eax, 0xffffffff
je 0x401669
add eax, 0xffffff9f
cmp eax, 4
ja case.default.0x40144b
jmp dword [eax*4 + 0x4016d4]
push ebx
call fcn.00403755
push ebx
mov esi, eax
call fcn.00403755
add esp, 8
cmp esi, 0xffffffff
je 0x401669
cmp eax, 0xffffffff
je 0x401669
shl esi, 8
or esi, eax
cmp esi, dword [ebp - 0x20]
ja 0x401669
cmp esi, edi
jbe case.default.0x40144b
push ebx
call fcn.00403755
add esp, 4
cmp eax, 0xffffffff
je 0x401669
cmp eax, edi
jne 0x4014a6
cmp esi, 1
jne 0x401669
dec esi
jne 0x401487
jmp case.default.0x40144b
push ebx
call fcn.00403755
push ebx
mov esi, eax
call fcn.00403755
add esp, 8
cmp esi, 0xffffffff
je 0x401669
cmp eax, 0xffffffff
je 0x401669
shl esi, 8
or esi, eax
cmp esi, 0x10
ja 0x401669
push esi
call fcn.00403849
add esp, 4
mov dword [ebp - 0x3c], eax
cmp eax, edi
je 0x401662
push ebx
push esi
push eax
call fcn.0040361d
add esp, 0xc
test eax, eax
je 0x401669
mov dword [ebp - 0x44], 1
jmp case.default.0x40144b
push ebx
call fcn.00403755
push ebx
mov esi, eax
call fcn.00403755
push ebx
mov edi, eax
call fcn.00403755
push ebx
mov dword [ebp - 0x54], eax
call fcn.00403755
add esp, 0x10
cmp esi, 0xffffffff
je 0x401669
cmp edi, 0xffffffff
je 0x401669
mov ecx, dword [ebp - 0x54]
cmp ecx, 0xffffffff
je 0x401669
cmp eax, 0xffffffff
je 0x401669
shl esi, 8
or esi, edi
shl esi, 8
or esi, ecx
shl esi, 8
or esi, eax
cmp esi, dword [ebp - 0x20]
ja 0x401669
lea edi, [esi + 0x7ff]
and edi, 0xfffffc00
push edi
call fcn.00403849
add esp, 4
mov dword [ebp - 0x40], eax
test eax, eax
je 0x401669
push ebx
push esi
push 1
push eax
mov dword [ebp - 0x48], 1
call fcn.00403600
add esp, 0x10
cmp eax, esi
jne 0x401669
sub edi, esi
push edi
mov edi, dword [ebp - 0x40]
lea ecx, [esi + edi]
push 0
push ecx
call fcn.00403aa0
mov eax, dword [ebp - 0x38]
add esp, 0xc
mov dword [eax + 4], edi
mov dword [eax + 8], esi
xor edi, edi
jmp case.default.0x40144b
mov edx, dword [ebp - 0x38]
mov dword [edx + 0xc], edi
xor esi, esi
mov edi, 0x629294
mov eax, dword [edi]
mov ecx, dword [ebp - 0x3c]
push eax
push ecx
call fcn.00403330
add esp, 8
test eax, eax
jne 0x401601
inc esi
add edi, 0x10
cmp esi, 1
jb 0x4015e0
mov esi, dword [ebp - 0x38]
jmp 0x401610
shl esi, 4
mov edx, dword [esi + 0x629298]
mov esi, dword [ebp - 0x38]
mov dword [esi + 0xc], edx
push ebx
call fcn.0040394a
mov eax, dword [ebp - 0x3c]
push eax
call fcn.004032f3
add esp, 8
cmp dword [esi + 0xc], 0
jne 0x40164a
mov ecx, dword [ebp - 0x40]
push ecx
call fcn.004032f3
add esp, 4
pop ebx
pop edi
mov eax, 0x800f
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402c1f
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x4c]
pop ebx
pop edi
mov dword [edx], esi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402c1f
mov esp, ebp
pop ebp
ret
mov esi, 0x8006
jmp 0x40166e
mov esi, 0x8009
push ebx
call fcn.0040394a
mov edi, 1
add esp, 4
cmp dword [ebp - 0x44], edi
jne 0x40168d
mov eax, dword [ebp - 0x3c]
push eax
call fcn.004032f3
add esp, 4
cmp dword [ebp - 0x48], edi
jne 0x40169e
mov ecx, dword [ebp - 0x40]
push ecx
call fcn.004032f3
add esp, 4
mov edx, dword [ebp - 0x38]
push edx
call fcn.004032f3
add esp, 4
pop ebx
pop edi
mov eax, esi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402c1f
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
mov eax, 0x8002
pop esi
call fcn.00402c1f
mov esp, ebp
pop ebp
ret