Function at 0x56fa60
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information
Send data
Send data on socket

Disassembly:
sub esp, 0x174
test byte [0xa49594], 1
push ebp
push esi
push edi
mov edi, dword [str.__HPWsock__]
mov ebp, ecx
jne 0x56fa98
or dword [0xa49594], 1
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x56fa86
sub eax, edx
mov dword [0xa49590], eax
jmp 0x56fa9d
mov eax, dword [0xa49590]
mov esi, dword [esp + 0x188]
cmp esi, eax
jle 0x57017a
push eax
push edi
mov edi, dword [esp + 0x18c]
push edi
call fcn.00589c37
add esp, 0xc
test eax, eax
jne 0x57017a
mov eax, dword [0xa49590]
sub esi, eax
cmp esi, 0x4f
jl 0x56fad7
mov esi, 0x4f
add eax, edi
push esi
push eax
lea eax, [esp + 0x68]
push eax
mov byte [esp + 0x6c], 0
call fcn.00588960
mov edx, dword [str.TCPReq]
mov eax, edx
mov byte [esp + esi + 0x6c], 0
add esp, 0xc
lea esi, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x56fb00
push ebx
sub eax, esi
push eax
push edx
lea ecx, [esp + 0x6c]
push ecx
call fcn.00589c37
add esp, 0xc
test eax, eax
jne 0x56fd6b
mov ecx, ebp
call fcn.005717b0
cmp eax, 4
jne 0x570153
lea ecx, [esp + 0x1c]
call fcn.0056b8f0
mov ecx, dword [ebp + 0x984]
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x20]
push eax
push ecx
mov dword [esp + 0x1c], 0x10
call dword [sym.imp.ws2_32.dll_getsockname]
mov edx, dword [esp + 0x1e]
push edx
mov esi, eax
call dword [sym.imp.ws2_32.dll_htons]
test esi, esi
mov word [esp + 0x1e], ax
jne 0x570153
mov eax, dword [str.TCPReq]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x56fb80
sub eax, edx
mov bl, byte [esp + eax + 0x64]
test bl, bl
lea eax, [esp + eax + 0x64]
je 0x56fca7
lea ecx, [ebp + 0x96c]
add eax, 1
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x56fbc4
test dl, dl
je 0x56fbc0
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x56fbc4
add eax, 2
add ecx, 2
test dl, dl
jne 0x56fba4
xor eax, eax
jmp 0x56fbc9
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x56fca7
mov esi, 2
mov eax, dword [str.TCPDeny]
mov ecx, dword [str.__HPWsock__]
push esi
push eax
push ecx
lea edx, [esp + 0x110]
push str._s_s_d
push edx
mov byte [esp + 0x118], 0
call fcn.00589571
add esp, 0x14
cmp esi, 2
mov ebx, eax
jne 0x56fc6c
lea eax, [ebp + 0x96c]
push eax
lea ecx, [esp + 0xb8]
push str.___s_
push ecx
call fcn.00589571
lea ecx, [esp + 0xc0]
add esp, 0xc
mov dword [esp + 0x18], eax
mov edx, ecx
mov al, byte [ecx]
add ecx, 1
test al, al
jne 0x56fc31
sub ecx, edx
lea edi, [esp + 0x104]
mov esi, edx
mov edx, ecx
add edi, 0xffffffff
lea ebx, [ebx]
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x56fc50
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
add ebx, dword [esp + 0x18]
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x190]
push 0x10
lea edx, [esp + 0x58]
push edx
call fcn.0056a6d0
mov ecx, dword [ebp + 0x988]
push eax
push 0
push ebx
lea eax, [esp + 0x114]
push eax
push ecx
call dword [sym.imp.ws2_32.dll_sendto]
pop ebx
pop edi
pop esi
mov al, 1
pop ebp
add esp, 0x174
ret 0xc
cmp bl, 0x79
sete cl
lea eax, [esp + 0x17]
push eax
push ecx
mov ecx, ebp
call fcn.00571190
test al, al
jne 0x56fcd1
xor edx, edx
cmp byte [esp + 0x17], dl
setne dl
add edx, 3
mov esi, edx
jmp 0x56fbd6
mov esi, dword [esp + 0x190]
movzx eax, word [esi + 2]
movzx ebx, byte [esi + 5]
mov cl, byte [esi + 7]
mov dl, byte [esi + 6]
movzx eax, ax
push eax
movzx ecx, cl
push ecx
movzx edx, dl
push edx
movzx edx, word [esp + 0x2a]
mov byte [esp + 0x22], bl
mov bl, byte [esi + 4]
movzx eax, byte [esp + 0x22]
push eax
mov eax, dword [str.TCPInfo]
movzx ecx, bl
push ecx
mov ecx, dword [str.__HPWsock__]
push edx
push eax
push ecx
lea edx, [esp + 0x124]
push str._s_s__d__d._d._d._d:_d
push edx
mov byte [esp + 0x12c], 0
call fcn.00589571
add esp, 0x28
mov edi, eax
push 0x10
lea eax, [esp + 0x58]
push eax
mov ecx, esi
call fcn.0056a6d0
mov edx, dword [ebp + 0x988]
push eax
push 0
push edi
lea ecx, [esp + 0x114]
push ecx
push edx
call dword [sym.imp.ws2_32.dll_sendto]
pop ebx
pop edi
pop esi
mov al, 1
pop ebp
add esp, 0x174
ret 0xc
mov edx, dword [str.TCPInfo]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x56fd76
sub eax, esi
push eax
push edx
lea edx, [esp + 0x6c]
push edx
call fcn.00589c37
add esp, 0xc
test eax, eax
jne 0x57005b
mov ecx, ebp
call fcn.005717b0
cmp eax, 1
jne 0x570153
lea ecx, [esp + 0x44]
call fcn.0056b8f0
lea ecx, [esp + 0x54]
call fcn.0056b8f0
mov eax, dword [esp + 0x190]
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + 0x48], edx
mov edx, dword [eax + 0xc]
mov dword [esp + 0x44], ecx
mov ecx, dword [eax + 8]
mov eax, dword [str.TCPInfo]
mov dword [esp + 0x50], edx
mov dword [esp + 0x4c], ecx
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x56fde4
sub eax, edx
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x40]
push edx
lea ecx, [esp + 0x48]
push ecx
lea edx, [esp + 0x44]
push edx
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x2c]
xor ebx, ebx
push edx
lea eax, [esp + eax + 0x7c]
push str.__d__d._d._d._d:_d
push eax
mov dword [esp + 0x38], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x50], ebx
call fcn.00589c18
movzx ecx, byte [esp + 0x54]
mov al, byte [esp + 0x60]
mov dl, byte [esp + 0x58]
mov byte [esp + 0x78], cl
movzx ecx, byte [esp + 0x5c]
mov byte [esp + 0x7a], al
mov ax, word [esp + 0x38]
mov byte [esp + 0x79], dl
mov dx, word [esp + 0x50]
mov word [esp + 0x66], ax
mov edi, dword [esp + 0x64]
add esp, 0x20
mov byte [esp + 0x5b], cl
mov word [esp + 0x56], dx
mov ecx, ebp
call fcn.0056aec0
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x10], esi
je 0x56fe73
movzx ecx, word [ebp + 0x964]
lea edx, [ecx + ebx + 0x32]
push edx
push esi
mov ecx, ebp
call fcn.0056bb30
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x50]
mov dword [esp + 0x20], eax
mov eax, edi
shr eax, 0x10
push eax
mov dword [esp + 0x20], edi
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], edx
call dword [sym.imp.ws2_32.dll_htons_1]
push 0x10
lea ecx, [esp + 0x20]
push ecx
push esi
mov word [esp + 0x2a], ax
call dword [sym.imp.ws2_32.dll_connect]
test eax, eax
je 0x56ff10
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
cmp eax, 0x2740
jne 0x57003e
add ebx, 1
cmp ebx, 0x32
jg 0x57003e
push 1
lea edx, [esp + 0x14]
push edx
mov ecx, ebp
call fcn.0056bbe0
push 0xa
call dword [sym.imp.kernel32.dll_Sleep]
jmp 0x56fe73
push 2
mov ecx, ebp
call fcn.00571790
lea ebx, [ebp + 0xc18]
mov ecx, ebx
call fcn.0056b5e0
mov ecx, eax
call fcn.0056f870
mov ecx, ebx
mov edi, eax
call fcn.0056b610
push esi
mov ecx, edi
call fcn.0056ac20
mov dword [esp + 0x10], 0x10
call fcn.0056ac00
mov ebx, eax
lea eax, [esp + 0x10]
push eax
push ebx
push esi
call dword [sym.imp.ws2_32.dll_getpeername]
mov ecx, dword [esp + 0x190]
push ecx
mov ecx, edi
call fcn.0056abe0
lea esi, [ebp + 0x66c]
mov ecx, esi
call fcn.0056b360
mov ecx, eax
call fcn.00573580
mov ecx, esi
call fcn.0056b390
mov edx, dword [ebp]
mov eax, dword [edx + 0x58]
mov ecx, ebp
call eax
mov esi, eax
push 0x10
lea ecx, [esp + 0x58]
push ecx
lea ecx, [esi + 0x18]
mov dword [esi + 4], 4
mov byte [esi + 8], 1
mov dword [esi + 0xc], 2
mov dword [esi + 0x10], 0xffffffff
call fcn.0056a500
mov ecx, dword [esi + 0x44]
push ebx
call fcn.0056b970
push esi
mov ecx, ebp
call fcn.005721c0
mov edx, dword [ebp]
mov eax, dword [edx + 0x58]
mov ecx, ebp
call eax
mov esi, eax
mov ecx, ebp
mov dword [esi + 4], 1
mov byte [esi + 8], 1
mov dword [esi + 0xc], 2
mov dword [esi + 0x10], 0xffffffff
call fcn.00571170
movzx ecx, byte [ebp + 0x696]
push eax
push ecx
lea ecx, [esp + 0x24]
call fcn.0056a6a0
push 0x11
lea edx, [esp + 0x20]
push edx
lea ecx, [esi + 0x18]
call fcn.0056a500
mov ecx, dword [esi + 0x44]
push ebx
call fcn.0056b970
push esi
mov ecx, ebp
call fcn.005721c0
push edi
mov ecx, ebp
call fcn.0056f3a0
pop ebx
pop edi
pop esi
mov al, 1
pop ebp
add esp, 0x174
ret 0xc
push 1
lea eax, [esp + 0x14]
push eax
mov ecx, ebp
call fcn.0056bbe0
pop ebx
pop edi
pop esi
mov al, 1
pop ebp
add esp, 0x174
ret 0xc
mov edx, dword [str.TCPDeny]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x570066
sub eax, esi
push eax
push edx
lea ecx, [esp + 0x6c]
push ecx
call fcn.00589c37
add esp, 0xc
test eax, eax
jne 0x570153
mov ecx, ebp
call fcn.005717b0
cmp eax, 1
jne 0x570153
push 0
mov ecx, ebp
call fcn.00571790
mov eax, dword [str.TCPDeny]
mov dword [esp + 0x10], 0
mov byte [esp + 0xb4], 0
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x5700c0
sub eax, edx
lea edx, [esp + 0xb4]
push edx
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + eax + 0x6c]
push str._d___
push edx
call fcn.00589c18
add ebp, 0x60c
add esp, 0x10
mov ecx, ebp
call fcn.0056b310
mov ecx, dword [esp + 0x10]
add ecx, 0xfffffffe
cmp ecx, 3
ja case.default.0x570103
jmp dword [ecx*4 + 0x570188]
lea ecx, [esp + 0xb4]
lea edx, [eax + 4]
mov dword [eax], 2
mov eax, ecx
sub edx, eax
mov edi, edi
mov al, byte [ecx]
mov byte [edx + ecx], al
add ecx, 1
test al, al
jne 0x570120
mov ecx, ebp
call fcn.0056b340
pop ebx
pop edi
pop esi
mov al, 1
pop ebp
add esp, 0x174
ret 0xc
mov dword [eax], 3
mov ecx, ebp
mov byte [eax + 4], 0
call fcn.0056b340
pop ebx
pop edi
pop esi
mov al, 1
pop ebp
add esp, 0x174
ret 0xc
mov dword [eax], 4
jmp 0x570148
mov dword [eax], 5
jmp 0x570148
mov dword [eax], 1
jmp 0x570148
pop edi
pop esi
xor al, al
pop ebp
add esp, 0x174
ret 0xc