Function at 0x40cab0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov byte [0x830db0], 0
push 0x50e920
mov eax, dword [ebp + 0xc]
push eax
call fcn.004d0fd0
add esp, 8
test eax, eax
jne 0x40cadb
mov dword [ebp - 0x18], 2
jmp 0x40cb1e
push 0x50e924
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.004d0fd0
add esp, 8
test eax, eax
jne 0x40caf9
mov dword [ebp - 0x18], 0x14
jmp 0x40cb1e
push 0x50e928
mov edx, dword [ebp + 0xc]
push edx
call fcn.004d0fd0
add esp, 8
test eax, eax
jne 0x40cb17
mov dword [ebp - 0x18], 0xc8
jmp 0x40cb1e
xor eax, eax
jmp 0x40cfb9
mov eax, dword [ebp + 8]
push eax
call fcn.004cff30
add esp, 4
test eax, eax
je 0x40cb41
mov ecx, dword [ebp + 8]
push ecx
call fcn.004cff30
add esp, 4
cmp eax, 0x100
jbe 0x40cb48
xor eax, eax
jmp 0x40cfb9
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x1c], edx
cmp dword [ebp - 0x1c], 2
je 0x40cb6c
cmp dword [ebp - 0x1c], 0x14
je 0x40cdf4
cmp dword [ebp - 0x1c], 0xc8
je 0x40cb6c
jmp 0x40cfb2
mov dword [ebp - 8], 0
jmp 0x40cb7e
mov eax, dword [ebp - 8]
add eax, 1
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
cmp ecx, dword [0x830eb4]
jge 0x40cbf4
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax*4 + 0x7cf330]
push ecx
call fcn.004d0fd0
add esp, 8
test eax, eax
jne 0x40cbf2
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x7cf330]
cmp dword [eax + 0x104], 9
je 0x40cbf2
mov ecx, dword [ebp - 8]
mov edx, dword [ecx*4 + 0x7cf330]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
mov dword [eax + 0x108], ecx
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x120], 0
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x104], 0
mov eax, dword [ebp - 0xc]
jmp 0x40cfb9
jmp 0x40cb75
lea ecx, [ebp - 0x10]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.0040a9e0
add esp, 8
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x40cc15
jmp 0x40cc17
jmp 0x40cc34
mov ecx, dword [ebp - 4]
push ecx
push str.mopen___aod_fsze___rc_d
push 0x830db0
call fcn.004d0ba5
add esp, 0xc
xor eax, eax
jmp 0x40cfb9
cmp dword [0x830eb4], 0x186a0
jl 0x40cc59
push 0x50e948
push 0x830db0
call fcn.004d0ba5
add esp, 8
xor eax, eax
jmp 0x40cfb9
push 0x140
call fcn.004cfe98
add esp, 4
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x40cc88
push 0x50e974
push 0x830db0
call fcn.004d0ba5
add esp, 8
xor eax, eax
jmp 0x40cfb9
mov edx, dword [0x830eb4]
mov eax, dword [ebp - 0xc]
mov dword [edx*4 + 0x7cf330], eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [0x830eb4]
mov dword [ecx + 0x108], edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.004cfda0
add esp, 8
mov edx, dword [0x830eb4]
add edx, 1
mov dword [0x830eb4], edx
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x110], 0x400
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
mov dword [ecx + 0x114], edx
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x118], 2
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x114]
push edx
call fcn.004cfe98
add esp, 4
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x24]
mov dword [eax + 0x10c], ecx
cmp dword [ebp - 0x24], 0
jne 0x40cd38
push 0x50e988
push 0x830db0
call fcn.004d0ba5
add esp, 8
mov edx, dword [ebp - 0xc]
push edx
call fcn.004cfd5f
add esp, 4
xor eax, eax
jmp 0x40cfb9
push 0x50e99c
mov eax, dword [ebp + 8]
push eax
call fcn.004d0f8b
add esp, 8
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x40cd77
push str.mopen___fopen__
push 0x830db0
call fcn.004d0ba5
add esp, 8
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.004cfd5f
add esp, 4
xor eax, eax
jmp 0x40cfb9
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x10]
push eax
push 1
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x10c]
push edx
call fcn.004d2e5e
add esp, 0x10
cmp eax, dword [ebp - 0x10]
je 0x40cdbd
push str.mopen___fread__
push 0x830db0
call fcn.004d0ba5
add esp, 8
mov eax, dword [ebp - 0xc]
push eax
call fcn.004cfd5f
add esp, 4
xor eax, eax
jmp 0x40cfb9
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.004d0e5b
add esp, 4
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
mov dword [edx + 0x11c], eax
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x104], 0
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x120], 0
jmp 0x40cfb6
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
jmp 0x40ce0d
mov eax, dword [ebp - 8]
add eax, 1
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
cmp ecx, dword [0x830eb4]
jge 0x40ce5d
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax*4 + 0x7cf330]
push ecx
call fcn.004d0fd0
add esp, 8
test eax, eax
jne 0x40ce5b
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x7cf330]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
mov dword [ecx + 0x108], edx
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x120], 0
jmp 0x40ce5d
jmp 0x40ce04
cmp dword [ebp - 0xc], 0
jne 0x40cefb
cmp dword [0x830eb4], 0x186a0
jl 0x40ce8c
push str.mopen___Mfile_ct___MFILE_MAX_OPEN_FILES
push 0x830db0
call fcn.004d0ba5
add esp, 8
xor eax, eax
jmp 0x40cfb9
push 0x140
call fcn.004cfe98
add esp, 4
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x40cebb
push 0x50e9ec
push 0x830db0
call fcn.004d0ba5
add esp, 8
xor eax, eax
jmp 0x40cfb9
mov ecx, dword [0x830eb4]
mov edx, dword [ebp - 0xc]
mov dword [ecx*4 + 0x7cf330], edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [0x830eb4]
mov dword [eax + 0x108], ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0xc]
push eax
call fcn.004cfda0
add esp, 8
mov ecx, dword [0x830eb4]
add ecx, 1
mov dword [0x830eb4], ecx
jmp 0x40cf19
mov edx, dword [ebp - 0xc]
cmp dword [edx + 0x10c], 0
je 0x40cf19
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x10c]
push ecx
call fcn.004cfd5f
add esp, 4
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x110], 0x400
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x114], 0x400
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x118], 2
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x114]
push eax
call fcn.004cfe98
add esp, 4
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x28]
mov dword [ecx + 0x10c], edx
cmp dword [ebp - 0x28], 0
jne 0x40cf89
mov eax, dword [ebp - 0xc]
push eax
call fcn.004cfd5f
add esp, 4
push str.mopen___malloc__
push 0x830db0
call fcn.004d0ba5
add esp, 8
xor eax, eax
jmp 0x40cfb9
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x11c], 0
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x120], 0
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x104], 0
jmp 0x40cfb6
xor eax, eax
jmp 0x40cfb9
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret