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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x9b4
mov eax, dword [0x5ca1c8]
xor eax, esp
mov dword [esp + 0x9b0], eax
push ebx
push esi
push edi
mov esi, ecx
mov dword [esp + 0x28], edx
push 0xff
lea eax, [esp + 0xb5]
mov byte [esp + 0xb4], 0
push 0
mov ebx, dword [esi]
push eax
mov dword [esp + 0x18], ebx
call sub.MSVCR120.dll_memset
mov ebx, dword [ebx + 0x364]
xor eax, eax
add esp, 0xc
mov dword [esp + 0x10], eax
mov dword [esp + 0x24], eax
mov edi, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x2c], 1
test ebx, ebx
je 0x524ad1
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x5249c0
sub ecx, edx
cmp ecx, 1
jbe 0x524ad1
mov edx, ebx
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x5249d7
sub edx, ecx
push 0x16
pop ecx
cmp edx, ecx
jb 0x5249f5
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x5249ec
sub ecx, edx
lea eax, [ecx + 1]
push 1
push eax
call dword [0x5cdc48]
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x524a10
push 0x1b
jmp 0x524f6c
cmp byte [ebx], 0x3a
jne 0x524a19
mov ecx, ebx
jmp 0x524a50
push 0x3a
push ebx
call dword [sym.imp.MSVCR120.dll_strchr]
pop ecx
pop ecx
mov ecx, eax
mov dword [esp + 0x20], ecx
test ecx, ecx
je 0x524a42
sub ecx, ebx
push ecx
push ebx
push edi
call dword [sym.imp.MSVCR120.dll_strncpy]
mov ecx, dword [esp + 0x2c]
add esp, 0xc
jmp 0x524a50
mov edx, edi
sub edx, ebx
mov al, byte [ebx]
mov byte [edx + ebx], al
inc ebx
test al, al
jne 0x524a46
test ecx, ecx
je 0x524abe
push 0x3a
push ecx
call dword [sym.imp.MSVCR120.dll_strchr]
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
je 0x524abe
push 0xa
lea ecx, [ebx + 1]
push 0
push ecx
call dword [sym.imp.MSVCR120.dll_strtoul]
add esp, 0xc
movzx eax, ax
mov dword [esp + 0x24], eax
push 0x2d
push ebx
call dword [sym.imp.MSVCR120.dll_strchr]
pop ecx
pop ecx
test eax, eax
je 0x524aa4
push 0xa
inc eax
push 0
push eax
call dword [sym.imp.MSVCR120.dll_strtoul]
movzx ecx, ax
add esp, 0xc
mov eax, dword [esp + 0x24]
jmp 0x524aab
mov eax, dword [esp + 0x24]
movzx ecx, ax
mov dword [esp + 0x1c], ecx
cmp ax, cx
jbe 0x524abe
and dword [esp + 0x1c], 0
and dword [esp + 0x24], 0
xor eax, eax
cmp byte [edi], al
cmovne eax, edi
mov dword [esp + 0x14], eax
test eax, eax
jne 0x524b56
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x80
push eax
lea eax, [esp + 0x34]
push eax
push dword [esi + 0x130]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x524b29
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, esi
call fcn.0052af26
push eax
push str.getsockname___failed:__s
push dword [esp + 0x14]
call fcn.005129bc
add esp, 0xc
test edi, edi
je 0x524f6a
push edi
call dword [0x5cdc40]
pop ecx
jmp 0x524f6a
movzx ecx, word [esp + 0x30]
lea eax, [esp + 0x5b0]
push 0x401
push eax
lea edx, [esp + 0x3c]
call fcn.0052a840
and dword [esp + 0x34], 0
lea eax, [esp + 0x5b8]
pop ecx
pop ecx
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x10]
mov edx, eax
push ecx
push 0
mov ecx, esi
call fcn.00511ff6
pop ecx
pop ecx
cmp eax, 1
jne 0x524b78
lea edx, [esp + 0x10]
mov ecx, esi
call fcn.005126cf
mov edx, dword [esp + 0x10]
test edx, edx
je 0x524b8d
mov ecx, dword [esp + 0xc]
mov ebx, dword [edx]
call fcn.00512155
jmp 0x524b8f
xor ebx, ebx
test ebx, ebx
jne 0x524ba1
push dword [esp + 0x14]
push str.failed_to_resolve_the_address_provided_to_PORT:__s
jmp 0x524b08
test edi, edi
je 0x524bad
push edi
call dword [0x5cdc40]
pop ecx
or dword [esp + 0x14], 0xffffffff
xor edi, edi
lea eax, [esp + 0x14]
mov edx, ebx
push eax
push 0
mov ecx, esi
call fcn.00511d06
mov dword [esp + 0x28], eax
pop ecx
pop ecx
test eax, eax
je 0x524bdd
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, dword [ebx + 0x1c]
mov edi, eax
test ebx, ebx
jne 0x524bb4
test ebx, ebx
jne 0x524c01
mov edx, edi
mov ecx, esi
call fcn.0052af26
push eax
push str.socket_failure:__s
push dword [esp + 0x14]
call fcn.005129bc
add esp, 0xc
jmp 0x524f6a
push dword [ebx + 0x10]
lea eax, [esp + 0x34]
push dword [ebx + 0x18]
push eax
call sub.MSVCR120.dll_memcpy
mov eax, dword [ebx + 0x10]
add esp, 0xc
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
cmp dx, cx
mov edi, dword [esp + 0x14]
mov dword [esp + 0x18], eax
movzx eax, dx
mov dword [esp + 0x10], eax
ja 0x524f51
push 2
pop ecx
cmp word [esp + 0x30], cx
jne 0x524c4d
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x32], ax
push dword [esp + 0x18]
lea eax, [esp + 0x34]
push eax
push edi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x524d39
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp dword [esp + 0x2c], 0
je 0x524cce
mov ecx, 0x2741
cmp eax, ecx
jne 0x524cce
mov edx, ecx
mov ecx, esi
call fcn.0052af26
push eax
mov eax, dword [esp + 0x14]
movzx eax, ax
push eax
push str.bind_port_hu__on_non_local_address_failed:__s_n
push dword [esp + 0x18]
call fcn.00512948
add esp, 0x10
mov dword [esp + 0x18], 0x80
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x34]
push eax
push dword [esi + 0x130]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x524ceb
mov eax, dword [esp + 0x24]
and dword [esp + 0x2c], 0
movzx eax, ax
jmp 0x524cdf
cmp eax, 0x2740
je 0x524cda
cmp eax, 0xd
jne 0x524d11
mov eax, dword [esp + 0x10]
inc eax
mov ecx, dword [esp + 0x1c]
cmp ax, cx
jmp 0x524c2d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, esi
call fcn.0052af26
push eax
push str.getsockname___failed:__s
push dword [esp + 0x14]
call fcn.005129bc
add esp, 0xc
jmp 0x524f61
mov edx, eax
mov ecx, esi
call fcn.0052af26
push eax
mov eax, dword [esp + 0x14]
movzx eax, ax
push eax
push str.bind_port_hu__failed:__s
push dword [esp + 0x18]
call fcn.005129bc
add esp, 0x10
jmp 0x524f61
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
cmp ax, cx
ja 0x524f51
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x80
push eax
lea eax, [esp + 0x34]
push eax
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x524ceb
push 1
push edi
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x524d8e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, esi
call fcn.0052af26
push eax
push str.socket_failure:__s
jmp 0x524d00
push 0x100
lea edx, [esp + 0xb4]
mov ecx, ebx
call fcn.00511db1
mov ebx, dword [esp + 0x2c]
pop ecx
push 2
pop edx
cmp ebx, edx
je 0x524dff
mov cx, word [esp + 0x30]
cmp dword [esi + 0x204], 0
jne 0x524dbf
test ebx, ebx
je 0x524df6
cmp ebx, 1
jne 0x524dc9
cmp cx, dx
jne 0x524df6
movzx eax, cx
sub eax, edx
jne 0x524df6
push dword [esp + 0x32]
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
mov dword [esp + 0x14], eax
test ebx, ebx
je 0x524edc
cmp ebx, 1
je 0x524e3e
mov cx, word [esp + 0x30]
push 2
pop edx
inc ebx
mov dword [esp + 0x28], ebx
cmp ebx, edx
jne 0x524db2
mov ebx, dword [esp + 0x20]
mov edx, dword [esp + 0x28]
mov dword [esi + 0x458], edx
mov edx, dword [esi + 0x134]
cmp edx, 0xffffffff
je 0x524e1f
mov ecx, esi
call fcn.00511cd2
mov dword [esi + 0x134], edi
mov dword [esi + 0x1e8], 1
mov dword [esi + 0x464], 0x1c
jmp 0x524f4d
lea edx, [esp + 0x1b0]
lea ebx, [esp + 0xb0]
mov cl, byte [ebx]
test cl, cl
je 0x524e6b
cmp cl, 0x2e
movzx eax, cl
mov dword [esp + 0x20], 0x2c
cmove eax, dword [esp + 0x20]
mov byte [edx], al
inc edx
inc ebx
jne 0x524e4c
mov eax, dword [esp + 0x14]
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.0051d17e
add esp, 0x14
lea eax, [esp + 0x1b0]
push eax
push str.PORT
lea eax, [esi + 0x3f0]
push str._s__s
push eax
call fcn.0052ffee
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x524e03
mov ecx, ebx
call fcn.0052a868
push eax
push str.Failure_sending_PORT_command:__s
push dword [esp + 0x14]
call fcn.005129bc
add esp, 0xc
mov edx, edi
mov ecx, esi
call fcn.00511cd2
jmp 0x524f46
movzx eax, ax
push eax
lea eax, [esp + 0xb4]
push eax
push 2
pop ecx
xor eax, eax
cmp word [esp + 0x38], cx
setne al
inc eax
push eax
push str.EPRT
lea eax, [esi + 0x3f0]
push str._s__d_s_hu
push eax
call fcn.0052ffee
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x524e03
mov ecx, ebx
call fcn.0052a868
push eax
push str.Failure_sending_EPRT_command:__s
push dword [esp + 0x14]
call fcn.005129bc
add esp, 0xc
mov edx, edi
mov ecx, esi
call fcn.00511cd2
mov dword [esi + 0x458], 1
and dword [esi + 0x464], 0
mov eax, ebx
jmp 0x524f6d
push str.bind___failed__we_ran_out_of_ports_
push dword [esp + 0x10]
call fcn.005129bc
pop ecx
pop ecx
mov edx, edi
mov ecx, esi
call fcn.00511cd2
push 0x1e
pop eax
mov ecx, dword [esp + 0x9bc]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0055fedc
mov esp, ebp
pop ebp
ret