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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x95c
push ebx
push esi
push edi
call fcn.1004f3e2
test eax, eax
jge 0x1005b4fc
push 0x3e8
push 2
push 6
call fcn.100595dc
add esp, 0xc
cmp eax, 0xffffffff
jne 0x1005b4f3
push 0x79a
push 0x1001b488
push 0x1a
call fcn.100571a6
add esp, 0xc
mov eax, 0xc800100f
jmp 0x1005bb5a
push eax
call fcn.1004f3bd
add esp, 4
push 1
call fcn.1004f3e2
push eax
call fcn.1005c202
add esp, 8
test eax, eax
je 0x1005b51a
mov eax, 0xc800100f
jmp 0x1005bb5a
push 0x10039338
call fcn.1005c307
add esp, 4
mov edi, dword [ebp + 0x18]
cmp dword [edi], 0
je 0x1005b58d
push 0xe
call fcn.100409b0
add esp, 4
mov esi, eax
test esi, esi
je 0x1005b5e5
mov word [esi], 6
call fcn.1004f455
push eax
call fcn.100596da
mov word [esi + 0xc], ax
add esp, 4
lea eax, [ebp - 0x30]
push 0
push eax
push dword [edi]
call fcn.1005c2a9
add esp, 0xc
lea ecx, [ebp - 0x30]
add edi, 4
push esi
push ecx
call fcn.1005c23f
add esp, 8
push esi
push 0x10039338
call fcn.1005c312
add esp, 8
cmp dword [edi], 0
jne 0x1005b52f
cmp dword [0x1001b46c], 0
je 0x1005b6b1
push 0x1003974c
call fcn.1005c307
add esp, 4
push 0xe
call fcn.100409b0
add esp, 4
mov edi, eax
test edi, edi
jne 0x1005b613
push 0x7cd
push 0x1001b488
push 0x12
call fcn.100571a6
add esp, 0xc
push 0
call fcn.1004f3e2
push eax
call fcn.1005c202
add esp, 8
mov eax, 0xc800100f
jmp 0x1005bb5a
push 0x7b5
push 0x1001b488
push 0x12
call fcn.100571a6
add esp, 0xc
push 0
call fcn.1004f3e2
push eax
call fcn.1005c202
add esp, 8
mov eax, 0xc800100f
jmp 0x1005bb5a
push 0xe
xor esi, esi
push esi
push edi
call fcn.10068ed0
mov word [edi], 6
add esp, 0xc
call fcn.1004f455
push eax
call fcn.100596da
mov word [edi + 0xc], ax
add esp, 4
lea eax, [edi + 2]
push 4
push esi
push eax
call fcn.10068ed0
add esp, 0xc
lea eax, [edi + 6]
push 6
push 0xff
push eax
call fcn.10068ed0
add esp, 0xc
push edi
push 0x1003974c
call fcn.1005c312
add esp, 8
mov eax, dword [0x1003974c]
push eax
call fcn.1005c2bc
add esp, 4
test eax, eax
je 0x1005b6a7
push 0x7dd
push 0x1001b488
push 0x38
call fcn.100571a6
add esp, 0xc
push esi
call fcn.1004f3e2
push eax
call fcn.1005c202
add esp, 8
mov eax, 0xc800100f
jmp 0x1005bb5a
mov dword [0x1001b46c], 0
push 0
call fcn.10045250
add esp, 4
test eax, eax
jge 0x1005b6c9
mov eax, 0xc800100f
jmp 0x1005bb5a
xor esi, esi
push esi
call fcn.10045250
cdq
add esp, 4
xor eax, edx
sub eax, edx
mov dword [ebp - 0x54c], esi
and eax, 0x1fff
push 0x400
xor eax, edx
push esi
mov dword [ebp - 0x548], 0xffffffff
sub eax, edx
mov dword [ebp - 0x550], eax
lea eax, [ebp - 0x544]
push eax
call fcn.10068ed0
add esp, 0xc
push dword [ebp + 0xc]
call fcn.1004d620
add esp, 4
inc eax
lea edx, [ebp - 0x544]
push eax
push dword [ebp + 0xc]
push edx
call fcn.100691f0
add esp, 0xc
mov edi, dword [0x1003974c]
push edi
call fcn.1005c2bc
add esp, 4
test eax, eax
jne 0x1005b824
push edi
call fcn.1005c2c6
add esp, 4
push 0x10
push eax
call fcn.1004f3e2
push eax
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
jne 0x1005b772
call sub.WSOCK32.dll_WSAGetLastError
push eax
push 0x1001b60c
call fcn.1005b4a7
add esp, 8
push 0
lea eax, [ebp - 0x550]
push 0x40c
push eax
call fcn.1004f3e2
push eax
call sub.WSOCK32.dll_send
cmp eax, 0x40c
jne 0x1005b795
inc esi
jmp 0x1005b808
mov dword [ebp - 0x14], 0xe
push 0x80c
push 0x1001b488
push 0x34
call fcn.100571a6
add esp, 0xc
push 0x10
call fcn.100409b0
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x1005b89e
mov word [ebx], 6
call fcn.1004f455
push eax
call fcn.100596da
mov word [ebx + 0xc], ax
add esp, 4
mov dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x14]
push eax
push ebx
call fcn.1004f3e2
push eax
call sub.WSOCK32.dll_getsockname
test eax, eax
jne 0x1005b8cc
push ebx
push 0x10039338
call fcn.1005c312
add esp, 8
push edi
call fcn.1005c2e6
add esp, 4
mov edi, eax
push edi
call fcn.1005c2bc
add esp, 4
test eax, eax
je 0x1005b743
push 0
call fcn.1004f3e2
push eax
call fcn.1005c202
add esp, 8
mov ebx, dword [0x10039338]
push ebx
call fcn.1005c2bc
add esp, 4
test eax, eax
jne 0x1005b92e
mov edi, 0x40c
push ebx
call fcn.1005c2c6
add esp, 4
mov dword [ebp - 0x14], eax
push 0x10
push eax
call fcn.1004f3e2
push eax
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
jne 0x1005b882
call sub.WSOCK32.dll_WSAGetLastError
push eax
push 0x1001b60c
call fcn.1005b4a7
add esp, 8
push 0
lea eax, [ebp - 0x550]
push edi
push eax
call fcn.1004f3e2
push eax
call sub.WSOCK32.dll_send
cmp eax, edi
jne 0x1005b8f3
inc esi
jmp 0x1005b907
push 0x80f
push 0x1001b488
push 0x12
call fcn.100571a6
add esp, 0xc
push 0
call fcn.1004f3e2
push eax
call fcn.1005c202
add esp, 8
mov eax, 0xc800100f
jmp 0x1005bb5a
push 0x818
push 0x1001b488
push 0x16
call fcn.100571a6
add esp, 0xc
push ebx
call fcn.100409c0
add esp, 4
mov eax, 0xc800100f
jmp 0x1005bb5a
push 0x835
push 0x1001b488
push 0x34
call fcn.100571a6
add esp, 0xc
push dword [ebp - 0x14]
call fcn.100409c0
add esp, 4
push ebx
call fcn.1005c2e6
add esp, 4
mov ebx, eax
push ebx
call fcn.1005c2bc
add esp, 4
test eax, eax
je 0x1005b850
push 0
test esi, esi
jne 0x1005b960
call fcn.1004f3e2
push eax
call fcn.1005c202
add esp, 8
push 0x83b
push 0x1001b488
push 0x34
call fcn.100571a6
add esp, 0xc
mov eax, 0xc800100f
jmp 0x1005bb5a
xor edi, edi
call fcn.10045250
add esp, 4
add eax, dword [ebp + 0x10]
xor esi, esi
mov dword [ebp - 0x10], eax
mov ebx, dword [ebp - 0x10]
push esi
mov dword [ebp - 8], esi
call fcn.10045250
add esp, 4
sub ebx, eax
mov dword [ebp - 0xc], ebx
cmp ebx, esi
jge 0x1005b98d
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x144], esi
call fcn.1004f3e2
lea ecx, [ebp - 0x144]
mov dword [ebp - 0x140], eax
lea eax, [ebp - 0xc]
inc dword [ebp - 0x144]
push eax
push esi
push esi
push ecx
call fcn.1004f3e2
inc eax
push eax
call fcn.10059608
add esp, 0x14
mov ebx, eax
push ebx
push 0x1001b5e0
call fcn.1005b4a7
add esp, 8
cmp ebx, 0xffffffff
je 0x1005bae7
test ebx, ebx
je 0x1005bb2b
push esi
lea eax, [ebp - 0x95c]
mov dword [ebp - 4], 0x10
push 0x40c
push eax
call fcn.1004f3e2
push eax
call sub.WSOCK32.dll_recv
cmp eax, 0x40c
mov ebx, eax
je 0x1005ba22
push 0x869
push 0x1001b488
push 0x35
call fcn.100571a6
add esp, 0xc
jmp 0x1005bb30
lea eax, [ebp - 4]
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], 0x10
push eax
push ecx
call fcn.1004f3e2
push eax
call sub.WSOCK32.dll_getpeername
cmp eax, 0xffffffff
jne 0x1005ba54
call sub.WSOCK32.dll_WSAGetLastError
push eax
push 0x1001b5c8
call fcn.1005b4a7
add esp, 8
lea eax, [ebp - 0x950]
push eax
lea eax, [ebp - 0x40]
push dword [ebp - 0x954]
push dword [ebp - 0x95c]
push eax
call fcn.10055e66
add esp, 4
push eax
push ebx
push 0x1001b534
call fcn.1005b4a7
add esp, 0x18
mov ecx, dword [ebp - 0x550]
cmp dword [ebp - 0x95c], ecx
jne 0x1005bb30
mov eax, dword [ebp - 0x548]
cmp dword [ebp - 0x954], eax
jne 0x1005bb30
lea eax, [ebp - 0x40]
push eax
call fcn.10055e66
add esp, 4
lea edx, [ebp - 0x950]
push dword [ebp + 0x24]
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
push 2
push dword [ebp + 0x14]
push eax
push edx
push dword [ebp + 0x18]
call fcn.1005abd8
add esp, 0x20
mov dword [ebp - 0x14], eax
cmp eax, 0xc8001007
je 0x1005bb61
cmp eax, esi
jne 0x1005bb30
jmp 0x1005bb2b
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2714
je 0x1005bb30
push 0x850
push 0x1001b488
push 0x3c
call fcn.100571a6
add esp, 0xc
push 0
call fcn.1004f3e2
push eax
call fcn.1005c202
add esp, 8
mov eax, dword [ebp + 0x20]
cmp dword [eax], 0
mov eax, 0
jg 0x1005bb5a
mov eax, 1
jmp 0x1005bb5a
mov edi, 1
test edi, edi
je 0x1005b972
push 0
call fcn.1004f3e2
push eax
call fcn.1005c202
add esp, 8
mov eax, 0xc800100f
cmp dword [ebp - 0x14], eax
jne 0x1005bb58
test byte [ebp + 0x14], 1
jne 0x1005bb5a
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x894
push 0x1001b488
push 0x12
call fcn.100571a6
add esp, 0xc
mov eax, 0xc800100f
jmp 0x1005bb5a