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

Disassembly:
sub esp, 0x28
push esi
mov esi, dword [0x5b1224]
test esi, esi
je 0x51c4a1
cmp dword [esi + 0x190], ecx
je 0x51c1f9
mov esi, dword [esi + 0x198]
test esi, esi
jne 0x51c1e2
pop esi
add esp, 0x28
ret
push ebx
mov eax, edx
shr eax, 0x10
test ax, ax
push ebp
push edi
je 0x51c251
mov edi, dword [esi + 0x148]
movzx eax, ax
mov dword [esi + 0x184], eax
mov eax, dword [0x5ae60c]
test eax, eax
je 0x51c22e
push 1
push 0x3c
mov edx, esi
mov ecx, str.SOCKLISTEN
call fcn.0051b2f0
mov edx, edi
mov ecx, esi
call fcn.0051b1b0
test eax, eax
je 0x51c49e
pop edi
pop ebp
pop ebx
mov dword [esi + 0x184], 0
pop esi
add esp, 0x28
ret
push 0
call fcn.00570bc6
add esp, 4
mov dword [esi + 0x180], eax
call fcn.0051afa0
mov edi, eax
test edi, edi
jne 0x51c291
mov eax, dword [0x5ae60c]
test eax, eax
je 0x51c49e
push 4
push 0x3c
mov edx, esi
mov ecx, str.SOCKLISTEN
call fcn.0051b2f0
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x28
ret
push 0
mov dword [edi + 0x14c], 2
call fcn.00570bc6
mov dword [edi + 0x17c], eax
mov dword [edi + 0x180], eax
mov ecx, dword [esi + 0x194]
add esp, 4
lea edx, [esp + 0x10]
mov dword [edi + 0x194], ecx
push edx
mov ebp, 0x10
lea eax, [esp + 0x2c]
mov dword [esp + 0x14], ebp
mov ecx, dword [esi + 0x190]
push eax
push ecx
call dword [sym.imp.WSOCK32.dll_accept]
cmp eax, 0xffffffff
mov dword [edi + 0x190], eax
jne 0x51c350
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov ebx, dword [esi + 0x148]
mov dword [esi + 0x184], eax
mov eax, dword [0x5ae60c]
test eax, eax
mov ebp, dword [edi + 0x148]
je 0x51c319
push 2
push 0x3c
mov edx, esi
mov ecx, str.SOCKLISTEN
call fcn.0051b2f0
mov edx, ebx
mov ecx, esi
call fcn.0051b1b0
test eax, eax
je 0x51c330
mov dword [esi + 0x184], 0
mov edx, ebp
mov ecx, edi
call fcn.0051b1b0
test eax, eax
je 0x51c49e
mov ecx, edi
call fcn.0051b0e0
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x28
ret
mov eax, dword [esi + 0x190]
cmp eax, 0xffffffff
mov ebx, dword [sym.imp.WSOCK32.dll_ntohs]
je 0x51c3a4
lea edx, [esp + 0x14]
push edx
lea ecx, [esp + 0x1c]
push ecx
push eax
mov dword [esp + 0x20], ebp
call dword [sym.imp.WSOCK32.dll_getsockname]
test eax, eax
jne 0x51c3a4
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.WSOCK32.dll_inet_ntoa]
push eax
lea ecx, [esi + 0xca]
mov edx, 0x64
call fcn.0041ee40
mov eax, dword [esp + 0x1a]
push eax
call ebx
mov word [esi + 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, [edi + 0x64]
push 0x58467c
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
mov edx, dword [esp + 0x42]
add esp, 0x18
push edx
call ebx
mov word [edi + 0xc8], ax
mov eax, dword [0x5ae60c]
test eax, eax
je 0x51c422
mov ebp, dword [edi + 0x148]
push 0
push 0x3c
mov edx, esi
mov ecx, str.SOCKLISTEN
call fcn.0051b2f0
mov edx, ebp
mov ecx, edi
call fcn.0051b1b0
test eax, eax
je 0x51c49e
mov ebp, 0x10
cmp byte [edi], 0
je 0x51c341
mov ecx, dword [edi + 0x190]
call fcn.0054af90
mov eax, dword [0x5b4314]
mov ecx, dword [edi + 0x190]
push 0x23
push 0x8038
push eax
push ecx
call dword [sym.imp.WSOCK32.dll_WSAAsyncSelect]
mov eax, dword [edi + 0x190]
cmp eax, 0xffffffff
je 0x51c49e
lea edx, [esp + 0x14]
push edx
lea ecx, [esp + 0x1c]
push ecx
push eax
mov dword [esp + 0x20], ebp
call dword [sym.imp.WSOCK32.dll_getsockname]
test eax, eax
jne 0x51c49e
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.WSOCK32.dll_inet_ntoa]
push eax
lea ecx, [edi + 0xca]
mov edx, 0x64
call fcn.0041ee40
mov eax, dword [esp + 0x1a]
push eax
call ebx
mov word [edi + 0x12e], ax
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x28
ret