Function at 0x405bc0
Capabilities:
Send data
Send data on socket

Disassembly:
sub esp, 0x10
push ebp
mov ebp, dword [esp + 0x24]
test ebp, ebp
jg 0x405bd3
xor eax, eax
pop ebp
add esp, 0x10
ret
push ebx
mov ebx, dword [esp + 0x20]
push esi
mov esi, dword [esp + 0x20]
mov eax, dword [esi + 0x20]
test eax, eax
je 0x405c52
movzx ecx, byte [eax + 1]
mov dword [esp + 0xc], ecx
cmp ecx, ebx
je 0x405c52
mov ecx, dword [esi + 0x24]
mov edx, dword [esi + 0xc]
sub ecx, eax
sub ecx, 8
mov dword [esp + 0x10], edx
mov edx, ecx
sar edx, 8
mov byte [eax + 4], dl
mov edx, dword [esp + 0x10]
lea ebx, [ecx + 7]
mov byte [eax + 3], dl
sar edx, 8
and ebx, 0xfffffff8
sub ebx, ecx
mov byte [eax + 2], dl
mov dl, byte [esp + 0xc]
mov byte [eax + 5], cl
mov byte [eax + 6], bl
mov byte [eax + 7], 0
mov byte [eax + 1], dl
mov byte [eax], 1
test ebx, ebx
je 0x405c44
push ebx
lea eax, [eax + ecx + 8]
push 0
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
add dword [esi + 0x24], ebx
mov ebx, dword [esp + 0x24]
mov dword [esi + 0x20], 0
mov ecx, dword [esi + 0x24]
mov eax, dword [esi + 0x20]
push edi
mov edi, esi
sub edi, ecx
add edi, 0x2028
test eax, eax
jne 0x405c6e
sub edi, 8
jns 0x405c6e
xor edi, edi
cmp ebp, edi
jge 0x405c9f
test eax, eax
jne 0x405c80
mov dword [esi + 0x20], ecx
mov byte [ecx + 1], bl
add dword [esi + 0x24], 8
mov ecx, dword [esp + 0x2c]
mov edx, dword [esi + 0x24]
push ebp
push ecx
push edx
call sub.MSVCR90.dll_memcpy
add esp, 0xc
add dword [esi + 0x24], ebp
pop edi
pop esi
pop ebx
mov eax, ebp
pop ebp
add esp, 0x10
ret
mov edx, ebp
sub edx, edi
mov dword [esp + 0x14], edx
cmp edx, 0x1ff8
jae 0x405d2c
test eax, eax
jne 0x405cbd
mov dword [esi + 0x20], ecx
mov byte [ecx + 1], bl
add dword [esi + 0x24], 8
mov ebp, dword [esp + 0x2c]
test edi, edi
jle 0x405cd6
mov eax, dword [esi + 0x24]
push edi
push ebp
push eax
call sub.MSVCR90.dll_memcpy
add esp, 0xc
add dword [esi + 0x24], edi
push 0
push esi
call fcn.00405a50
add esp, 8
test eax, eax
je 0x405fff
cmp dword [esp + 0x30], edi
jle 0x406041
mov eax, dword [esi + 0x24]
mov ecx, dword [esp + 0x14]
mov dword [esi + 0x20], eax
mov byte [eax + 1], bl
add dword [esi + 0x24], 8
mov eax, dword [esi + 0x24]
push ecx
lea edx, [edi + ebp]
push edx
push eax
call sub.MSVCR90.dll_memcpy
mov eax, dword [esp + 0x3c]
mov ebp, dword [esp + 0x3c]
add esp, 0xc
sub eax, edi
add dword [esi + 0x24], eax
pop edi
pop esi
pop ebx
mov eax, ebp
pop ebp
add esp, 0x10
ret
xor edi, edi
mov dword [esp + 0x10], edi
test eax, eax
je 0x405d9c
mov edx, dword [esi + 0xc]
mov dword [esp + 0x14], edx
movzx edx, byte [eax + 1]
sub ecx, eax
sub ecx, 8
mov dword [esp + 0x18], edx
mov edx, ecx
sar edx, 8
mov byte [eax + 4], dl
mov edx, dword [esp + 0x14]
lea ebx, [ecx + 7]
mov byte [eax + 3], dl
sar edx, 8
and ebx, 0xfffffff8
sub ebx, ecx
mov byte [eax + 2], dl
mov dl, byte [esp + 0x18]
mov byte [eax + 5], cl
mov byte [eax + 6], bl
mov byte [eax + 7], 0
mov byte [eax + 1], dl
mov byte [eax], 1
test ebx, ebx
je 0x405d8e
push ebx
lea eax, [eax + ecx + 8]
push edi
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
add dword [esi + 0x24], ebx
mov ebx, dword [esp + 0x28]
mov dword [esi + 0x20], 0
cmp ebp, 0xffff
jle 0x405ec1
mov dword [esp + 0x14], ebp
lea esp, [esp]
mov eax, dword [esi + 0x24]
mov dword [esi + 0x20], eax
mov byte [eax + 1], bl
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x20]
add dword [esi + 0x24], 8
mov byte [eax + 3], cl
sar ecx, 8
push 0
mov byte [eax + 5], 0xf8
mov byte [eax + 4], 0xff
mov byte [eax + 6], 0
mov byte [eax + 2], cl
mov byte [eax + 7], 0
mov byte [eax + 1], bl
mov byte [eax], 1
push esi
mov dword [esi + 0x20], 0
call fcn.00405a50
add esp, 8
test eax, eax
je 0x405fff
mov ecx, dword [esp + 0x2c]
lea ebx, [edi + ecx]
mov dword [esp + 0x18], ebx
xor edi, edi
lea esp, [esp]
mov ebp, dword [sym.imp.MSVCR90.dll__errno]
call ebp
mov dword [eax], 0
mov ecx, dword [esi + 8]
mov edx, 0xfff8
sub edx, edi
cmp dword [esi + 4], 0
lea eax, [edi + ebx]
jne 0x405e41
push edx
push eax
push ecx
call dword [sym.imp.MSVCR90.dll__write]
add esp, 0xc
mov ebx, eax
jmp 0x405e65
push 0
push edx
push eax
push ecx
call dword [sym.imp.WS2_32.dll_send]
mov ebx, eax
test ebx, ebx
jg 0x405e69
call ebp
mov ebp, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp], eax
mov ebp, dword [sym.imp.MSVCR90.dll__errno]
test ebx, ebx
jle 0x405e6d
add edi, ebx
jmp 0x405e7b
call ebp
cmp dword [eax], 0
je 0x405e7b
call ebp
cmp dword [eax], 4
jne 0x405e89
cmp edi, 0xfff8
je 0x405e95
mov ebx, dword [esp + 0x18]
jmp 0x405e10
cmp ebx, 0xfff8
jne 0x405ff8
mov eax, dword [esp + 0x14]
add dword [esp + 0x10], 0xfff8
mov ebx, dword [esp + 0x28]
mov edi, dword [esp + 0x10]
sub eax, 0xfff8
cmp eax, 0xffff
mov dword [esp + 0x14], eax
jg 0x405db0
mov ebp, dword [esp + 0x30]
mov eax, ebp
sub eax, edi
add eax, 7
and eax, 0xfffffff8
sub eax, ebp
add eax, edi
mov dword [esp + 0x1c], eax
je 0x405ee2
mov ecx, 8
sub ecx, eax
mov dword [esp + 0x10], ecx
jmp 0x405eee
mov dword [esp + 0x10], 0
mov ecx, dword [esp + 0x10]
mov eax, dword [esi + 0x24]
mov dword [esi + 0x20], eax
mov byte [eax + 1], bl
mov edx, dword [esi + 0xc]
add dword [esi + 0x24], 8
mov eax, dword [esi + 0x20]
mov ebx, ebp
sub ebx, ecx
sub ebx, edi
mov dword [esp + 0x18], edx
mov edx, ebx
sar edx, 8
mov byte [eax + 4], dl
mov edx, dword [esp + 0x18]
lea ecx, [ebx + 7]
mov byte [eax + 3], dl
sar edx, 8
and ecx, 0xfffffff8
sub ecx, ebx
mov byte [eax + 2], dl
mov dl, byte [esp + 0x28]
mov byte [eax + 5], bl
mov byte [eax + 6], cl
mov byte [eax + 7], 0
mov byte [eax + 1], dl
mov byte [eax], 1
test ecx, ecx
je 0x405f50
push ecx
lea eax, [eax + ebx + 8]
push 0
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
push 0
push esi
mov dword [esi + 0x20], 0
call fcn.00405a50
add esp, 8
test eax, eax
je 0x405fff
mov ecx, dword [esp + 0x2c]
lea ebp, [edi + ecx]
mov dword [esp + 0x14], ebp
xor edi, edi
call dword [sym.imp.MSVCR90.dll__errno]
mov dword [eax], 0
mov ecx, dword [esi + 8]
mov edx, ebx
sub edx, edi
cmp dword [esi + 4], 0
lea eax, [edi + ebp]
jne 0x405fa3
push edx
push eax
push ecx
call dword [sym.imp.MSVCR90.dll__write]
add esp, 0xc
mov ebp, eax
jmp 0x405fca
push 0
push edx
push eax
push ecx
call dword [sym.imp.WS2_32.dll_send]
mov ebp, eax
test ebp, ebp
jg 0x405fce
call dword [sym.imp.MSVCR90.dll__errno]
mov dword [esp + 0x18], eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [esp + 0x18]
mov dword [edx], eax
test ebp, ebp
jle 0x405fd2
add edi, ebp
jmp 0x405fe8
call dword [sym.imp.MSVCR90.dll__errno]
cmp dword [eax], 0
je 0x405fe8
call dword [sym.imp.MSVCR90.dll__errno]
cmp dword [eax], 4
jne 0x405ff2
cmp edi, ebx
je 0x40600a
mov ebp, dword [esp + 0x14]
jmp 0x405f77
mov edi, ebp
cmp edi, ebx
je 0x40600a
mov dword [esi + 0x10], 0
pop edi
pop esi
pop ebx
or eax, 0xffffffff
pop ebp
add esp, 0x10
ret
cmp dword [esp + 0x1c], 0
je 0x406041
mov eax, dword [esi + 0x24]
mov cl, byte [esp + 0x28]
mov edi, dword [esp + 0x10]
mov dword [esi + 0x20], eax
mov byte [eax + 1], cl
mov eax, dword [esp + 0x2c]
add dword [esi + 0x24], 8
mov ecx, dword [esi + 0x24]
sub eax, edi
add eax, dword [esp + 0x30]
push edi
push eax
push ecx
call sub.MSVCR90.dll_memcpy
add esp, 0xc
add dword [esi + 0x24], edi
mov ebp, dword [esp + 0x30]
pop edi
pop esi
pop ebx
mov eax, ebp
pop ebp
add esp, 0x10
ret