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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc8
mov eax, dword [0x63f070]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0xa4], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0xb0], esi
mov dword [ebp - 0xbc], eax
mov dword [ebp - 0xb8], ebx
mov dword [ebp - 0xb4], ebx
mov byte [ebp - 0x95], bl
push edi
lea edi, [ebp - 0x68]
mov dword [ebp - 0xac], edi
test esi, esi
je 0x503947
cmp dword [esi], 0xbab1e
jne 0x503947
cmp byte [esi + 0xfb], bl
je 0x50324e
pop edi
pop esi
lea eax, [ebx + 8]
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a6edb
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0x14], ebx
jge 0x503269
pop edi
pop esi
mov eax, 0xa
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a6edb
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 4]
mov dword [ebp - 0x9c], eax
test eax, eax
je 0x5032e7
lea ecx, [ebp - 0x18]
push ecx
push eax
call fcn.00501cd0
add esp, 8
mov edi, eax
xor edx, edx
mov eax, 1
nop dword [eax]
or esi, 0xffffffff
test edi, eax
je 0x5032a3
mov ecx, dword [ebp + edx*4 - 0x18]
cmp ecx, 0xffffffff
jae 0x5032a3
inc ebx
mov esi, ecx
mov ecx, eax
rol ecx, 0x10
test edi, ecx
je 0x5032b8
mov ecx, dword [ebp + edx*4 - 0x18]
cmp ecx, 0xffffffff
jae 0x5032b8
inc ebx
mov esi, ecx
cmp esi, 0xffffffff
je 0x5032c5
inc edx
rol eax, 1
cmp edx, 5
jb 0x503290
mov eax, dword [ebp - 0x9c]
mov dword [ebp - 0xb8], ebx
mov eax, dword [eax + 4]
mov dword [ebp - 0x9c], eax
test eax, eax
jne 0x503276
mov esi, dword [ebp - 0xb0]
lea edi, [ebp - 0x68]
lea eax, [ebp - 0x9c]
push eax
push esi
call fcn.005030c0
mov eax, dword [ebp - 0x9c]
add esp, 8
test eax, eax
js 0x50330c
mov ecx, dword [ebp + 0x14]
cmp eax, ecx
cmovl ecx, eax
mov dword [ebp + 0x14], ecx
mov eax, dword [ebp + 0x10]
add eax, ebx
cmp byte [ebp + 0x20], 0
lea ecx, [eax + 1]
cmove ecx, eax
cmp ecx, 0xa
jbe 0x503358
lea eax, [ecx*8]
push eax
call dword [0x63f144]
mov edi, eax
add esp, 4
mov dword [ebp - 0xac], edi
test edi, edi
jne 0x503351
lea eax, [edi + 3]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a6edb
mov esp, ebp
pop ebp
ret
mov byte [ebp - 0x95], 1
xor edx, edx
mov dword [ebp - 0xa8], edx
test ebx, ebx
je 0x5034b1
mov eax, dword [esi + 4]
mov dword [ebp - 0xa0], eax
test eax, eax
je 0x5034b1
nop dword [eax]
lea ecx, [ebp - 0x18]
push ecx
push eax
call fcn.00501cd0
add esp, 8
mov dword [ebp - 0x9c], eax
xor edi, edi
mov edx, 1
mov ecx, edi
shl edx, cl
or esi, 0xffffffff
xor ebx, ebx
test eax, edx
mov edx, dword [ebp - 0xa8]
je 0x5033d7
mov eax, dword [ebp + edi*4 - 0x18]
cmp eax, 0xffffffff
jae 0x5033d7
mov esi, eax
mov ecx, 0x300
mov eax, dword [ebp - 0xac]
mov ebx, 0x29
mov dword [eax + edx*8], esi
mov word [eax + edx*8 + 4], cx
inc edx
mov dword [ebp - 0xa8], edx
lea ecx, [edi + 0x10]
mov eax, 1
shl eax, cl
test dword [ebp - 0x9c], eax
je 0x503457
mov eax, dword [ebp + edi*4 - 0x18]
cmp eax, 0xffffffff
jae 0x503457
mov esi, eax
mov dword [ebp - 0xc0], 4
lea eax, [ebp - 0xc0]
or ebx, 0x32
push eax
lea eax, [ebp - 0xc4]
push eax
push 0x1008
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x503437
cmp dword [ebp - 0xc4], 1
jne 0x503437
push eax
push eax
push eax
push esi
call dword [sym.imp.WS2_32.dll_send]
mov edx, dword [ebp - 0xa8]
mov ecx, 0x10
mov eax, dword [ebp - 0xac]
mov dword [eax + edx*8], esi
mov word [eax + edx*8 + 4], cx
inc edx
mov dword [ebp - 0xa8], edx
cmp esi, 0xffffffff
je 0x50348e
mov eax, dword [ebp - 0xb0]
push ebx
push dword [eax + 0xf4]
push esi
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
jne 0x5036c7
mov eax, dword [ebp - 0x9c]
inc edi
cmp edi, 5
jb 0x503395
mov edx, dword [ebp - 0xa8]
mov eax, dword [ebp - 0xa0]
mov eax, dword [eax + 4]
mov dword [ebp - 0xa0], eax
test eax, eax
jne 0x503380
mov ebx, dword [ebp - 0xb8]
mov edi, dword [ebp - 0xac]
cmp dword [ebp + 0x10], 0
mov dword [ebp - 0xa0], 0
jbe 0x5035c3
lea esi, [edi + 4]
mov edi, dword [ebp - 0xa4]
lea esi, [esi + edx*8]
add edi, 4
movzx ecx, word [edi]
xor eax, eax
test cl, 1
mov edx, 0x29
cmovne eax, edx
test cl, 2
je 0x5034ec
or eax, 4
test cl, 4
je 0x50354e
lea ecx, [ebp - 0xc4]
mov dword [ebp - 0xc4], 4
push ecx
lea ecx, [ebp - 0xc0]
or eax, 0x32
push ecx
push 0x1008
mov dword [ebp - 0x9c], eax
mov eax, dword [edi - 4]
push 0xffff
push eax
mov dword [ebp - 0xc8], eax
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x503548
cmp dword [ebp - 0xc0], 1
jne 0x503548
push eax
push eax
push eax
push dword [ebp - 0xc8]
call dword [sym.imp.WS2_32.dll_send]
mov eax, dword [ebp - 0x9c]
push eax
mov eax, dword [ebp - 0xb0]
push dword [eax + 0xf4]
push dword [edi - 4]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
jne 0x5036c7
mov eax, dword [edi - 4]
mov dword [esi - 4], eax
xor eax, eax
mov word [esi], ax
test byte [edi], 1
je 0x503584
mov eax, 0x300
mov word [esi], ax
test byte [edi], 2
je 0x503591
mov eax, 0x400
or word [esi], ax
test byte [edi], 4
je 0x50359a
or word [esi], 0x10
mov eax, dword [ebp - 0xa0]
add esi, 8
mov edx, dword [ebp - 0xa8]
inc eax
inc edx
mov dword [ebp - 0xa0], eax
add edi, 8
mov dword [ebp - 0xa8], edx
cmp eax, dword [ebp + 0x10]
jb 0x5034d4
test edx, edx
jne 0x5036f5
cmp byte [ebp + 0x20], dl
je 0x50389b
mov dword [ebp - 0x9c], edx
mov eax, dword [ebp - 0xb0]
push 0
push dword [ebp + 0x14]
add eax, 0xf4
push 0
push eax
push 1
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
cmp dword [ebp + 0x10], 0
jbe 0x5037cd
mov eax, dword [ebp - 0xac]
mov edi, dword [ebp - 0xa4]
add edi, 6
lea eax, [eax + ebx*8]
add eax, 6
mov dword [ebp - 0xa4], eax
nop word [eax + eax]
movsx ebx, word [eax]
lea ecx, [ebp - 0x94]
mov eax, dword [edi - 6]
xor esi, esi
push ecx
push esi
push eax
mov dword [ebp - 0xa0], ebx
mov dword [ebp - 0xc8], eax
mov dword [ebp - 0x94], esi
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
jne 0x503741
mov ecx, dword [ebp - 0x94]
mov eax, esi
test cl, 0x29
mov ebx, ecx
setne al
movzx edx, ax
mov eax, edx
or eax, 4
and bl, 0x32
mov ebx, dword [ebp - 0x94]
movzx ecx, ax
mov eax, edx
cmove ecx, eax
movzx edx, cx
mov eax, edx
or eax, 2
and bl, 4
movzx ecx, ax
mov eax, edx
cmove ecx, eax
cmp dword [ebp - 0xbc], 0
movzx eax, cx
mov esi, eax
je 0x50373b
cmp dword [ebp - 0x9c], 0
jne 0x50373b
cmp dword [ebp - 0x94], 0
mov ebx, dword [ebp - 0xa0]
je 0x503741
inc dword [ebp - 0xb4]
jmp 0x503741
cmp byte [ebp - 0x95], 0
je 0x5036df
push dword [ebp - 0xac]
call dword [0x63f148]
add esp, 4
pop edi
pop esi
mov eax, 4
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a6edb
mov esp, ebp
pop ebp
ret
push 0
push 0
push edx
push dword [ebp - 0xac]
call fcn.00520e80
mov esi, eax
add esp, 0x10
mov dword [ebp - 0x9c], esi
test esi, esi
jns 0x50372a
pop edi
pop esi
mov eax, 0xc
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a6edb
mov esp, ebp
pop ebp
ret
jle 0x5035da
mov dword [ebp - 0xb4], esi
jmp 0x5035f5
mov ebx, dword [ebp - 0xa0]
mov eax, dword [ebp - 0xb0]
push 0
push dword [eax + 0xf4]
push dword [ebp - 0xc8]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp dword [ebp - 0x9c], 0
jne 0x503769
mov word [edi], si
jmp 0x5037b1
mov eax, esi
mov edx, ebx
or eax, 1
and edx, 0x300
movzx ecx, ax
movzx eax, si
mov esi, dword [ebp - 0xa0]
cmove ecx, eax
movzx edx, cx
mov eax, edx
or eax, 4
and bl, 0x10
movzx ecx, ax
mov eax, edx
cmove ecx, eax
movzx edx, cx
mov eax, edx
or eax, 2
and esi, 0x400
movzx ecx, ax
mov eax, edx
cmove ecx, eax
mov word [edi], cx
mov eax, dword [ebp - 0xa4]
add edi, 8
add eax, 8
sub dword [ebp + 0x10], 1
mov dword [ebp - 0xa4], eax
jne 0x503620
cmp dword [ebp - 0xb8], 0
je 0x503889
mov eax, dword [ebp - 0xb0]
mov eax, dword [eax + 4]
mov dword [ebp - 0xa4], eax
test eax, eax
je 0x503889
lea ecx, [ebp - 0x18]
push ecx
push eax
call fcn.00501cd0
add esp, 8
mov ebx, eax
xor esi, esi
mov edi, 1
lea ecx, [esi + 0x10]
mov edx, edi
bts edx, ecx
test ebx, edx
je 0x503872
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 0x503852
cmp dword [ebp - 0xbc], eax
je 0x503852
cmp dword [ebp - 0x9c], eax
jne 0x503852
cmp dword [ebp - 0x94], eax
je 0x503852
inc dword [ebp - 0xb4]
mov eax, dword [ebp - 0xb0]
push 0
push dword [eax + 0xf4]
push dword [ebp + esi*4 - 0x18]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
inc esi
rol edi, 1
cmp esi, 5
jb 0x503807
mov eax, dword [ebp - 0xa4]
mov eax, dword [eax + 4]
mov dword [ebp - 0xa4], eax
test eax, eax
jne 0x5037f1
mov eax, dword [ebp - 0xb0]
push dword [eax + 0xf4]
call dword [sym.imp.WS2_32.dll_WSAResetEvent]
cmp byte [ebp - 0x95], 0
je 0x5038b3
push dword [ebp - 0xac]
call dword [0x63f148]
add esp, 4
mov ecx, dword [ebp - 0xbc]
test ecx, ecx
je 0x5038c5
mov eax, dword [ebp - 0xb4]
mov dword [ecx], eax
cmp byte [ebp + 0x1c], 0
je 0x503934
cmp dword [ebp - 0xa8], 0
jne 0x503934
cmp byte [ebp + 0x20], 0
jne 0x503934
mov eax, dword [ebp - 0xb0]
mov dword [ebp - 0xa4], 0
cmp dword [eax], 0xbab1e
jne 0x503934
cmp byte [eax + 0xfb], 0
jne 0x503934
lea ecx, [ebp - 0xa4]
push ecx
push eax
call fcn.005030c0
add esp, 8
test eax, eax
jne 0x503934
mov eax, dword [ebp - 0xa4]
test eax, eax
je 0x503934
mov ecx, dword [ebp + 0x14]
cmp eax, ecx
jg 0x503927
test eax, eax
cmovs eax, ecx
mov ecx, eax
mov eax, ecx
cdq
push edx
push eax
call fcn.005212b0
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a6edb
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a6edb
mov esp, ebp
pop ebp
ret