Function at 0x4051d0
Capabilities:
Read file on windows
Receive data
Receive data on socket

Disassembly:
sub esp, 0x124
mov eax, dword [0x40b100]
xor eax, esp
mov dword [esp + 0x120], eax
mov eax, dword [esp + 0x130]
push ebx
push ebp
mov ebp, dword [esp + 0x134]
push esi
mov esi, dword [esp + 0x134]
push edi
mov dword [esp + 0x20], ebp
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], eax
test eax, eax
jle 0x4054f6
mov ebx, dword [sym.imp.MSVCR90.dll__errno]
jmp 0x405224
mov ebp, dword [esp + 0x20]
cmp dword [esi + 0x18], 0
jne 0x4052ea
xor edi, edi
call ebx
mov dword [eax], 0
mov edx, dword [esi + 8]
mov eax, 8
sub eax, edi
cmp dword [esi + 4], 0
lea ecx, [esp + edi + 0x24]
jne 0x40525c
push eax
push ecx
push edx
call dword [sym.imp.MSVCR90.dll__read]
add esp, 0xc
mov ebp, eax
jmp 0x40527f
push 0
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_recv]
mov ebp, eax
test ebp, ebp
jg 0x405283
call ebx
mov dword [esp + 0x14], eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esp + 0x14]
mov dword [ecx], eax
test ebp, ebp
jle 0x405287
add edi, ebp
jmp 0x40529e
jne 0x405290
call ebx
cmp dword [eax], 0
je 0x4052a7
call ebx
cmp dword [eax], 0
je 0x40529e
call ebx
cmp dword [eax], 4
jne 0x4052a5
cmp edi, 8
jne 0x405230
jmp 0x4052b0
mov edi, ebp
cmp edi, 8
jne 0x405513
cmp byte [esp + 0x24], 1
jb 0x405513
cmp byte [esp + 0x25], 5
jne 0x405513
movzx eax, byte [esp + 0x28]
movzx edx, byte [esp + 0x29]
shl eax, 8
or eax, edx
mov dword [esi + 0x18], eax
movzx eax, byte [esp + 0x2a]
mov dword [esi + 0x1c], eax
je 0x4054f6
mov ebp, dword [esp + 0x20]
mov eax, dword [esi + 0x18]
xor edi, edi
cmp eax, dword [esp + 0x18]
mov dword [esp + 0x10], eax
jl 0x4053a0
lea ecx, [ecx]
call ebx
mov dword [eax], 0
add ebp, edi
cmp dword [esi + 4], 0
jne 0x405329
mov ecx, dword [esp + 0x18]
mov edx, dword [esi + 8]
sub ecx, edi
push ecx
push ebp
push edx
call dword [sym.imp.MSVCR90.dll__read]
add esp, 0xc
mov ebp, eax
jmp 0x405355
mov eax, dword [esp + 0x18]
mov ecx, dword [esi + 8]
push 0
sub eax, edi
push eax
push ebp
push ecx
call dword [sym.imp.WS2_32.dll_recv]
mov ebp, eax
test ebp, ebp
jg 0x405359
call ebx
mov dword [esp + 0x14], eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [esp + 0x14]
mov dword [edx], eax
test ebp, ebp
jle 0x40535d
add edi, ebp
jmp 0x405374
jne 0x405366
call ebx
cmp dword [eax], 0
je 0x405387
call ebx
cmp dword [eax], 0
je 0x405374
call ebx
cmp dword [eax], 4
jne 0x405392
cmp edi, dword [esp + 0x18]
je 0x405427
mov ebp, dword [esp + 0x20]
jmp 0x405300
mov eax, edi
mov dword [esp + 0x10], eax
jmp 0x40542f
mov dword [esp + 0x10], ebp
jmp 0x40542b
call ebx
mov dword [eax], 0
add ebp, edi
cmp dword [esi + 4], 0
jne 0x4053c9
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 8]
sub eax, edi
push eax
push ebp
push ecx
call dword [sym.imp.MSVCR90.dll__read]
add esp, 0xc
mov ebp, eax
jmp 0x4053f5
mov edx, dword [esp + 0x10]
mov eax, dword [esi + 8]
push 0
sub edx, edi
push edx
push ebp
push eax
call dword [sym.imp.WS2_32.dll_recv]
mov ebp, eax
test ebp, ebp
jg 0x4053f9
call ebx
mov dword [esp + 0x14], eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esp + 0x14]
mov dword [ecx], eax
test ebp, ebp
jle 0x4053fd
add edi, ebp
jmp 0x405418
jne 0x405406
call ebx
cmp dword [eax], 0
je 0x405427
call ebx
cmp dword [eax], 0
je 0x405418
call ebx
cmp dword [eax], 4
jne 0x405392
cmp edi, dword [esp + 0x10]
je 0x405427
mov ebp, dword [esp + 0x20]
jmp 0x4053a0
mov dword [esp + 0x10], edi
mov eax, dword [esp + 0x10]
test eax, eax
jl 0x40551e
jle 0x4054f6
sub dword [esi + 0x18], eax
mov ecx, dword [esi + 0x18]
sub dword [esp + 0x18], eax
add dword [esp + 0x1c], eax
add dword [esp + 0x20], eax
test ecx, ecx
jne 0x4054f6
mov ebp, dword [esi + 0x1c]
mov dword [esp + 0x14], ebp
test ebp, ebp
je 0x4054eb
xor edi, edi
call ebx
mov dword [eax], 0
sub ebp, edi
cmp dword [esi + 4], 0
jne 0x40548f
mov eax, dword [esi + 8]
push ebp
lea edx, [esp + edi + 0x34]
push edx
push eax
call dword [sym.imp.MSVCR90.dll__read]
add esp, 0xc
mov ebp, eax
jmp 0x4054b9
mov edx, dword [esi + 8]
push 0
push ebp
lea ecx, [esp + edi + 0x38]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_recv]
mov ebp, eax
test ebp, ebp
jg 0x4054bd
call ebx
mov dword [esp + 0x2c], eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esp + 0x2c]
mov dword [ecx], eax
test ebp, ebp
jle 0x4054c1
add edi, ebp
jmp 0x4054d8
jne 0x4054ca
call ebx
cmp dword [eax], 0
je 0x4054e6
call ebx
cmp dword [eax], 0
je 0x4054d8
call ebx
cmp dword [eax], 4
jne 0x4054e4
cmp edi, dword [esp + 0x14]
je 0x4054e6
mov ebp, dword [esp + 0x14]
jmp 0x405468
mov edi, ebp
cmp edi, dword [esi + 0x1c]
jne 0x405527
cmp dword [esp + 0x18], 0
jg 0x405220
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x130]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00406814
add esp, 0x124
ret
mov dword [esi + 0x10], 0
xor eax, eax
jmp 0x4054fa
mov dword [esi + 0x10], 0
jmp 0x4054fa
mov eax, dword [esp + 0x10]
mov dword [esi + 0x10], 0
jmp 0x4054fa