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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0xc4
mov eax, dword [0x7c3824]
xor eax, esp
mov dword [esp + 0xc0], eax
mov ebx, 1
test ecx, ecx
je 0x5205e7
cmp dword [ecx], 0xbab1e
jne 0x5205e7
mov ebx, 8
cmp byte [ecx + 0xe2], 0
je 0x520602
mov ecx, dword [esp + 0xc0]
xor ecx, esp
call fcn.005db451
mov eax, ebx
add esp, 0xc4
pop esi
pop edi
pop ebx
pop ebp
ret
cmp dword [esp + 0xdc], 0
js 0x5207af
mov dword [esp + 0x14], ecx
mov ebp, dword [ecx + 4]
test ebp, ebp
mov dword [esp + 8], edx
je 0x5207b9
xor esi, esi
jmp 0x52063b
mov ebp, dword [ebp + 4]
test ebp, ebp
je 0x5207bb
mov edi, esi
mov ecx, ebp
lea edx, [esp + 0xac]
call fcn.00520540
mov ecx, eax
and ecx, 1
mov edx, dword [esp + 0xac]
cmp edx, 0xffffffff
setne bl
and bl, cl
movzx esi, bl
add esi, edi
cmp ecx, 1
mov ecx, 0
sbb ecx, ecx
or ecx, edx
test eax, 0x10000
je 0x52068b
mov edx, dword [esp + 0xac]
xor ebx, ebx
cmp edx, 0xffffffff
setne bl
cmovne ecx, edx
add esi, ebx
cmp ecx, 0xffffffff
je 0x520630
mov ecx, eax
and ecx, 2
mov edx, ecx
shr edx, 1
mov edi, dword [esp + 0xb0]
cmp edi, 0xffffffff
setne bl
and bl, dl
movzx edx, bl
add esi, edx
cmp ecx, 1
mov ecx, 0
sbb ecx, ecx
or ecx, edi
test eax, 0x20000
je 0x5206d4
mov edx, dword [esp + 0xb0]
xor ebx, ebx
cmp edx, 0xffffffff
setne bl
cmovne ecx, edx
add esi, ebx
cmp ecx, 0xffffffff
je 0x520630
mov ecx, eax
and ecx, 4
mov edx, ecx
shr edx, 2
mov edi, dword [esp + 0xb4]
cmp edi, 0xffffffff
setne bl
and bl, dl
movzx edx, bl
add esi, edx
cmp ecx, 1
mov ecx, 0
sbb ecx, ecx
or ecx, edi
test eax, 0x40000
je 0x520722
mov edx, dword [esp + 0xb4]
xor ebx, ebx
cmp edx, 0xffffffff
setne bl
cmovne ecx, edx
add esi, ebx
cmp ecx, 0xffffffff
je 0x520630
mov ecx, eax
and ecx, 8
mov edx, ecx
shr edx, 3
mov edi, dword [esp + 0xb8]
cmp edi, 0xffffffff
setne bl
and bl, dl
movzx edx, bl
add esi, edx
cmp ecx, 1
mov ecx, 0
sbb ecx, ecx
or ecx, edi
test eax, 0x80000
je 0x520770
mov edx, dword [esp + 0xb8]
xor ebx, ebx
cmp edx, 0xffffffff
setne bl
cmovne ecx, edx
add esi, ebx
cmp ecx, 0xffffffff
je 0x520630
mov ecx, eax
shr cl, 4
cmp dword [esp + 0xbc], 0xffffffff
setne dl
and dl, cl
movzx ecx, dl
add esi, ecx
test eax, 0x100000
je 0x520630
xor eax, eax
cmp dword [esp + 0xbc], 0xffffffff
setne al
add esi, eax
jmp 0x520630
mov ebx, 0xa
jmp 0x5205e7
xor esi, esi
lea edx, [esp + 0x2c]
mov ebp, dword [esp + 0x14]
mov ecx, ebp
call fcn.005225b0
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0xdc]
cmp eax, edx
mov ecx, edx
cmovl ecx, eax
test eax, eax
cmovs ecx, edx
mov dword [esp + 0x24], ecx
movzx eax, byte [esp + 0xe8]
add eax, dword [esp + 0xd8]
add eax, esi
cmp eax, 0xb
mov dword [esp + 0x1c], eax
jb 0x520822
lea eax, [eax*8]
push eax
call dword [0x7c387c]
add esp, 4
mov dword [esp + 0xc], eax
test eax, eax
je 0x520a52
mov eax, dword [esp + 0x1c]
jmp 0x52082a
lea ecx, [esp + 0x5c]
mov dword [esp + 0xc], ecx
xor edi, edi
test esi, esi
je 0x520967
mov ecx, dword [ebp + 4]
test ecx, ecx
je 0x520967
cmp eax, 0xb
setb byte [esp]
xor edi, edi
lea edx, [esp + 0xac]
mov dword [esp + 0x10], edi
mov dword [esp + 0x20], ecx
call fcn.00520540
mov dword [esp + 4], eax
xor ebx, ebx
nop word cs:[eax + eax]
nop dword [eax]
xor edi, edi
mov eax, dword [esp + 4]
bt eax, ebx
jae 0x5208b0
mov eax, dword [esp + ebx*4 + 0xac]
cmp eax, 0xffffffff
je 0x5208b0
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
mov dword [ecx + edx*8], eax
mov word [ecx + edx*8 + 4], 0x300
add edx, 1
mov dword [esp + 0x10], edx
mov edi, 0x29
jmp 0x5208b5
mov eax, 0xffffffff
mov edx, dword [esp + 4]
mov ecx, ebx
shr edx, cl
test edx, 0x10000
je 0x520910
mov ebp, dword [esp + ebx*4 + 0xac]
cmp ebp, 0xffffffff
je 0x520910
or edi, 0x32
push 0
push 0
push 0
push ebp
call dword [sym.imp.WSOCK32.dll_send]
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov dword [eax + ecx*8], ebp
mov word [eax + ecx*8 + 4], 0x10
add ecx, 1
mov dword [esp + 0x10], ecx
mov eax, ebp
mov ebp, dword [esp + 0x14]
jmp 0x520919
cmp eax, 0xffffffff
mov ebp, dword [esp + 0x14]
je 0x520949
push edi
push dword [ebp + 0xdc]
push eax
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
sete cl
or cl, byte [esp]
je 0x520a5c
test eax, eax
jne 0x520a95
add ebx, 1
cmp ebx, 5
jne 0x520870
mov ecx, dword [esp + 0x20]
mov ecx, dword [ecx + 4]
test ecx, ecx
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x10]
lea edx, [esp + 0xac]
jne 0x52084f
cmp dword [esp + 0xd8], 0
je 0x520aad
mov eax, dword [esp + 0xc]
mov dword [esp + 0x10], edi
lea edi, [eax + edi*8]
add edi, 4
xor ebp, ebp
mov ebx, dword [esp + 8]
mov dword [esp + 4], edi
jmp 0x5209a4
add ebp, 1
cmp dword [esp + 0xd8], ebp
mov ebx, dword [esp + 8]
je 0x520a9f
movzx eax, word [ebx + ebp*8 + 4]
test al, 1
mov ecx, 0x29
mov edx, 0
cmove ecx, edx
mov edx, eax
and edx, 2
lea edi, [ecx + edx*2]
test al, 4
je 0x5209d6
or edi, 0x32
push 0
push 0
push 0
push dword [ebx + ebp*8]
call dword [sym.imp.WSOCK32.dll_send]
push edi
mov eax, dword [esp + 0x18]
push dword [eax + 0xdc]
push dword [ebx + ebp*8]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
jne 0x520a73
lea eax, [ebp*4]
mov ecx, dword [ebx + eax*2]
mov edi, dword [esp + 4]
mov dword [edi + ebp*8 - 4], ecx
mov word [edi + ebp*8], 0
movzx ecx, word [ebx + eax*2 + 4]
and ecx, 1
neg ecx
and ecx, 0x300
mov word [edi + ebp*8], cx
movzx edx, word [ebx + eax*2 + 4]
test dl, 2
je 0x520a3a
movzx ecx, cx
or ecx, 0x400
mov word [edi + eax*2], cx
movzx edx, word [ebx + eax*2 + 4]
test dl, 4
je 0x520990
movzx ecx, cx
or ecx, 0x10
mov word [edi + eax*2], cx
jmp 0x520990
mov ebx, 3
jmp 0x5205e7
push dword [esp + 0xc]
call dword [0x7c3880]
add esp, 4
mov ebx, 4
jmp 0x5205e7
mov ebx, 4
cmp dword [esp + 0x1c], 0xb
jb 0x5205e7
push dword [esp + 0xc]
call dword [0x7c3880]
add esp, 4
jmp 0x5205e7
mov ebx, 4
jmp 0x5205e7
mov edi, dword [esp + 0x10]
add edi, ebp
mov ebp, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0xe0]
test edi, edi
jne 0x520af5
mov dword [esp + 4], 0
cmp byte [esp + 0xe8], 0
jne 0x520af5
cmp eax, 0xb
jb 0x520e73
push dword [esp + 0xc]
mov esi, edi
mov edi, edx
call dword [0x7c3880]
mov edx, edi
mov edi, esi
add esp, 4
test edx, edx
jne 0x520e77
jmp 0x520e7d
test edi, edi
mov dword [esp + 0x10], edi
je 0x520b1f
push 0
push 0
push edi
push dword [esp + 0x18]
call fcn.0058a7c0
add esp, 0x10
test eax, eax
jle 0x520b23
mov dword [esp], 0
mov edx, dword [esp + 8]
jmp 0x520b47
xor edi, edi
jmp 0x520b25
mov edi, eax
lea eax, [ebp + 0xdc]
push 0
push dword [esp + 0x28]
push 0
push eax
push 1
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
mov al, 1
mov dword [esp], eax
mov edx, dword [esp + 8]
mov eax, edi
xor ebx, ebx
test eax, eax
cmovs eax, ebx
cmp dword [esp + 0xd8], 0
mov dword [esp + 4], eax
je 0x520c47
cmp dword [esp + 0xe0], 0
setne al
and al, byte [esp]
mov byte [esp + 0x1b], al
mov eax, dword [esp + 0xc]
lea eax, [eax + esi*8]
add eax, 6
mov dword [esp + 0x20], eax
jmp 0x520ba0
add ebx, 1
cmp dword [esp + 0xd8], ebx
je 0x520c47
mov eax, dword [esp + 0x20]
movzx ebp, word [eax + ebx*8]
mov dword [esp + 0x30], 0
lea eax, [esp + 0x30]
push eax
push 0
push dword [edx + ebx*8]
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
je 0x520bc8
xor edi, edi
jmp 0x520bf4
mov eax, dword [esp + 0x30]
xor ecx, ecx
test al, 0x29
setne cl
lea edx, [ecx + 4]
test al, 0x32
cmove edx, ecx
mov edi, eax
shr edi, 1
and edi, 2
or edi, edx
test eax, eax
setne al
and al, byte [esp + 0x1b]
movzx eax, al
add dword [esp + 4], eax
mov ecx, dword [esp + 8]
push 0
mov eax, dword [esp + 0x18]
push dword [eax + 0xdc]
push dword [ecx + ebx*8]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
mov edx, dword [esp + 8]
cmp byte [esp], 0
jne 0x520b90
xor eax, eax
test ebp, 0x300
setne al
mov ecx, ebp
shr ecx, 2
and ecx, 4
shr ebp, 9
and ebp, 2
or ebp, ecx
or ebp, eax
movzx eax, di
or eax, ebp
mov word [edx + ebx*8 + 6], ax
jmp 0x520b90
test esi, esi
je 0x520e4b
mov ebp, dword [esp + 0x14]
mov edi, dword [ebp + 4]
test edi, edi
je 0x520e4f
cmp dword [esp + 0xe0], 0
setne bl
and bl, byte [esp]
mov esi, dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
mov byte [esp], bl
jmp 0x520c90
mov dword [esp + 4], esi
movzx ebx, byte [esp]
mov esi, dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
mov edi, dword [edi + 4]
test edi, edi
je 0x520e4f
mov ecx, edi
lea edx, [esp + 0xac]
call fcn.00520540
mov dword [esp + 8], eax
test eax, 0x10001
je 0x520c85
mov dword [esp + 0x30], 0
lea eax, [esp + 0x30]
push eax
push 0
push dword [esp + 0xb4]
call esi
test eax, eax
sete al
and al, bl
cmp dword [esp + 0x30], 0
setne cl
and cl, al
movzx eax, cl
mov esi, dword [esp + 4]
add esi, eax
push 0
push dword [ebp + 0xdc]
push dword [esp + 0xb4]
mov ebx, dword [sym.imp.WS2_32.dll_WSAEventSelect]
call ebx
test dword [esp + 8], 0x20002
je 0x520c77
mov dword [esp + 0x30], 0
lea eax, [esp + 0x30]
push eax
push 0
push dword [esp + 0xb8]
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
sete al
and al, byte [esp]
cmp dword [esp + 0x30], 0
setne cl
and cl, al
movzx eax, cl
add esi, eax
push 0
push dword [ebp + 0xdc]
push dword [esp + 0xb8]
call ebx
test dword [esp + 8], 0x40004
lea ebx, [esp + 0x30]
je 0x520c77
mov dword [esp + 0x30], 0
push ebx
push 0
push dword [esp + 0xbc]
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
sete al
and al, byte [esp]
cmp dword [esp + 0x30], 0
setne cl
and cl, al
movzx eax, cl
add esi, eax
push 0
push dword [ebp + 0xdc]
push dword [esp + 0xbc]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
test dword [esp + 8], 0x80008
je 0x520c77
mov dword [esp + 0x30], 0
push ebx
push 0
push dword [esp + 0xc0]
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
sete al
and al, byte [esp]
cmp dword [esp + 0x30], 0
setne cl
and cl, al
movzx eax, cl
add esi, eax
push 0
push dword [ebp + 0xdc]
push dword [esp + 0xc0]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
test dword [esp + 8], 0x100010
je 0x520c77
mov dword [esp + 0x30], 0
push ebx
push 0
push dword [esp + 0xc4]
mov eax, dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
call eax
test eax, eax
sete al
movzx ebx, byte [esp]
and al, bl
cmp dword [esp + 0x30], 0
setne cl
and cl, al
movzx eax, cl
add esi, eax
mov dword [esp + 4], esi
push 0
push dword [ebp + 0xdc]
push dword [esp + 0xc4]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
jmp 0x520c7f
mov ebp, dword [esp + 0x14]
push dword [ebp + 0xdc]
call dword [sym.imp.WS2_32.dll_WSAResetEvent]
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x10]
mov edx, dword [esp + 0xe0]
cmp eax, 0xb
jae 0x520ad3
test edx, edx
je 0x520e7d
mov eax, dword [esp + 4]
mov dword [edx], eax
xor ebx, ebx
test edi, edi
jne 0x5205e7
cmp byte [esp + 0xe4], 0
je 0x5205e7
cmp byte [esp + 0xe8], 0
jne 0x5205e7
mov dword [esp + 0x28], 0
lea eax, [esp + 0x28]
push eax
push ebp
call fcn.00522580
add esp, 8
test eax, eax
jne 0x5205e7
mov eax, dword [esp + 0x28]
test eax, eax
je 0x5205e7
mov ecx, eax
mov edx, dword [esp + 0x24]
cmovs ecx, edx
cmp eax, edx
cmovg ecx, edx
mov eax, ecx
sar eax, 0x1f
push eax
push ecx
call fcn.0058a640
add esp, 8
jmp 0x5205e7