Function at 0x10020510
Capabilities:
Get socket status
Print debug messages
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x158
mov dword [ebp - 0x158], ecx
mov eax, dword [ebp - 0x158]
cmp dword [eax + 0x1b0], 0
je 0x1002054f
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0x158]
mov eax, dword [edx + 0x1b0]
push eax
mov ecx, dword [ebp - 0x158]
call fcn.1001fda0
jmp 0x10020a39
mov dword [ebp - 0x14], 0
mov ecx, dword [ebp - 0x158]
mov edx, dword [ecx + 0x144]
push edx
call sub.ntdll.dll_strlen
add esp, 4
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], 0
mov edx, dword [ebp - 0x158]
cmp dword [edx + 0x144], 0
jne 0x100205a5
push 0x5ec
push 0x1003e388
push 0x1003e3c8
call dword [sym.imp.MSVCR80.dll__wassert]
add esp, 0xc
mov ecx, dword [ebp - 0x158]
cmp dword [ecx + 0x144], 0
jne 0x100205dd
push 0x19b
lea ecx, [ebp - 0x13c]
call fcn.10007900
mov edx, dword [eax]
mov dword [ebp - 0x138], edx
push 0x10046434
lea eax, [ebp - 0x138]
push eax
call sub.MSVCR80.dll__CxxThrowException
cmp dword [ebp - 8], 0
jle 0x10020988
mov dword [ebp - 0x120], 0
mov dword [ebp - 0x124], 0
jmp 0x1002060c
mov ecx, dword [ebp - 0x124]
add ecx, 1
mov dword [ebp - 0x124], ecx
mov edx, dword [ebp - 0x124]
cmp edx, dword [ebp - 0x120]
jae 0x10020639
mov eax, dword [ebp - 0x124]
mov ecx, dword [ebp - 0x158]
mov edx, dword [ebp + eax*4 - 0x11c]
cmp edx, dword [ecx + 0x14c]
jne 0x10020637
jmp 0x10020639
jmp 0x100205fd
mov eax, dword [ebp - 0x124]
cmp eax, dword [ebp - 0x120]
jne 0x10020678
cmp dword [ebp - 0x120], 0x40
jae 0x10020678
mov ecx, dword [ebp - 0x124]
mov edx, dword [ebp - 0x158]
mov eax, dword [edx + 0x14c]
mov dword [ebp + ecx*4 - 0x11c], eax
mov ecx, dword [ebp - 0x120]
add ecx, 1
mov dword [ebp - 0x120], ecx
xor edx, edx
jne 0x100205f1
lea eax, [ebp - 0x10]
push eax
push 0
lea ecx, [ebp - 0x120]
push ecx
push 0
mov edx, dword [ebp - 0x158]
mov eax, dword [edx + 0x14c]
add eax, 1
push eax
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x10020776
mov dword [ebp - 0x128], 0
jmp 0x100206cd
mov ecx, dword [ebp - 0x128]
add ecx, 1
mov dword [ebp - 0x128], ecx
mov edx, dword [ebp - 0x128]
cmp edx, dword [ebp - 0x120]
jae 0x10020748
mov eax, dword [ebp - 0x128]
mov ecx, dword [ebp - 0x158]
mov edx, dword [ebp + eax*4 - 0x11c]
cmp edx, dword [ecx + 0x14c]
jne 0x10020743
mov eax, dword [ebp - 0x120]
sub eax, 1
cmp dword [ebp - 0x128], eax
jae 0x10020732
mov ecx, dword [ebp - 0x128]
mov edx, dword [ebp - 0x128]
mov eax, dword [ebp + edx*4 - 0x118]
mov dword [ebp + ecx*4 - 0x11c], eax
mov ecx, dword [ebp - 0x128]
add ecx, 1
mov dword [ebp - 0x128], ecx
jmp 0x100206f6
mov edx, dword [ebp - 0x120]
sub edx, 1
mov dword [ebp - 0x120], edx
jmp 0x10020748
jmp 0x100206be
xor eax, eax
jne 0x100206b2
push 0x6d
lea ecx, [ebp - 0x144]
call fcn.10007900
mov ecx, dword [eax]
mov dword [ebp - 0x140], ecx
push 0x10046434
lea edx, [ebp - 0x140]
push edx
call sub.MSVCR80.dll__CxxThrowException
cmp dword [ebp - 4], 0
jne 0x10020847
mov dword [ebp - 0x12c], 0
jmp 0x1002079b
mov eax, dword [ebp - 0x12c]
add eax, 1
mov dword [ebp - 0x12c], eax
mov ecx, dword [ebp - 0x12c]
cmp ecx, dword [ebp - 0x120]
jae 0x10020816
mov edx, dword [ebp - 0x12c]
mov eax, dword [ebp - 0x158]
mov ecx, dword [ebp + edx*4 - 0x11c]
cmp ecx, dword [eax + 0x14c]
jne 0x10020811
mov edx, dword [ebp - 0x120]
sub edx, 1
cmp dword [ebp - 0x12c], edx
jae 0x10020800
mov eax, dword [ebp - 0x12c]
mov ecx, dword [ebp - 0x12c]
mov edx, dword [ebp + ecx*4 - 0x118]
mov dword [ebp + eax*4 - 0x11c], edx
mov eax, dword [ebp - 0x12c]
add eax, 1
mov dword [ebp - 0x12c], eax
jmp 0x100207c4
mov ecx, dword [ebp - 0x120]
sub ecx, 1
mov dword [ebp - 0x120], ecx
jmp 0x10020816
jmp 0x1002078c
xor edx, edx
jne 0x10020780
push 0x192
lea ecx, [ebp - 0x14c]
call fcn.10007900
mov eax, dword [eax]
mov dword [ebp - 0x148], eax
push 0x10046434
lea ecx, [ebp - 0x148]
push ecx
call sub.MSVCR80.dll__CxxThrowException
cmp dword [ebp - 4], 0
je 0x10020983
lea edx, [ebp - 0x120]
push edx
mov eax, dword [ebp - 0x158]
mov ecx, dword [eax + 0x14c]
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x10020983
push 0
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0x158]
mov ecx, dword [eax + 0x144]
add ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x158]
mov eax, dword [edx + 0x14c]
push eax
call sub.WS2_32.dll_send
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
je 0x100208ad
cmp dword [ebp - 4], 0
jne 0x10020971
mov dword [ebp - 0x130], 0
jmp 0x100208c8
mov ecx, dword [ebp - 0x130]
add ecx, 1
mov dword [ebp - 0x130], ecx
mov edx, dword [ebp - 0x130]
cmp edx, dword [ebp - 0x120]
jae 0x10020943
mov eax, dword [ebp - 0x130]
mov ecx, dword [ebp - 0x158]
mov edx, dword [ebp + eax*4 - 0x11c]
cmp edx, dword [ecx + 0x14c]
jne 0x1002093e
mov eax, dword [ebp - 0x120]
sub eax, 1
cmp dword [ebp - 0x130], eax
jae 0x1002092d
mov ecx, dword [ebp - 0x130]
mov edx, dword [ebp - 0x130]
mov eax, dword [ebp + edx*4 - 0x118]
mov dword [ebp + ecx*4 - 0x11c], eax
mov ecx, dword [ebp - 0x130]
add ecx, 1
mov dword [ebp - 0x130], ecx
jmp 0x100208f1
mov edx, dword [ebp - 0x120]
sub edx, 1
mov dword [ebp - 0x120], edx
jmp 0x10020943
jmp 0x100208b9
xor eax, eax
jne 0x100208ad
push 0x66
lea ecx, [ebp - 0x154]
call fcn.10007900
mov ecx, dword [eax]
mov dword [ebp - 0x150], ecx
push 0x10046434
lea edx, [ebp - 0x150]
push edx
call sub.MSVCR80.dll__CxxThrowException
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 4]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0x14]
add ecx, dword [ebp - 4]
mov dword [ebp - 0x14], ecx
jmp 0x100205dd
mov edx, dword [ebp - 0x158]
mov eax, dword [edx + 0x144]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov dword [ebp - 0x134], 0
jmp 0x100209b6
mov ecx, dword [ebp - 0x134]
add ecx, 1
mov dword [ebp - 0x134], ecx
mov edx, dword [ebp - 0x134]
cmp edx, dword [ebp - 0x120]
jae 0x10020a31
mov eax, dword [ebp - 0x134]
mov ecx, dword [ebp - 0x158]
mov edx, dword [ebp + eax*4 - 0x11c]
cmp edx, dword [ecx + 0x14c]
jne 0x10020a2c
mov eax, dword [ebp - 0x120]
sub eax, 1
cmp dword [ebp - 0x134], eax
jae 0x10020a1b
mov ecx, dword [ebp - 0x134]
mov edx, dword [ebp - 0x134]
mov eax, dword [ebp + edx*4 - 0x118]
mov dword [ebp + ecx*4 - 0x11c], eax
mov ecx, dword [ebp - 0x134]
add ecx, 1
mov dword [ebp - 0x134], ecx
jmp 0x100209df
mov edx, dword [ebp - 0x120]
sub edx, 1
mov dword [ebp - 0x120], edx
jmp 0x10020a31
jmp 0x100209a7
xor eax, eax
jne 0x1002099b
mov esp, ebp
pop ebp
ret 4