Function at 0x40bd90
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x1c
mov edi, dword [ebp + 0xc]
mov eax, dword [0x43d00c]
mov esi, 0xffffffff
mov ecx, edi
xor eax, ebp
or ecx, dword [ebp + 0x14]
mov dword [ebp - 0x10], eax
je 0x40bfd3
mov ebx, dword [ebp + 8]
push 0
push 4
push ebx
call fcn.0041a26e
add esp, 0xc
test eax, eax
jne 0x40bfd3
lea eax, [ebp - 0x14]
push ebx
push 1
push 4
push eax
call fcn.0041f00f
add esp, 0x10
cmp eax, 1
jne 0x40bfd3
push dword [ebp - 0x14]
call dword [sym.imp.WSOCK32.dll_ntohl]
cmp dword [ebp + 0x10], 0
mov dword [ebp - 0x14], eax
je 0x40be3c
mov dword [ebp - 0x24], eax
push 1
push 8
mov ebx, dword [ebp + 8]
push ebx
call fcn.0041a26e
add esp, 0xc
test eax, eax
jne 0x40bfd3
push ebx
push 1
push 4
mov ebx, dword [ebp + 0x10]
push ebx
call fcn.0041f00f
add esp, 0x10
cmp eax, 1
jne 0x40bfd3
push dword [ebx]
call dword [sym.imp.WSOCK32.dll_ntohl]
mov dword [ebx], eax
mov eax, dword [ebp - 0x24]
push 0
push eax
mov eax, dword [ebp + 8]
mov ebx, eax
push eax
call fcn.0041a26e
add esp, 0xc
test eax, eax
jne 0x40bfd3
push 1
push 4
push ebx
call fcn.0041a26e
add esp, 0xc
test eax, eax
jne 0x40bfd3
lea eax, [ebp - 0x18]
push ebx
push 1
push 4
push eax
call fcn.0041f00f
add esp, 0x10
cmp eax, 1
jne 0x40bfd3
push dword [ebp - 0x18]
call dword [sym.imp.WSOCK32.dll_ntohl]
test edi, edi
mov dword [ebp - 0x18], eax
je 0x40be9e
xor ecx, ecx
cmp eax, 8
setne cl
mov dword [edi], ecx
mov ebx, dword [ebp + 0x14]
test ebx, ebx
je 0x40bfd1
mov dword [ebp - 0x24], eax
push 0
push 0
push 0x10
mov edi, dword [ebp + 8]
push edi
call fcn.0041a289
add esp, 0x10
test eax, eax
jne 0x40bfd3
lea eax, [ebp - 0x1c]
push edi
push 1
push 4
push eax
call fcn.0041f00f
add esp, 0x10
cmp eax, 1
jne 0x40bfd3
push dword [ebp - 0x1c]
call dword [sym.imp.WSOCK32.dll_ntohl]
cmp eax, 8
mov dword [ebp - 0x1c], eax
ja 0x40bfd3
test eax, eax
mov dword [ebp - 0x28], eax
je 0x40bf58
xor edi, edi
push 1
push 4
mov eax, dword [ebp + 8]
mov ebx, eax
push eax
call fcn.0041a26e
add esp, 0xc
test eax, eax
jne 0x40bfd3
push ebx
push 1
push 4
lea eax, [ebp - 0x20]
push eax
call fcn.0041f00f
add esp, 0x10
cmp eax, 1
jne 0x40bfd3
push dword [ebp - 0x20]
call dword [sym.imp.WSOCK32.dll_ntohl]
mov dword [ebp - 0x20], eax
push 1
push eax
push ebx
call fcn.0041a26e
add esp, 0xc
test eax, eax
jne 0x40bfd3
inc edi
cmp edi, dword [ebp - 0x28]
jb 0x40befe
push dword [ebp + 8]
call fcn.0041af45
add esp, 4
mov ecx, dword [ebp - 0x24]
xor ecx, eax
sar eax, 0x1f
or ecx, eax
jne 0x40bf7a
mov eax, dword [ebp + 0x14]
mov dword [eax], 0
jmp 0x40bfd1
mov edi, dword [ebp + 0x1c]
mov ebx, dword [ebp + 0x18]
test edi, edi
je 0x40bfbd
mov eax, dword [ebp + 0x14]
mov dword [eax], 1
push dword [ebp + 8]
push 1
push 4
push edi
call fcn.0041f00f
add esp, 0x10
cmp eax, 1
jne 0x40bfd3
push dword [edi]
call dword [sym.imp.WSOCK32.dll_ntohl]
test ebx, ebx
mov dword [edi], eax
je 0x40bfd1
push dword [ebp + 8]
call fcn.0041af45
add esp, 4
jmp 0x40bfcf
test ebx, ebx
je 0x40bfd1
push dword [ebp + 8]
call fcn.0041af45
add esp, 4
add eax, 4
mov dword [ebx], eax
xor esi, esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00412bfe
mov eax, esi
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret