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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x624
mov eax, dword [0x59e080]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
or dword [ebp - 0x608], 0xffffffff
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 0x2e
mov dword [ebp - 0x620], eax
lea eax, [ebp - 0x33]
mov edi, dword [esi + 0xc]
push 0
push eax
mov byte [ebp - 0x34], 0
call fcn.0055e280
mov ebx, dword [esi + 0x55c]
xor ecx, ecx
add esp, 0xc
mov dword [ebp - 0x60c], ecx
mov dword [ebp - 0x624], ecx
mov dword [ebp - 0x614], ecx
mov dword [ebp - 0x618], ecx
mov byte [ebp - 0x5fd], 1
mov dword [ebp - 0x604], ecx
test ebx, ebx
je 0x549142
push ebx
call fcn.0056c2b0
pop ecx
cmp eax, 1
jbe 0x54913a
push ebx
call fcn.0056c2b0
pop ecx
push 0x16
pop ecx
cmp eax, ecx
jb 0x548f76
push ebx
call fcn.0056c2b0
pop ecx
mov ecx, eax
lea eax, [ecx + 1]
push 1
push eax
call dword [0x59e148]
mov dword [ebp - 0x604], eax
pop ecx
pop ecx
test eax, eax
jne 0x548f95
push 0x1b
jmp 0x5496c3
cmp byte [ebx], 0x3a
jne 0x548fa4
mov eax, ebx
mov ebx, dword [ebp - 0x604]
jmp 0x548fd7
push 0x3a
push ebx
call fcn.00560a70
mov dword [ebp - 0x610], eax
pop ecx
pop ecx
test eax, eax
je 0x54903c
mov ecx, eax
sub ecx, ebx
push ecx
push ebx
mov ebx, dword [ebp - 0x604]
push ebx
call fcn.0056eb90
mov eax, dword [ebp - 0x610]
add esp, 0xc
push 0x3a
push eax
call fcn.00560a70
mov dword [ebp - 0x610], eax
pop ecx
pop ecx
test eax, eax
je 0x54904b
push 0xa
lea ecx, [eax + 1]
push 0
push ecx
call fcn.00563411
push eax
call fcn.0052ec19
push 0x2d
push dword [ebp - 0x610]
movzx eax, ax
mov dword [ebp - 0x614], eax
call fcn.00560a70
add esp, 0x18
test eax, eax
je 0x549034
push 0xa
inc eax
push 0
push eax
call fcn.00563411
push eax
call fcn.0052ec19
add esp, 0x10
movzx edx, ax
jmp 0x549051
mov eax, dword [ebp - 0x614]
jmp 0x54902f
push ebx
mov ebx, dword [ebp - 0x604]
push ebx
call fcn.0056e530
pop ecx
pop ecx
mov edx, dword [ebp - 0x618]
xor ecx, ecx
movzx eax, dx
cmp word [ebp - 0x614], dx
cmovbe ecx, eax
movzx eax, cx
xor ecx, ecx
cmp word [ebp - 0x614], dx
mov dword [ebp - 0x604], eax
mov eax, dword [ebp - 0x614]
movzx eax, ax
cmovbe ecx, eax
cmp byte [ebx], 0
movzx eax, cx
mov dword [ebp - 0x610], eax
je 0x549120
push 0x401
lea eax, [ebp - 0x57c]
push eax
mov eax, dword [edi + 0x48]
push ebx
push dword [edi + 0x54]
push dword [eax + 0x18]
call fcn.00420e10
pop ecx
push eax
mov eax, dword [edi + 0x48]
push dword [eax + 4]
call fcn.00420e10
add esp, 0x18
sub eax, 0
je 0x5490dc
sub eax, 1
je 0x5496c1
sub eax, 1
jne 0x5490e0
lea ecx, [ebp - 0x57c]
mov dword [ebp - 0x60c], ecx
jmp 0x5490e6
mov ecx, ebx
jmp 0x5490d4
mov ecx, dword [ebp - 0x60c]
mov edx, dword [ebp - 0x610]
movzx eax, dx
mov dword [ebp - 0x610], eax
movzx eax, dx
mov edx, dword [ebp - 0x604]
mov dword [ebp - 0x614], eax
movzx eax, dx
mov dword [ebp - 0x610], eax
movzx eax, dx
mov dword [ebp - 0x618], eax
test ecx, ecx
jne 0x5491de
jmp 0x549144
mov edx, dword [ebp - 0x604]
movzx eax, ax
mov dword [ebp - 0x614], eax
movzx eax, dx
mov dword [ebp - 0x618], eax
jmp 0x549144
mov ebx, dword [ebp - 0x604]
jmp 0x549144
mov ebx, ecx
lea eax, [ebp - 0x61c]
mov dword [ebp - 0x61c], 0x80
push eax
lea eax, [ebp - 0x5fc]
push eax
push dword [edi + 0x148]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x54919f
push 0x100
lea eax, [ebp - 0x178]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0053cedc
push eax
push str.getsockname___failed:__s
push esi
call fcn.0052cc10
push ebx
call dword [0x59e13c]
add esp, 0x1c
jmp 0x5496c1
push 0x401
lea eax, [ebp - 0x57c]
push eax
lea eax, [ebp - 0x5f8]
push eax
movzx eax, word [ebp - 0x5fc]
push eax
call fcn.0055395d
add esp, 0x10
test eax, eax
je 0x5496c1
lea ecx, [ebp - 0x57c]
xor al, al
mov dword [ebp - 0x60c], ecx
mov byte [ebp - 0x5fd], al
lea eax, [ebp - 0x624]
push eax
push 0
push 0
push ecx
push esi
call fcn.005316fb
add esp, 0x14
cmp eax, 1
jne 0x549207
lea eax, [ebp - 0x624]
push eax
push esi
call fcn.005250b3
pop ecx
pop ecx
mov ecx, dword [ebp - 0x624]
test ecx, ecx
je 0x5496a5
mov eax, dword [ecx]
push ecx
push esi
mov dword [ebp - 0x604], eax
call fcn.00531956
cmp dword [ebp - 0x604], 0
pop ecx
pop ecx
je 0x5496a5
push ebx
call dword [0x59e13c]
or dword [ebp - 0x608], 0xffffffff
mov eax, dword [ebp - 0x604]
pop ecx
lea ecx, [ebp - 0x608]
push ecx
push 0
push eax
push esi
call fcn.0052de42
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x5492a2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov eax, dword [ebp - 0x604]
mov eax, dword [eax + 0x1c]
mov dword [ebp - 0x604], eax
test eax, eax
jne 0x549248
push 0x100
lea eax, [ebp - 0x178]
push eax
push ecx
call fcn.0053cedc
push eax
push str.socket_failure:__s
push esi
call fcn.0052cc10
add esp, 0x18
jmp 0x5496c1
mov eax, dword [ebp - 0x604]
push dword [eax + 0x10]
push dword [eax + 0x18]
lea eax, [ebp - 0x5fc]
push eax
call fcn.0055dd00
mov eax, dword [ebp - 0x604]
add esp, 0xc
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x61c], eax
mov eax, dword [ebp - 0x614]
movzx ecx, ax
mov dword [ebp - 0x60c], ecx
cmp ax, word [ebp - 0x618]
ja 0x549688
push 2
pop edx
movzx eax, cx
mov dword [ebp - 0x610], eax
cmp word [ebp - 0x5fc], dx
jne 0x54930b
push ecx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x5fa], ax
push dword [ebp - 0x61c]
lea eax, [ebp - 0x5fc]
push eax
push dword [ebp - 0x608]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x54944d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dl, byte [ebp - 0x5fd]
test dl, dl
je 0x5493b4
mov ecx, 0x2741
cmp eax, ecx
jne 0x5493b4
push 0x100
lea eax, [ebp - 0x178]
push eax
push ecx
call fcn.0053cedc
push eax
mov eax, dword [ebp - 0x60c]
movzx eax, ax
push eax
push str.bind_port_hu__on_non_local_address_failed:__s
push esi
call fcn.0052ccc0
add esp, 0x1c
mov dword [ebp - 0x61c], 0x80
lea eax, [ebp - 0x61c]
push eax
lea eax, [ebp - 0x5fc]
push eax
push dword [edi + 0x148]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x5493d7
mov eax, dword [ebp - 0x614]
movzx ecx, ax
xor al, al
mov dword [ebp - 0x60c], ecx
mov byte [ebp - 0x5fd], al
jmp 0x5492e8
cmp eax, 0x2740
je 0x5493c0
cmp eax, 0xd
jne 0x549410
mov eax, dword [ebp - 0x60c]
inc eax
mov byte [ebp - 0x5fd], dl
movzx eax, ax
mov ecx, eax
jmp 0x5492d5
push 0x100
lea eax, [ebp - 0x178]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0053cedc
push eax
push str.getsockname___failed:__s
push esi
call fcn.0052cc10
push dword [ebp - 0x608]
push edi
push esi
call fcn.0052d372
add esp, 0x24
jmp 0x5496c1
push 0x100
lea ecx, [ebp - 0x178]
push ecx
push eax
call fcn.0053cedc
push eax
mov eax, dword [ebp - 0x60c]
movzx eax, ax
push eax
push str.bind_port_hu__failed:__s
push esi
call fcn.0052cc10
push dword [ebp - 0x608]
push edi
push esi
call fcn.0052d372
add esp, 0x28
jmp 0x5496c1
mov eax, dword [ebp - 0x610]
cmp ax, word [ebp - 0x618]
ja 0x549688
lea eax, [ebp - 0x61c]
mov dword [ebp - 0x61c], 0x80
push eax
lea eax, [ebp - 0x5fc]
push eax
push dword [ebp - 0x608]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x5493d7
push 1
push dword [ebp - 0x608]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x5494c1
push 0x100
lea eax, [ebp - 0x178]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0053cedc
push eax
push str.socket_failure:__s
jmp 0x5493f5
push 0x2f
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x604]
call fcn.005316ce
mov edx, dword [ebp - 0x620]
add esp, 0xc
push 2
pop eax
cmp edx, eax
je 0x54965b
mov cx, word [ebp - 0x5fc]
cmp byte [edi + 0x26c], 0
jne 0x5494fa
test edx, edx
je 0x54953f
cmp edx, 1
jne 0x549504
cmp cx, ax
jne 0x54953f
movzx eax, cx
dec eax
sub eax, 1
jne 0x54953c
push dword [ebp - 0x5fa]
call dword [sym.imp.WS2_32.dll_ntohs]
mov edx, dword [ebp - 0x620]
movzx eax, ax
mov dword [ebp - 0x60c], eax
test edx, edx
je 0x5495e4
cmp edx, 1
je 0x54954f
mov cx, word [ebp - 0x5fc]
push 2
pop eax
inc edx
mov dword [ebp - 0x620], edx
cmp edx, eax
jne 0x5494ed
jmp 0x54965b
lea edx, [ebp - 0x78]
lea ebx, [ebp - 0x34]
mov cl, byte [ebx]
test cl, cl
je 0x54957a
cmp cl, 0x2e
movzx eax, cl
mov dword [ebp - 0x610], 0x2c
cmove eax, dword [ebp - 0x610]
mov byte [edx], al
inc edx
add ebx, 1
jne 0x549555
mov eax, dword [ebp - 0x60c]
movzx ecx, ax
movzx eax, cl
push eax
shr ecx, 8
push ecx
push str.__d__d
push 0x14
push edx
mov byte [edx], 0
call fcn.0053b624
lea eax, [ebp - 0x78]
push eax
push str.PORT
push 0x58beb8
lea eax, [edi + 0x438]
push eax
push esi
call fcn.0055a54c
mov ebx, eax
add esp, 0x28
test ebx, ebx
je 0x549655
push ebx
call fcn.0053d040
push eax
push str.Failure_sending_PORT_command:__s
push esi
call fcn.0052cc10
push dword [ebp - 0x608]
push edi
push esi
call fcn.0052d372
jmp 0x549646
movzx eax, ax
push eax
lea eax, [ebp - 0x34]
push eax
push 2
pop ecx
xor eax, eax
cmp word [ebp - 0x5fc], cx
setne al
inc eax
push eax
push str.EPRT
push str._s__d_s_hu
lea eax, [edi + 0x438]
push eax
push esi
call fcn.0055a54c
mov ebx, eax
add esp, 0x1c
test ebx, ebx
je 0x549655
push ebx
call fcn.0053d040
push eax
push str.Failure_sending_EPRT_command:__s
push esi
call fcn.0052cc10
push dword [ebp - 0x608]
push edi
push esi
call fcn.0052d372
mov dword [edi + 0x4b0], 1
push 0
push esi
call fcn.00546f55
add esp, 0x24
mov eax, ebx
jmp 0x5496c4
mov edx, dword [ebp - 0x620]
push edi
push esi
mov dword [edi + 0x4b0], edx
call fcn.00546f69
mov eax, dword [ebp - 0x608]
push 0x1c
push esi
mov dword [edi + 0x14c], eax
mov byte [edi + 0x255], 1
call fcn.00546f55
add esp, 0x10
jmp 0x549651
push str.bind___failed__we_ran_out_of_ports_
push esi
call fcn.0052cc10
push dword [ebp - 0x608]
push edi
push esi
call fcn.0052d372
add esp, 0x14
jmp 0x5496c1
mov eax, dword [ebp - 0x60c]
push eax
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push esi
call fcn.0052cc10
push ebx
call dword [0x59e13c]
add esp, 0x10
push 0x1e
pop eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0051bf16
leave
ret