Function at 0x40c2c0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x34
mov eax, dword [0x43d00c]
mov esi, ecx
xor eax, ebp
mov dword [ebp - 0x10], eax
push 0
push 0
push dword [ecx]
call fcn.0041a26e
add esp, 0xc
lea eax, [ebp - 0x14]
push dword [esi]
push 1
push 4
push eax
call fcn.0041f00f
add esp, 0x10
mov ebx, 0xffffffff
cmp eax, 1
jne 0x40c4ef
cmp dword [ebp - 0x14], 0x3152414d
jne 0x40c4ef
lea eax, [ebp - 0x18]
push dword [esi]
push 1
push 4
push eax
call fcn.0041f00f
add esp, 0x10
cmp eax, 1
jne 0x40c4ef
push dword [ebp - 0x18]
call dword [sym.imp.WSOCK32.dll_ntohl]
mov dword [ebp - 0x18], eax
push 0
push eax
push dword [esi]
call fcn.0041a26e
add esp, 0xc
test eax, eax
jne 0x40c4ef
lea eax, [ebp - 0x1c]
push dword [esi]
push 1
push 4
push eax
call fcn.0041f00f
add esp, 0x10
cmp eax, 1
jne 0x40c4ef
push dword [ebp - 0x1c]
call dword [sym.imp.WSOCK32.dll_ntohl]
mov edi, eax
mov dword [ebp - 0x1c], eax
push eax
call fcn.0041f68f
add esp, 4
test eax, eax
je 0x40c4ef
push dword [esi]
push 1
push edi
push eax
mov dword [ebp - 0x20], eax
call fcn.0041f00f
add esp, 0x10
cmp eax, 1
jne 0x40c4c6
mov eax, dword [ebp - 0x20]
test edi, edi
lea edx, [eax + edi]
mov ebx, eax
mov ecx, eax
jle 0x40c4d9
lea eax, [edx - 1]
lea edi, [ecx + edi - 0xd]
mov ebx, ecx
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x38], edi
mov eax, edx
sub eax, ebx
cmp eax, 0xe
jl 0x40c4d9
mov eax, dword [ebx + 4]
lea edi, [ebx + 0xc]
mov dword [ebp - 0x30], eax
mov eax, dword [ebx + 8]
mov dword [ebp - 0x24], eax
push dword [ebx]
mov eax, dword [sym.imp.WSOCK32.dll_ntohl]
mov dword [ebp - 0x2c], ebx
mov ebx, eax
call eax
mov dword [ebp - 0x40], eax
push dword [ebp - 0x30]
call ebx
mov dword [ebp - 0x30], eax
push dword [ebp - 0x24]
call ebx
mov ebx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x3c], eax
mov eax, edi
mov dword [ebp - 0x24], edi
cmp byte [ebx + 0xc], 0
je 0x40c42c
mov ecx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x24]
sub ecx, ebx
test ecx, ecx
je 0x40c4d3
dec ecx
cmp byte [eax + 1], 0
lea eax, [eax + 1]
jne 0x40c41a
cmp eax, edx
je 0x40c503
mov edi, eax
sub edi, dword [ebp - 0x24]
js 0x40c503
inc eax
mov dword [ebp - 0x2c], eax
lea eax, [edi + 0x14]
push eax
call fcn.0041f68f
add esp, 4
test eax, eax
je 0x40c50a
mov ebx, eax
mov dword [eax], 0
mov eax, dword [ebp - 0x40]
inc edi
mov dword [ebx + 4], eax
mov eax, dword [ebp - 0x30]
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebx + 0xc], eax
mov eax, ebx
add eax, 0x10
push edi
mov edi, dword [ebp - 0x24]
push edi
push eax
call fcn.00424880
add esp, 0xc
push edi
call fcn.0041f7f0
add esp, 4
push eax
push edi
call fcn.0040c520
add esp, 8
movzx eax, al
mov ecx, dword [esi + eax*4 + 4]
test ecx, ecx
je 0x40c4ad
mov eax, ecx
mov ecx, dword [ecx]
test ecx, ecx
jne 0x40c4a3
jmp 0x40c4b1
lea eax, [esi + eax*4 + 4]
mov dword [eax], ebx
mov edx, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x20]
cmp ebx, edx
jb 0x40c3c4
jmp 0x40c4d9
push dword [ebp - 0x20]
call fcn.0041f205
add esp, 4
jmp 0x40c4ef
mov ebx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x20]
push ecx
mov esi, edx
call fcn.0041f205
add esp, 4
mov eax, ebx
xor ebx, ebx
cmp eax, esi
setne bl
neg ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00412bfe
mov eax, ebx
add esp, 0x34
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, dword [ebp - 0x20]
mov ebx, eax
jmp 0x40c4d9
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x2c]
jmp 0x40c4d9