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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc0
mov eax, dword [0x100dcdc0]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push esi
push edi
xor edi, edi
mov dword [ebp - 0xb8], ecx
mov ecx, dword [ebp + 0x18]
lea esi, [ebp - 0x68]
mov dword [ebp - 0xa8], eax
mov dword [ebp - 0xc0], ecx
mov dword [ebp - 0xbc], edi
mov dword [ebp - 0xac], edi
mov dword [ebp - 0xb4], esi
mov byte [ebp - 0x95], 0
test eax, eax
je 0x10040a4a
cmp dword [eax], 0xbab1e
jne 0x10040a4a
cmp byte [eax + 0xe2], 0
je 0x1004034e
lea eax, [edi + 8]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c563
mov esp, ebp
pop ebp
ret
push ebx
mov ebx, dword [ebp + 0x14]
test ebx, ebx
jns 0x1004036c
pop ebx
pop edi
mov eax, 0xa
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c563
mov esp, ebp
pop ebp
ret
mov eax, dword [eax + 4]
mov dword [ebp - 0xa0], eax
test eax, eax
je 0x100403e8
nop dword [eax]
lea ecx, [ebp - 0x18]
push ecx
push eax
call fcn.1003eae0
add esp, 8
mov ebx, eax
xor edx, edx
mov eax, 1
or esi, 0xffffffff
test ebx, eax
je 0x100403a9
mov ecx, dword [ebp + edx*4 - 0x18]
cmp ecx, 0xffffffff
jae 0x100403a9
inc edi
mov esi, ecx
mov ecx, eax
rol ecx, 0x10
test ebx, ecx
je 0x100403bc
cmp dword [ebp + edx*4 - 0x18], 0xffffffff
jae 0x100403bc
inc edi
jmp 0x100403c1
cmp esi, 0xffffffff
je 0x100403c9
inc edx
rol eax, 1
cmp edx, 5
jb 0x10040396
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0xbc], edi
mov eax, dword [eax + 4]
mov dword [ebp - 0xa0], eax
test eax, eax
jne 0x10040380
mov ebx, dword [ebp + 0x14]
lea esi, [ebp - 0x68]
lea eax, [ebp - 0xa4]
push eax
push dword [ebp - 0xa8]
call fcn.100401d0
mov eax, dword [ebp - 0xa4]
add esp, 8
test eax, eax
js 0x1004040f
cmp eax, ebx
cmovl ebx, eax
mov dword [ebp + 0x14], ebx
mov eax, dword [ebp + 0x10]
add eax, edi
cmp byte [ebp + 0x20], 0
lea ecx, [eax + 1]
cmove ecx, eax
cmp ecx, 0xa
jbe 0x1004045b
lea eax, [ecx*8]
push eax
call dword [0x100dcd74]
mov esi, eax
add esp, 4
mov dword [ebp - 0xb4], esi
test esi, esi
jne 0x10040454
pop ebx
pop edi
lea eax, [esi + 3]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c563
mov esp, ebp
pop ebp
ret
mov byte [ebp - 0x95], 1
xor ebx, ebx
mov dword [ebp - 0x9c], ebx
test edi, edi
je 0x1004058d
mov eax, dword [ebp - 0xa8]
mov eax, dword [eax + 4]
mov dword [ebp - 0xb0], eax
test eax, eax
je 0x1004058d
lea ecx, [ebp - 0x18]
push ecx
push eax
call fcn.1003eae0
mov edx, eax
add esp, 8
mov dword [ebp - 0xa0], edx
xor esi, esi
nop dword [eax]
mov eax, 1
mov ecx, esi
shl eax, cl
or edi, 0xffffffff
xor ebx, ebx
test edx, eax
je 0x100404e8
mov eax, dword [ebp + esi*4 - 0x18]
cmp eax, 0xffffffff
jae 0x100404e8
mov ecx, dword [ebp - 0xb4]
mov edi, eax
mov eax, dword [ebp - 0x9c]
mov edx, 0x300
mov ebx, 0x29
mov word [ecx + eax*8 + 4], dx
mov edx, dword [ebp - 0xa0]
mov dword [ecx + eax*8], edi
inc eax
mov dword [ebp - 0x9c], eax
lea ecx, [esi + 0x10]
mov eax, 1
shl eax, cl
test edx, eax
je 0x10040533
mov eax, dword [ebp + esi*4 - 0x18]
cmp eax, 0xffffffff
jae 0x10040533
push 0
push 0
mov edi, eax
or ebx, 0x32
push 0
push edi
call dword [sym.imp.WS2_32.dll_send]
mov eax, dword [ebp - 0x9c]
mov edx, 0x10
mov ecx, dword [ebp - 0xb4]
mov dword [ecx + eax*8], edi
mov word [ecx + eax*8 + 4], dx
inc eax
mov dword [ebp - 0x9c], eax
jmp 0x10040538
cmp edi, 0xffffffff
je 0x10040564
mov eax, dword [ebp - 0xa8]
push ebx
push dword [eax + 0xdc]
push edi
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
jne 0x100406c6
mov edx, dword [ebp - 0xa0]
inc esi
cmp esi, 5
jb 0x100404a0
mov eax, dword [ebp - 0xb0]
mov eax, dword [eax + 4]
mov dword [ebp - 0xb0], eax
test eax, eax
jne 0x10040482
mov edi, dword [ebp - 0xbc]
mov ebx, dword [ebp - 0x9c]
mov esi, dword [ebp - 0xb4]
cmp dword [ebp + 0x10], 0
mov dword [ebp - 0xa4], 0
jbe 0x100406a9
mov ecx, dword [ebp - 0xb8]
lea esi, [esi + ebx*8]
add esi, 4
add ecx, 4
mov dword [ebp - 0xa0], ecx
movzx edx, word [ecx]
mov al, dl
and al, 1
movzx ecx, al
neg ecx
sbb ecx, ecx
and ecx, 0x29
mov dword [ebp - 0x9c], ecx
or dword [ebp - 0x9c], 4
test dl, 2
mov eax, dword [ebp - 0x9c]
cmove eax, ecx
mov dword [ebp - 0x9c], eax
mov eax, dword [ebp - 0xa0]
add eax, 0xfffffffc
mov dword [ebp - 0xb0], eax
test dl, 4
je 0x10040617
or dword [ebp - 0x9c], 0x32
push 0
push 0
push 0
push dword [eax]
call dword [sym.imp.WS2_32.dll_send]
mov eax, dword [ebp - 0xb0]
jmp 0x1004061d
mov dword [ebp - 0xb0], eax
mov ecx, dword [ebp - 0xa8]
push dword [ebp - 0x9c]
push dword [ecx + 0xdc]
push dword [eax]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
jne 0x100406c6
mov eax, dword [ebp - 0xb0]
mov ecx, dword [ebp - 0xa0]
mov eax, dword [eax]
mov dword [esi - 4], eax
xor eax, eax
mov word [esi], ax
test byte [ecx], 1
je 0x10040662
mov eax, 0x300
mov word [esi], ax
test byte [ecx], 2
movzx edx, ax
je 0x10040675
or eax, 0x400
mov word [esi], ax
movzx edx, ax
test byte [ecx], 4
je 0x10040680
or edx, 0x10
mov word [esi], dx
mov eax, dword [ebp - 0xa4]
inc ebx
inc eax
mov dword [ebp - 0x9c], ebx
add ecx, 8
mov dword [ebp - 0xa4], eax
add esi, 8
mov dword [ebp - 0xa0], ecx
cmp eax, dword [ebp + 0x10]
jb 0x100405b6
test ebx, ebx
jne 0x100406f4
cmp byte [ebp + 0x20], bl
je 0x100409ac
xor esi, esi
mov dword [ebp - 0xb0], esi
mov dword [ebp - 0xac], esi
jmp 0x10040719
cmp byte [ebp - 0x95], 0
je 0x100406de
push dword [ebp - 0xb4]
call dword [0x100dcd78]
add esp, 4
pop ebx
pop edi
mov eax, 4
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c563
mov esp, ebp
pop ebp
ret
push 0
push 0
push ebx
push dword [ebp - 0xb4]
call fcn.1005c570
add esp, 0x10
mov dword [ebp - 0xac], eax
mov esi, eax
mov dword [ebp - 0xb0], esi
test eax, eax
jg 0x1004073a
mov eax, dword [ebp - 0xa8]
push 0
push dword [ebp + 0x14]
add eax, 0xdc
push 0
push eax
push 1
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
mov eax, dword [ebp - 0xac]
test esi, esi
jns 0x10040754
pop ebx
pop edi
mov eax, 0xc
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c563
mov esp, ebp
pop ebp
ret
xor ecx, ecx
test esi, esi
cmovle eax, ecx
xor esi, esi
mov dword [ebp - 0xac], eax
cmp dword [ebp + 0x10], ecx
jbe 0x100408cc
mov dword [ebp - 0xac], eax
mov eax, dword [ebp - 0xb4]
lea eax, [eax + edi*8]
mov edi, dword [ebp - 0xb0]
add eax, 6
mov dword [ebp - 0xa4], eax
nop word [eax + eax]
movsx eax, word [eax]
xor ebx, ebx
mov dword [ebp - 0xa0], eax
lea eax, [ebp - 0x94]
push eax
mov eax, dword [ebp - 0xb8]
push ebx
mov dword [ebp - 0x94], ebx
push dword [eax + esi*8]
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
jne 0x10040832
mov ecx, dword [ebp - 0x94]
mov eax, ebx
test cl, 0x29
mov ebx, ecx
setne al
movzx edx, ax
mov eax, edx
or eax, 4
test bl, 0x32
movzx ecx, ax
mov eax, edx
cmove ecx, eax
movzx edx, cx
mov eax, edx
or eax, 2
test bl, 4
movzx ecx, ax
mov eax, edx
cmove ecx, eax
cmp dword [ebp - 0xc0], 0
movzx eax, cx
mov ebx, eax
je 0x10040832
test edi, edi
jg 0x10040832
cmp dword [ebp - 0x94], 0
je 0x10040832
mov ecx, dword [ebp - 0xa8]
mov eax, dword [ebp - 0xb8]
inc dword [ebp - 0xac]
push 0
push dword [ecx + 0xdc]
push dword [eax + esi*8]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
jmp 0x100408a7
mov ecx, dword [ebp - 0xa8]
mov eax, dword [ebp - 0xb8]
push 0
push dword [ecx + 0xdc]
push dword [eax + esi*8]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
test edi, edi
jle 0x100408a7
mov eax, ebx
or eax, 1
test dword [ebp - 0xa0], 0x300
movzx ecx, ax
movzx eax, bx
cmove ecx, eax
movzx edx, cx
mov eax, edx
or eax, 4
test byte [ebp - 0xa0], 0x10
movzx ecx, ax
mov eax, edx
cmove ecx, eax
movzx edx, cx
mov eax, edx
or eax, 2
test dword [ebp - 0xa0], 0x400
movzx ecx, ax
mov eax, edx
cmove ecx, eax
mov eax, dword [ebp - 0xb8]
mov word [eax + esi*8 + 6], cx
mov eax, dword [ebp - 0xa4]
inc esi
add eax, 8
mov dword [ebp - 0xa4], eax
cmp esi, dword [ebp + 0x10]
jb 0x10040790
mov edi, dword [ebp - 0xbc]
mov ebx, dword [ebp - 0x9c]
test edi, edi
je 0x1004099a
mov eax, dword [ebp - 0xa8]
mov eax, dword [eax + 4]
mov dword [ebp - 0xa4], eax
test eax, eax
je 0x1004099a
mov ebx, dword [ebp - 0xb0]
lea ecx, [ebp - 0x18]
push ecx
push eax
call fcn.1003eae0
add esp, 8
mov dword [ebp - 0xa0], eax
xor esi, esi
mov edi, 1
nop dword [eax + eax]
lea ecx, [esi + 0x10]
mov edx, edi
bts edx, ecx
test eax, edx
je 0x1004097d
lea eax, [ebp - 0x94]
mov dword [ebp - 0x94], 0
push eax
push 0
push dword [ebp + esi*4 - 0x18]
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
jne 0x10040957
cmp dword [ebp - 0xc0], eax
je 0x10040957
test ebx, ebx
jg 0x10040957
cmp dword [ebp - 0x94], eax
je 0x10040957
inc dword [ebp - 0xac]
mov ecx, dword [ebp - 0xa8]
push 0
push dword [ecx + 0xdc]
push dword [ebp + esi*4 - 0x18]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
mov eax, dword [ebp - 0xa0]
inc esi
rol edi, 1
cmp esi, 5
jb 0x10040910
mov eax, dword [ebp - 0xa4]
mov eax, dword [eax + 4]
mov dword [ebp - 0xa4], eax
test eax, eax
jne 0x100408f1
mov ebx, dword [ebp - 0x9c]
mov ecx, dword [ebp - 0xa8]
push dword [ecx + 0xdc]
call dword [sym.imp.WS2_32.dll_WSAResetEvent]
cmp byte [ebp - 0x95], 0
je 0x100409c4
push dword [ebp - 0xb4]
call dword [0x100dcd78]
add esp, 4
mov ecx, dword [ebp - 0xc0]
test ecx, ecx
je 0x100409d6
mov eax, dword [ebp - 0xac]
mov dword [ecx], eax
cmp byte [ebp + 0x1c], 0
je 0x10040a37
test ebx, ebx
jne 0x10040a37
cmp byte [ebp + 0x20], bl
jne 0x10040a37
mov eax, dword [ebp - 0xa8]
mov dword [ebp - 0xa4], ebx
cmp dword [eax], 0xbab1e
jne 0x10040a37
cmp byte [eax + 0xe2], bl
jne 0x10040a37
lea ecx, [ebp - 0xa4]
push ecx
push eax
call fcn.100401d0
add esp, 8
test eax, eax
jne 0x10040a37
mov eax, dword [ebp - 0xa4]
test eax, eax
je 0x10040a37
mov ecx, dword [ebp + 0x14]
cmp eax, ecx
jg 0x10040a2a
test eax, eax
jns 0x10040a2c
mov eax, ecx
cdq
push edx
push eax
call fcn.1005ca50
add esp, 8
pop ebx
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c563
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
xor ecx, ebp
pop esi
call fcn.1008c563
mov esp, ebp
pop ebp
ret