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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x880
mov eax, dword [0x62d12c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0x1c]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, ecx
cmp byte [edi + 0x2ac], 0
mov dword [ebp - 0x87c], eax
mov dword [ebp - 0x880], ebx
je 0x520794
mov eax, dword [ebp + 0x10]
cmp eax, dword [edi + 0x16c]
jle 0x52036e
cmp eax, 5
jne 0x520794
push 0x400
lea ecx, [ebp - 0x454]
push 0
push ecx
call fcn.0055aed0
add esp, 0xc
cmp byte [edi + 0x2a9], 0
je 0x52058c
movzx edx, word [esi]
movzx ecx, word [esi + 6]
xor eax, eax
mov dword [ebp - 0x878], eax
mov dword [ebp - 0x874], eax
mov dword [ebp - 0x870], eax
mov dword [ebp - 0x86c], eax
mov dword [ebp - 0x868], eax
mov dword [ebp - 0x864], eax
mov dword [ebp - 0x860], eax
mov dword [ebp - 0x85c], eax
mov dword [ebp - 0x858], eax
movzx eax, word [esi + 2]
sub edx, 0x76c
mov dword [ebp - 0x864], edx
movzx edx, word [esi + 8]
dec eax
mov dword [ebp - 0x868], eax
movzx eax, word [esi + 0xa]
mov dword [ebp - 0x870], edx
lea edx, [ebp - 0x878]
push edx
mov dword [ebp - 0x86c], ecx
movzx ecx, word [esi + 0xc]
push str._b__d__H:_M:_S
mov dword [ebp - 0x874], eax
lea eax, [ebp - 0x54]
push 0x28
push eax
mov dword [ebp - 0x878], ecx
call fcn.00564156
add esp, 0x10
test ebx, ebx
lea ebx, [edi + 0x278]
jne 0x5204dc
cmp dword [ebx + 0x14], 0x10
jb 0x52043b
mov ebx, dword [ebx]
test ebx, ebx
jne 0x520443
xor eax, eax
jmp 0x52046d
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [eax + 1]
cmp esi, 0x3fffffff
jle 0x520459
xor eax, eax
jmp 0x52046d
lea eax, [esi + esi]
call fcn.0055b590
mov eax, esp
push 3
push esi
push ebx
push eax
call fcn.0046e260
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x520479
movzx ecx, cx
jmp 0x520482
mov ecx, dword [ebp + 0x10]
imul ecx, ecx, 0x2710
cmp dword [edi + 0x21c], 8
lea edx, [edi + 0x208]
jb 0x520493
mov edx, dword [edx]
mov esi, dword [ebp - 0x87c]
push esi
push ecx
mov ecx, dword [edi + 0x15c]
push ecx
mov ecx, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 0x10]
push edx
push eax
mov eax, dword [edi + 0x70]
add eax, eax
add eax, eax
lea edx, [ebp - 0x54]
push edx
add eax, eax
add ecx, 2
or eax, ecx
push eax
push str.__d__s__s__s_0x_X__04d:___05lu___s
lea edx, [ebp - 0x454]
push 0x1fd
push edx
call fcn.005613c2
add esp, 0x2c
jmp 0x52065a
cmp dword [ebx + 0x14], 0x10
jb 0x5204e4
mov ebx, dword [ebx]
test ebx, ebx
jne 0x5204ec
xor eax, eax
jmp 0x520516
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [eax + 1]
cmp esi, 0x3fffffff
jle 0x520502
xor eax, eax
jmp 0x520516
lea eax, [esi + esi]
call fcn.0055b590
mov eax, esp
push 3
push esi
push ebx
push eax
call fcn.0046e260
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x520522
movzx ecx, cx
jmp 0x52052b
mov ecx, dword [ebp + 0x10]
imul ecx, ecx, 0x2710
cmp dword [edi + 0x21c], 8
lea edx, [edi + 0x208]
jb 0x52053c
mov edx, dword [edx]
mov esi, dword [ebp - 0x87c]
push esi
mov esi, dword [ebp - 0x880]
push esi
push ecx
mov ecx, dword [edi + 0x15c]
push ecx
mov ecx, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 0x10]
push edx
push eax
mov eax, dword [edi + 0x70]
add eax, eax
add eax, eax
lea edx, [ebp - 0x54]
push edx
add eax, eax
add ecx, 2
or eax, ecx
push eax
push str.__d__s__s__s_0x_X__04d:___05lu___s__s
lea edx, [ebp - 0x454]
push 0x1fd
push edx
call fcn.005613c2
add esp, 0x30
jmp 0x52065a
mov eax, dword [ebp + 0x18]
test ebx, ebx
jne 0x5205f7
test eax, eax
je 0x52059c
movzx eax, ax
jmp 0x5205a5
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x2710
cmp dword [edi + 0x21c], 8
lea ecx, [edi + 0x208]
jb 0x5205b6
mov ecx, dword [ecx]
mov edx, dword [ebp - 0x87c]
push edx
mov edx, dword [ebp + 0xc]
push eax
mov eax, dword [edi + 0x15c]
push eax
mov eax, dword [edi + 0x70]
push edx
push ecx
mov ecx, dword [ebp + 0x10]
add eax, eax
add eax, eax
add eax, eax
add ecx, 2
or eax, ecx
push eax
push str.__d___s_0x_X__04d:___05lu___s
lea edx, [ebp - 0x454]
push 0x1fd
push edx
call fcn.005613c2
add esp, 0x24
jmp 0x52065a
test eax, eax
je 0x520600
movzx eax, ax
jmp 0x520609
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x2710
cmp dword [edi + 0x21c], 8
lea ecx, [edi + 0x208]
jb 0x52061a
mov ecx, dword [ecx]
mov edx, dword [ebp - 0x87c]
push edx
mov edx, dword [ebp + 0xc]
push ebx
push eax
mov eax, dword [edi + 0x15c]
push eax
mov eax, dword [edi + 0x70]
push edx
push ecx
mov ecx, dword [ebp + 0x10]
add eax, eax
add eax, eax
add eax, eax
add ecx, 2
or eax, ecx
push eax
push str.__d___s_0x_X__04d:___05lu___s__s
lea edx, [ebp - 0x454]
push 0x1fd
push edx
call fcn.005613c2
add esp, 0x28
xor eax, eax
mov word [ebp - 0x5a], ax
lea eax, [ebp - 0x454]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x520670
sub eax, edx
sar eax, 1
cmp eax, 0x3ff
jle 0x52068b
mov eax, 0x3ff
inc dword [edi + 0x15c]
cmp dword [edi + 0x15c], 0x270f
mov ecx, 0xa
mov word [ebp + eax*2 - 0x454], cx
jle 0x5206b4
mov dword [edi + 0x15c], 0
mov esi, dword [edi + 0x44]
cmp esi, dword [edi + 0x48]
je 0x520794
or ebx, 0xffffffff
cmp dword [esi + 8], ebx
je 0x520788
cmp dword [esi + 4], 0
jle 0x520788
push 0x3ff
lea edx, [ebp - 0x853]
push 0
push edx
mov byte [ebp - 0x854], 0
call fcn.0055aed0
mov eax, dword [edi + 0x2e8]
push eax
push 0x3ff
lea ecx, [ebp - 0x454]
push ecx
lea edx, [ebp - 0x854]
push edx
call fcn.0055edff
add esp, 0x1c
cmp eax, ebx
je 0x520794
lea eax, [ebp - 0x854]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x520720
mov ecx, dword [esi + 8]
push 0
sub eax, edx
push eax
lea eax, [ebp - 0x854]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jg 0x520788
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esi], eax
cmp eax, 0x2733
je 0x520788
movzx edx, byte [esi + 0x1b]
movzx ecx, byte [esi + 0x1a]
push edx
movzx edx, byte [esi + 0x19]
push ecx
movzx ecx, byte [esi + 0x18]
push edx
push ecx
push eax
push str._DIAG__EVENTSyslog_disconnected__ERROR_d__EVENTMSG_Connection_lost_to__d._d._d._d_
push 4
call fcn.00530200
mov edx, dword [esi + 8]
add esp, 0x1c
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 8], ebx
mov dword [esi + 4], 0
add esi, 0x40
cmp esi, dword [edi + 0x48]
jne 0x5206c3
lea esp, [ebp - 0x88c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00558b78
mov esp, ebp
pop ebp
ret 0x18