Function at 0x514220
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x28
push ebx
push edi
mov edi, dword [0x59f670]
xor ebx, ebx
cmp edi, ebx
mov eax, edx
je 0x5144c0
cmp dword [edi + 0x18c], ecx
je 0x51424f
mov edi, dword [edi + 0x194]
cmp edi, ebx
jne 0x514237
pop edi
pop ebx
add esp, 0x28
ret
shr eax, 0x10
cmp ax, bx
je 0x514293
movzx eax, ax
mov dword [edi + 0x184], eax
cmp dword [0x59ca60], ebx
je 0x514278
push 1
push 0x3c
mov edx, edi
mov ecx, str.SOCKLISTEN
call fcn.00513350
mov ecx, edi
call fcn.00513210
test eax, eax
je 0x5144c0
mov dword [edi + 0x184], ebx
pop edi
pop ebx
add esp, 0x28
ret
push ebp
push esi
push ebx
call fcn.00563e36
add esp, 4
mov dword [edi + 0x180], eax
call fcn.00513010
mov esi, eax
cmp esi, ebx
jne 0x5142d3
cmp dword [0x59ca60], ebx
je 0x5144be
push 4
push 0x3c
mov edx, edi
mov ecx, str.SOCKLISTEN
call fcn.00513350
pop esi
pop ebp
pop edi
pop ebx
add esp, 0x28
ret
push ebx
mov dword [esi + 0x14c], 2
call fcn.00563e36
mov dword [esi + 0x17c], eax
mov dword [esi + 0x180], eax
mov ecx, dword [edi + 0x190]
add esp, 4
lea edx, [esp + 0x10]
mov dword [esi + 0x190], ecx
push edx
lea eax, [esp + 0x2c]
mov dword [esp + 0x14], 0x10
mov ecx, dword [edi + 0x18c]
push eax
push ecx
call dword [sym.imp.WSOCK32.dll_accept]
cmp eax, 0xffffffff
mov dword [esi + 0x18c], eax
jne 0x51437b
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov dword [edi + 0x184], eax
cmp dword [0x59ca60], ebx
je 0x51434c
push 2
push 0x3c
mov edx, edi
mov ecx, str.SOCKLISTEN
call fcn.00513350
mov ecx, edi
call fcn.00513210
test eax, eax
je 0x51435d
mov dword [edi + 0x184], ebx
mov ecx, esi
call fcn.00513210
test eax, eax
je 0x5144be
mov ecx, esi
call fcn.00513140
pop esi
pop ebp
pop edi
pop ebx
add esp, 0x28
ret
mov eax, dword [edi + 0x18c]
cmp eax, 0xffffffff
mov ebx, dword [sym.imp.WSOCK32.dll_inet_ntoa]
mov ebp, dword [sym.imp.WSOCK32.dll_ntohs]
je 0x5143d5
lea edx, [esp + 0x14]
push edx
lea ecx, [esp + 0x1c]
push ecx
push eax
mov dword [esp + 0x20], 0x10
call dword [sym.imp.WSOCK32.dll_getsockname]
test eax, eax
jne 0x5143d5
mov edx, dword [esp + 0x1c]
push edx
call ebx
push eax
lea ecx, [edi + 0xca]
mov edx, 0x64
call fcn.0041e120
mov eax, dword [esp + 0x1a]
push eax
call ebp
mov word [edi + 0x12e], ax
mov ecx, dword [esp + 0x2c]
push ecx
call dword [sym.imp.WSOCK32.dll_htonl]
mov ecx, eax
movzx eax, ax
movzx edx, al
push edx
shr eax, 8
shr ecx, 0x10
movzx eax, al
push eax
movzx edx, cl
shr ecx, 8
movzx eax, cl
push edx
push eax
lea ecx, [esi + 0x64]
push 0x575624
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
mov edx, dword [esp + 0x42]
add esp, 0x18
push edx
call ebp
mov word [esi + 0xc8], ax
mov eax, dword [0x59ca60]
test eax, eax
je 0x514442
push 0
push 0x3c
mov edx, edi
mov ecx, str.SOCKLISTEN
call fcn.00513350
mov ecx, esi
call fcn.00513210
test eax, eax
je 0x5144be
cmp byte [esi], 0
je 0x51436c
mov ecx, dword [esi + 0x18c]
call fcn.0053e860
mov eax, dword [0x5a1b00]
mov ecx, dword [esi + 0x18c]
push 0x23
push 0x8038
push eax
push ecx
call dword [sym.imp.WSOCK32.dll_WSAAsyncSelect]
mov eax, dword [esi + 0x18c]
cmp eax, 0xffffffff
je 0x5144be
lea edx, [esp + 0x14]
push edx
lea ecx, [esp + 0x1c]
push ecx
push eax
mov dword [esp + 0x20], 0x10
call dword [sym.imp.WSOCK32.dll_getsockname]
test eax, eax
jne 0x5144be
mov edx, dword [esp + 0x1c]
push edx
call ebx
push eax
lea ecx, [esi + 0xca]
mov edx, 0x64
call fcn.0041e120
mov eax, dword [esp + 0x1a]
push eax
call ebp
mov word [esi + 0x12e], ax
pop esi
pop ebp
pop edi
pop ebx
add esp, 0x28
ret