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

Disassembly:
sub esp, 0x47c
push ebx
push ebp
push esi
push edi
push 0x3e8
push 2
push 6
call fcn.1058d600
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
mov dword [esp + 0x10], edi
jne 0x1058da16
pop edi
pop esi
pop ebp
mov eax, 0x3f
pop ebx
add esp, 0x47c
ret
push edi
call fcn.1058d8f0
add esp, 4
push 1
call fcn.1058d8e0
push eax
call fcn.1058efa0
add esp, 8
cmp eax, 0xffffffff
jne 0x1058da44
pop edi
pop esi
pop ebp
mov eax, 0x41
pop ebx
add esp, 0x47c
ret
mov eax, dword [0x10579728]
xor ebx, ebx
cmp eax, ebx
je 0x1058db15
push 0x1057b1e0
call fcn.1058c7d0
push 0xe
call dword [sym.imp.MSVCRT.dll_malloc]
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x1058da93
push ebx
call fcn.1058d8e0
push eax
call fcn.1058efa0
add esp, 8
push edi
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 0x40
pop ebx
add esp, 0x47c
ret
mov ecx, esi
xor eax, eax
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov word [ecx + 0xc], ax
mov word [esi], 6
call fcn.1058d900
push eax
call fcn.1058d730
lea edx, [esi + 2]
mov word [esi + 0xc], ax
lea ecx, [esi + 6]
or eax, 0xffffffff
mov dword [edx], ebx
push esi
mov dword [ecx], eax
push 0x1057b1e0
mov word [ecx + 4], ax
call fcn.1058c7e0
mov eax, dword [0x1057b1e0]
push eax
mov dword [0x1057b03c], eax
call fcn.1058c7a0
add esp, 0x10
test eax, eax
je 0x1058db0f
push ebx
call fcn.1058d8e0
push eax
call fcn.1058efa0
add esp, 8
push edi
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 0x41
pop ebx
add esp, 0x47c
ret
mov dword [0x10579728], ebx
mov ebp, dword [sym.imp.MSVCRT.dll_time]
push ebx
call ebp
add esp, 4
test eax, eax
jge 0x1058db35
pop edi
pop esi
pop ebp
mov eax, 0x4a
pop ebx
add esp, 0x47c
ret
push ebx
call ebp
and eax, 0x80001fff
jns 0x1058db46
dec eax
or eax, 0xffffe000
inc eax
mov dword [esp + 0x154], eax
mov esi, dword [esp + 0x498]
mov ecx, 0x64
xor eax, eax
lea edi, [esp + 0x160]
mov dword [esp + 0x15c], 0xffffffff
mov dword [esp + 0x150], 0x284
mov dword [esp + 0x158], ebx
rep stosd dword es:[edi], eax
mov edi, esi
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
mov edx, ecx
lea edi, [esp + 0x160]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [0x1057b1e0]
mov ecx, edx
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov dword [esp + 0x20], ebx
mov edi, eax
call fcn.1058c7a0
add esp, 8
test eax, eax
jne 0x1058dc76
push edi
call fcn.1058c7b0
add esp, 4
push 0x10
push eax
call fcn.1058d8e0
push eax
call sub.WSOCK32.dll_connect
push ebx
lea eax, [esp + 0x150]
push 0x1a0
push eax
call fcn.1058d8e0
push eax
call sub.WSOCK32.dll_send
cmp eax, 0x1a0
jne 0x1058dbf8
inc dword [esp + 0x18]
jmp 0x1058dc57
push 0x10
mov dword [esp + 0x18], 0xe
call dword [sym.imp.MSVCRT.dll_malloc]
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x1058dc9f
mov word [esi], 6
call fcn.1058d900
push eax
call fcn.1058d730
add esp, 4
lea ecx, [esp + 0x14]
mov word [esi + 0xc], ax
mov dword [esp + 0x14], 0x10
push ecx
push esi
call fcn.1058d8e0
push eax
call sub.WSOCK32.dll_getsockname
test eax, eax
push esi
jne 0x1058dcc8
push 0x1057b388
call fcn.1058c7e0
add esp, 8
push edi
call fcn.1058c7c0
mov edi, eax
push edi
call fcn.1058c7a0
add esp, 8
test eax, eax
je 0x1058dbbb
cmp dword [esp + 0x18], ebx
jne 0x1058dceb
push ebx
call fcn.1058d8e0
push eax
call fcn.1058efa0
mov ecx, dword [esp + 0x18]
add esp, 8
push ecx
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 0x3e
pop ebx
add esp, 0x47c
ret
push ebx
call fcn.1058d8e0
push eax
call fcn.1058efa0
mov edx, dword [esp + 0x18]
add esp, 8
push edx
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x47c
ret
call dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [esp + 0x14]
add esp, 4
push eax
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x47c
ret
push ebx
call ebp
mov ecx, dword [esp + 0x49c]
mov edi, dword [esp + 0x4ac]
mov ebp, dword [esp + 0x4a8]
mov ebx, dword [esp + 0x4a4]
mov esi, dword [esp + 0x4a0]
add esp, 4
add eax, ecx
mov dword [esp + 0x14], eax
push 0
mov dword [esp + 0x28], 0
call dword [sym.imp.MSVCRT.dll_time]
mov edx, dword [esp + 0x18]
add esp, 4
sub edx, eax
mov dword [esp + 0x20], edx
jns 0x1058dd41
mov dword [esp + 0x20], 0
mov dword [esp + 0x48], 0
call fcn.1058d8e0
mov ecx, dword [esp + 0x48]
mov dword [esp + ecx*4 + 0x4c], eax
mov edx, dword [esp + 0x48]
inc edx
lea eax, [esp + 0x48]
mov dword [esp + 0x48], edx
lea edx, [esp + 0x20]
push edx
push 0
push 0
push eax
call fcn.1058d8e0
inc eax
push eax
call fcn.1058d630
add esp, 0x14
cmp eax, 0xffffffff
je 0x1058de10
test eax, eax
je 0x1058de69
push 0
lea ecx, [esp + 0x2f0]
push 0x1a0
push ecx
mov dword [esp + 0x28], 0xe
call fcn.1058d8e0
push eax
call sub.WSOCK32.dll_recv
cmp eax, 0x1a0
jne 0x1058dd1a
lea edx, [esp + 0x1c]
lea eax, [esp + 0x38]
push edx
push eax
mov dword [esp + 0x24], 0x10
call fcn.1058d8e0
push eax
call sub.WSOCK32.dll_getpeername
lea ecx, [esp + 0x28]
push ecx
call fcn.105909f0
push edi
push ebp
push ebx
push esi
lea edx, [esp + 0x310]
push eax
push edx
call fcn.1058de90
add esp, 0x1c
cmp esi, 4
jne 0x1058de02
cmp word [edi + 0x20], 0
ja 0x1058de69
cmp eax, 0x40
je 0x1058de21
test eax, eax
je 0x1058de69
jmp 0x1058dd1a
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2714
jne 0x1058de3b
jmp 0x1058dd1a
mov eax, dword [esp + 0x10]
push eax
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 0x40
pop ebx
add esp, 0x47c
ret
push 0
call fcn.1058d8e0
push eax
call fcn.1058efa0
mov ecx, dword [esp + 0x18]
add esp, 8
push ecx
call sub.WSOCK32.dll_closesocket
mov ecx, dword [ebx]
xor eax, eax
pop edi
pop esi
test ecx, ecx
pop ebp
pop ebx
setle al
add esp, 0x47c
ret
push 0
call fcn.1058d8e0
push eax
call fcn.1058efa0
mov edx, dword [esp + 0x18]
add esp, 8
push edx
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x47c
ret