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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5726a9
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x67d978]
xor eax, esp
mov dword [esp + 0x40], eax
push ebx
push esi
push edi
mov eax, dword [0x67d978]
xor eax, esp
push eax
lea eax, [esp + 0x58]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
and dword [esp + 0x14], 0
mov dword [esp + 0x3c], eax
call fcn.00524420
xor edi, edi
push 6
inc edi
push edi
push 2
lea esi, [esp + 0x20]
mov dword [esp + 0x24], eax
call fcn.00513254
mov ebx, eax
add esp, 0xc
mov dword [esp + 0x38], ebx
and dword [esp + 0x60], 0
cmp ebx, 0xffffffff
jne 0x512e8b
mov eax, dword [esp + 0x14]
neg eax
sbb eax, eax
test eax, fcn.00491f48
je 0x512e8b
mov eax, esi
push eax
mov ecx, str.socket_select_interrupter
call fcn.00412152
lea eax, [esp + 0x24]
push eax
push 4
push 0xffff
push ebx
lea ecx, [esp + 0x24]
lea eax, [esp + 0x23]
mov dword [esp + 0x34], edi
mov byte [esp + 0x23], 0
call fcn.005133f1
xor eax, eax
lea edi, [esp + 0x50]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
add esp, 0x10
push 0x10
stosd dword es:[edi], eax
pop esi
stosd dword es:[edi], eax
push str.127.0.0.1
mov dword [esp + 0x24], esi
mov word [esp + 0x44], 2
call dword [sym.imp.WS2_32.dll_inet_addr]
and word [esp + 0x42], 0
cmp ebx, 0xffffffff
mov edi, dword [sym.imp.WS2_32.dll_WSASetLastError]
mov dword [esp + 0x44], eax
jne 0x512efd
call fcn.00524420
mov ecx, 0x2719
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
jmp 0x512f3f
push 0
call edi
push esi
lea eax, [esp + 0x44]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_bind]
push eax
lea esi, [esp + 0x18]
call fcn.00511f83
mov esi, eax
test esi, esi
pop ecx
jne 0x512f36
and dword [esp + 0x2c], eax
call fcn.00524420
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
jmp 0x512f3a
mov ecx, dword [esp + 0x14]
cmp esi, 0xffffffff
jne 0x512f54
neg ecx
sbb ecx, ecx
test ecx, fcn.00491f48
je 0x512f54
lea eax, [esp + 0x14]
jmp 0x512e80
cmp ebx, 0xffffffff
jne 0x512f6d
call fcn.00524420
mov ecx, 0x2719
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
jmp 0x512fc3
push 0
call edi
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x44]
push eax
push ebx
mov dword [esp + 0x28], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
mov ecx, dword [esp + 0x1c]
push eax
lea esi, [esp + 0x18]
mov dword [esp + 0x24], ecx
call fcn.00511f83
mov esi, eax
test esi, esi
pop ecx
jne 0x512fba
and dword [esp + 0x2c], eax
call fcn.00524420
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
jmp 0x512fbe
mov ecx, dword [esp + 0x14]
cmp esi, 0xffffffff
jne 0x512fd8
neg ecx
sbb ecx, ecx
test ecx, fcn.00491f48
je 0x512fd8
lea eax, [esp + 0x14]
jmp 0x512e80
push str.127.0.0.1
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp ebx, 0xffffffff
mov dword [esp + 0x44], eax
jne 0x513000
call fcn.00524420
mov ecx, 0x2719
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
jmp 0x513041
push 0
call edi
push closesocket
push ebx
call dword [sym.imp.WS2_32.dll_listen]
push eax
lea esi, [esp + 0x18]
call fcn.00511f83
test eax, eax
pop ecx
mov dword [esp + 0x1c], eax
jne 0x513036
xor esi, esi
call fcn.00524420
mov ecx, esi
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
jmp 0x51303a
mov ecx, dword [esp + 0x14]
cmp dword [esp + 0x1c], 0xffffffff
jne 0x513056
neg ecx
sbb ecx, ecx
test ecx, fcn.00491f48
je 0x513056
lea eax, [esp + 0x14]
jmp 0x512e80
push 6
push 1
push 2
lea esi, [esp + 0x20]
call fcn.00513254
add esp, 0xc
mov dword [esp + 0x34], eax
mov dword [esp + 0x1c], eax
mov byte [esp + 0x60], 1
or esi, 0xffffffff
cmp eax, esi
jne 0x513095
mov ecx, dword [esp + 0x14]
neg ecx
sbb ecx, ecx
test ecx, fcn.00491f48
je 0x513095
lea eax, [esp + 0x14]
jmp 0x512e80
push dword [esp + 0x20]
lea ecx, [esp + 0x44]
push ecx
push eax
lea eax, [esp + 0x20]
call fcn.00512171
add esp, 0xc
cmp eax, esi
jne 0x5130c7
mov eax, dword [esp + 0x14]
neg eax
sbb eax, eax
test eax, fcn.00491f48
je 0x5130c7
lea eax, [esp + 0x14]
jmp 0x512e80
cmp ebx, esi
jne 0x5130d7
call fcn.00524420
mov ecx, 0x2719
jmp 0x513114
xor esi, esi
push esi
call edi
push esi
push esi
push ebx
mov dword [esp + 0x38], esi
call dword [sym.imp.WS2_32.dll_accept]
mov ebx, eax
call fcn.00524420
mov edi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp ebx, 0xffffffff
mov ecx, eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], edi
jne 0x51310b
or esi, ebx
jmp 0x51311c
call fcn.00524420
mov ecx, esi
mov esi, ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x20], esi
mov byte [esp + 0x60], 2
cmp esi, 0xffffffff
jne 0x51313f
neg ecx
sbb ecx, ecx
test ecx, fcn.00491f48
je 0x51313f
lea eax, [esp + 0x14]
jmp 0x512e80
mov ebx, dword [esp + 0x34]
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x17]
push eax
xor edi, edi
inc edi
push ebx
lea eax, [esp + 0x20]
mov dword [esp + 0x34], edi
mov byte [esp + 0x1f], 0
call fcn.00513385
add esp, 0xc
test eax, eax
je 0x513182
mov eax, dword [esp + 0x14]
neg eax
sbb eax, eax
test eax, fcn.00491f48
je 0x513182
lea eax, [esp + 0x14]
jmp 0x512e80
lea eax, [esp + 0x24]
push eax
push edi
push 6
push ebx
lea ecx, [esp + 0x24]
lea eax, [esp + 0x23]
mov dword [esp + 0x34], edi
call fcn.005133f1
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x27]
push eax
push esi
lea eax, [esp + 0x30]
mov dword [esp + 0x44], edi
mov byte [esp + 0x2f], 0
call fcn.00513385
add esp, 0x1c
test eax, eax
je 0x5131d8
mov eax, dword [esp + 0x14]
neg eax
sbb eax, eax
test eax, fcn.00491f48
je 0x5131d8
lea eax, [esp + 0x14]
jmp 0x512e80
lea eax, [esp + 0x24]
push eax
push edi
push 6
push esi
lea ecx, [esp + 0x24]
lea eax, [esp + 0x23]
mov dword [esp + 0x34], edi
call fcn.005133f1
mov edi, dword [esp + 0x4c]
or dword [esp + 0x30], 0xffffffff
or dword [esp + 0x2c], 0xffffffff
add esp, 0x10
mov dword [edi], esi
mov dword [edi + 4], ebx
mov byte [esp + 0x60], 1
lea esi, [esp + 0x20]
call fcn.005132c1
mov byte [esp + 0x60], 0
lea esi, [esp + 0x1c]
call fcn.005132c1
or dword [esp + 0x60], 0xffffffff
lea esi, [esp + 0x38]
call fcn.005132c1
mov eax, edi
mov ecx, dword [esp + 0x58]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.00536476
mov esp, ebp
pop ebp
ret 4