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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa4c
mov eax, dword [0x65e374]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0xa44], edx
push 0x100
lea eax, [ebp - 0x108]
mov dword [ebp - 0xa4c], esi
push 0
mov ebx, dword [esi]
push eax
mov dword [ebp - 0xa30], ebx
call fcn.005d05b0
mov edi, dword [ebx + 0x558]
add esp, 0xc
xor ebx, ebx
mov dword [ebp - 0xa34], 0
mov dword [ebp - 0xa3c], 0
mov dword [ebp - 0xa40], 0
mov byte [ebp - 0xa29], 1
mov dword [ebp - 0xa38], ebx
test edi, edi
je 0x56e919
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x56e7b2
sub ecx, edx
cmp ecx, 1
jbe 0x56e919
mov ecx, edi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x56e7d0
sub ecx, edx
cmp ecx, 0x16
jae 0x56e7e5
mov ecx, 0x16
jmp 0x56e7f9
mov ecx, edi
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x56e7f0
sub ecx, edx
lea eax, [ecx + 1]
push 1
push eax
call dword [0x65edf0]
mov ebx, eax
add esp, 8
mov dword [ebp - 0xa38], ebx
test ebx, ebx
jne 0x56e828
lea eax, [ebx + 0x1b]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret
cmp byte [edi], 0x3a
je 0x56e857
push 0x3a
push edi
call fcn.005cf910
add esp, 8
mov dword [ebp - 0xa48], eax
test eax, eax
je 0x56e8be
mov ecx, eax
sub ecx, edi
push ecx
push edi
push ebx
call fcn.005e1910
mov edi, dword [ebp - 0xa48]
add esp, 0xc
test edi, edi
je 0x56e8cf
push 0x3a
push edi
call fcn.005cf910
mov edi, eax
add esp, 8
test edi, edi
je 0x56e8cf
push 0xa
lea ecx, [edi + 1]
push 0
push ecx
call fcn.005d90cd
add esp, 0xc
movzx eax, ax
mov dword [ebp - 0xa3c], eax
push 0x2d
push edi
call fcn.005cf910
add esp, 8
test eax, eax
je 0x56e8ad
push 0xa
inc eax
push 0
push eax
call fcn.005d90cd
movzx ecx, ax
add esp, 0xc
mov dword [ebp - 0xa40], ecx
jmp 0x56e8cf
mov eax, dword [ebp - 0xa3c]
movzx ecx, ax
mov dword [ebp - 0xa40], ecx
jmp 0x56e8cf
mov ecx, ebx
sub ecx, edi
mov al, byte [edi]
lea edi, [edi + 1]
mov byte [ecx + edi - 1], al
test al, al
jne 0x56e8c2
mov edi, dword [ebp - 0xa40]
xor ecx, ecx
cmp word [ebp - 0xa3c], di
movzx eax, di
cmovbe ecx, eax
mov eax, dword [ebp - 0xa3c]
movzx edx, cx
xor ecx, ecx
cmp word [ebp - 0xa3c], di
movzx eax, ax
cmovbe ecx, eax
cmp byte [ebx], 0
movzx eax, cx
mov dword [ebp - 0xa3c], eax
mov eax, edx
mov dword [ebp - 0xa40], eax
je 0x56e919
mov edi, ebx
jmp 0x56e999
lea eax, [ebp - 0x914]
mov dword [ebp - 0x914], 0x80
push eax
lea eax, [ebp - 0x998]
push eax
push dword [esi + 0x1a8]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x56e96a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, esi
call fcn.0053fb90
push eax
push str.getsockname___failed:__s
push dword [ebp - 0xa30]
call fcn.00543790
add esp, 0xc
push ebx
jmp 0x56ef95
movzx ecx, word [ebp - 0x998]
lea eax, [ebp - 0x910]
push 0x401
push eax
lea edx, [ebp - 0x994]
call fcn.0055d670
add esp, 8
lea edi, [ebp - 0x910]
xor cl, cl
mov byte [ebp - 0xa29], cl
lea eax, [ebp - 0xa34]
mov edx, edi
push eax
push 0
mov ecx, esi
call fcn.005467c0
add esp, 8
cmp eax, 1
jne 0x56e9c0
lea edx, [ebp - 0xa34]
mov ecx, esi
call fcn.005514c0
mov edx, dword [ebp - 0xa34]
test edx, edx
je 0x56ef7b
mov ecx, dword [ebp - 0xa30]
mov ebx, dword [edx]
call fcn.00546940
test ebx, ebx
je 0x56ef7b
push dword [ebp - 0xa38]
call dword [0x65ede8]
add esp, 4
mov eax, dword [ebx + 4]
mov edi, dword [esi]
mov dword [ebp - 0xa28], eax
mov eax, dword [esi + 0x94]
cmp eax, 2
mov dword [ebp - 0xa24], eax
mov eax, 0x11
je 0x56ea16
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0xa20], eax
mov eax, dword [ebx + 0x10]
mov dword [ebp - 0xa1c], eax
cmp eax, 0x80
jbe 0x56ea3b
mov dword [ebp - 0xa1c], 0x80
mov eax, 0x80
push eax
push dword [ebx + 0x18]
lea eax, [ebp - 0xa18]
push eax
call fcn.005cfab0
mov eax, dword [edi + 0x1e0]
add esp, 0xc
test eax, eax
je 0x56ea6e
lea ecx, [ebp - 0xa28]
push ecx
push 0
push dword [edi + 0x1e4]
call eax
add esp, 0xc
jmp 0x56ea86
push dword [ebp - 0xa20]
push dword [ebp - 0xa24]
push dword [ebp - 0xa28]
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
jne 0x56eac0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, dword [ebx + 0x1c]
test ebx, ebx
jne 0x56e9f2
mov edx, eax
mov ecx, esi
call fcn.0053fb90
push eax
push str.socket_failure:__s
push dword [ebp - 0xa30]
call fcn.00543790
add esp, 0xc
jmp 0x56ef9e
push dword [ebx + 0x10]
lea eax, [ebp - 0x998]
mov dword [ebp - 0xa34], 0
push dword [ebx + 0x18]
push eax
call fcn.005cfab0
mov eax, dword [ebx + 0x10]
add esp, 0xc
mov ecx, dword [ebp - 0xa3c]
mov dword [ebp - 0x914], eax
movzx eax, cx
mov dword [ebp - 0xa38], eax
cmp cx, word [ebp - 0xa40]
ja 0x56ebde
cmp word [ebp - 0x998], 2
jne 0x56eb1c
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x996], ax
push dword [ebp - 0x914]
lea eax, [ebp - 0x998]
push eax
push edi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x56ec92
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [ebp - 0xa29], 0
je 0x56ebb4
cmp eax, 0x2741
jne 0x56ebb4
mov edx, eax
mov ecx, esi
call fcn.0053fb90
push eax
mov eax, dword [ebp - 0xa38]
movzx eax, ax
push eax
push str.bind_port_hu__on_non_local_address_failed:__s_n
push dword [ebp - 0xa30]
call fcn.00543710
add esp, 0x10
mov dword [ebp - 0x914], 0x80
lea eax, [ebp - 0x914]
push eax
lea eax, [ebp - 0x998]
push eax
push dword [esi + 0x1a8]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x56ec2c
mov eax, dword [ebp - 0xa3c]
xor cl, cl
movzx eax, ax
mov byte [ebp - 0xa29], cl
jmp 0x56ebcb
cmp eax, 0x2740
je 0x56ebc4
cmp eax, 0xd
jne 0x56ec5d
mov eax, dword [ebp - 0xa38]
inc eax
mov dword [ebp - 0xa38], eax
cmp ax, word [ebp - 0xa40]
jbe 0x56eb04
push str.bind___failed__we_ran_out_of_ports_
push dword [ebp - 0xa30]
call fcn.00543790
add esp, 8
cmp dword [esi + 0x40], 0
je 0x56ec17
cmp edi, dword [esi + 0x1ac]
jne 0x56ef64
cmp byte [esi + 0x1b9], 0
je 0x56ef64
mov byte [esi + 0x1b9], 0
mov edx, edi
mov ecx, esi
call fcn.005429c0
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x56ef9e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, esi
call fcn.0053fb90
push eax
push str.getsockname___failed:__s
push dword [ebp - 0xa30]
call fcn.00543790
add esp, 0xc
mov edx, edi
mov ecx, esi
call fcn.00545c60
jmp 0x56ef9e
mov edx, eax
mov ecx, esi
call fcn.0053fb90
push eax
mov eax, dword [ebp - 0xa38]
movzx eax, ax
push eax
push str.bind_port_hu__failed:__s
push dword [ebp - 0xa30]
call fcn.00543790
add esp, 0x10
mov edx, edi
mov ecx, esi
call fcn.00545c60
jmp 0x56ef9e
mov eax, dword [ebp - 0xa38]
cmp ax, word [ebp - 0xa40]
ja 0x56ebde
lea eax, [ebp - 0x914]
mov dword [ebp - 0x914], 0x80
push eax
lea eax, [ebp - 0x998]
push eax
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x56ecf0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, esi
call fcn.0053fb90
push eax
push str.getsockname___failed:__s
push dword [ebp - 0xa30]
call fcn.00543790
add esp, 0xc
jmp 0x56ebf1
push 1
push edi
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x56ed25
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, esi
call fcn.0053fb90
push eax
push str.socket_failure:__s
push dword [ebp - 0xa30]
call fcn.00543790
add esp, 0xc
jmp 0x56ebf1
mov eax, dword [ebx + 4]
sub eax, 2
jne 0x56ed4c
mov edx, dword [ebx + 0x18]
lea eax, [ebp - 0x108]
push 0x100
push eax
add edx, 4
mov ecx, 2
call fcn.0055d670
add esp, 8
mov ebx, dword [ebp - 0xa44]
cmp ebx, 2
je 0x56edaf
mov cx, word [ebp - 0x998]
nop
cmp byte [esi + 0x279], 0
jne 0x56ed6d
test ebx, ebx
je 0x56eda9
cmp ebx, 1
jne 0x56ed78
cmp cx, 2
jne 0x56eda9
movzx eax, cx
sub eax, 2
jne 0x56eda9
push dword [ebp - 0x996]
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
mov dword [ebp - 0xa44], eax
test ebx, ebx
je 0x56eed2
cmp ebx, 1
je 0x56edf5
mov cx, word [ebp - 0x998]
inc ebx
cmp ebx, 2
jne 0x56ed60
mov dword [esi + 0x4dc], ebx
mov edx, dword [esi + 0x1ac]
cmp edx, 0xffffffff
je 0x56edc7
mov ecx, esi
call fcn.00545c60
mov eax, dword [ebp - 0xa34]
mov dword [esi + 0x1ac], edi
mov byte [esi + 0x272], 1
mov dword [esi + 0x4e8], 0x1c
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x108]
mov esi, 0x2c
lea edx, [ebp - 0x508]
mov dword [ebp - 0xa34], eax
nop dword [eax]
mov cl, byte [eax]
test cl, cl
je 0x56ee33
cmp cl, 0x2e
movzx eax, cl
cmove eax, esi
mov byte [edx], al
inc edx
mov eax, dword [ebp - 0xa34]
add eax, 1
mov dword [ebp - 0xa34], eax
jne 0x56ee10
mov eax, dword [ebp - 0xa44]
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 sym.PayClient.exe_curl_msnprintf
mov esi, dword [ebp - 0xa4c]
lea eax, [ebp - 0x508]
add esp, 0x14
push eax
push str.PORT
lea eax, [esi + 0x470]
push 0x63d31c
push eax
call fcn.005784b0
add esp, 0x10
mov dword [ebp - 0xa34], eax
test eax, eax
je 0x56edaf
push eax
call sym.PayClient.exe_curl_easy_strerror
add esp, 4
push eax
push str.Failure_sending_PORT_command:__s
push dword [ebp - 0xa30]
call fcn.00543790
add esp, 0xc
mov edx, edi
mov ecx, esi
call fcn.00545c60
mov eax, dword [ebp - 0xa34]
mov dword [esi + 0x4e8], 0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret
movzx eax, ax
push eax
lea eax, [ebp - 0x108]
push eax
xor eax, eax
cmp word [ebp - 0x998], 2
setne al
inc eax
push eax
push str.EPRT
lea eax, [esi + 0x470]
push str._s__d_s_hu
push eax
call fcn.005784b0
add esp, 0x18
mov dword [ebp - 0xa34], eax
test eax, eax
je 0x56edaf
push eax
call sym.PayClient.exe_curl_easy_strerror
add esp, 4
push eax
push str.Failure_sending_EPRT_command:__s
push dword [ebp - 0xa30]
call fcn.00543790
add esp, 0xc
mov edx, edi
mov ecx, esi
call fcn.00545c60
mov eax, dword [ebp - 0xa34]
mov dword [esi + 0x4dc], 1
mov dword [esi + 0x4e8], 0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret
mov edx, edi
mov ecx, esi
call fcn.005429c0
mov eax, dword [esi + 0x40]
push edi
push dword [esi + 0x44]
call eax
add esp, 8
jmp 0x56ef9e
push edi
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push dword [ebp - 0xa30]
call fcn.00543790
add esp, 0xc
push dword [ebp - 0xa38]
call dword [0x65ede8]
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, 0x1e
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005b8427
mov esp, ebp
pop ebp
ret