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

Disassembly:
sub esp, 0x9b0
mov eax, dword [0x45e054]
xor eax, esp
mov dword [esp + 0x9ac], eax
push ebx
mov ebx, dword [esp + 0x9bc]
lea eax, [esp + 0xad]
push ebp
push esi
mov esi, dword [esp + 0x9c0]
push edi
push 0xff
push 0
mov ebp, dword [esi]
push eax
mov dword [esp + 0x40], esi
mov dword [esp + 0x24], ebp
mov dword [esp + 0x20], 0xffffffff
mov byte [esp + 0xc4], 0
call sub.MSVCR120.dll_memset
mov ecx, dword [esp + 0x24]
add esp, 0xc
mov edi, dword [ebp + 0x330]
xor ebp, ebp
mov dword [esp + 0x2c], 0
mov dword [esp + 0x24], 0
mov ecx, dword [ecx + 0x330]
mov dword [esp + 0x20], 0
mov byte [esp + 0x13], 1
mov dword [esp + 0x28], ebp
test ecx, ecx
je 0x4367a3
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x436625
sub ecx, edx
cmp ecx, 1
jbe 0x4367a3
mov ecx, edi
lea edx, [ecx + 1]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x436640
sub ecx, edx
cmp ecx, 0x16
jae 0x436655
mov ecx, 0x16
jmp 0x436669
mov ecx, edi
lea edx, [ecx + 1]
lea ebx, [ebx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x436660
sub ecx, edx
lea eax, [ecx + 1]
push 1
push eax
call dword [0x45e010]
mov ebp, eax
add esp, 8
mov dword [esp + 0x28], ebp
test ebp, ebp
jne 0x43668a
lea eax, [ebp + 0x1b]
jmp 0x436c82
cmp byte [edi], 0x3a
mov eax, dword [sym.imp.MSVCR120.dll_strchr]
je 0x4366c1
push 0x3a
push edi
call eax
add esp, 8
mov dword [esp + 0x30], eax
test eax, eax
je 0x43674a
mov ecx, eax
sub ecx, edi
push ecx
push edi
push ebp
call dword [sym.imp.MSVCR120.dll_strncpy]
mov edi, dword [esp + 0x3c]
add esp, 0xc
mov eax, dword [sym.imp.MSVCR120.dll_strchr]
test edi, edi
je 0x43675d
push 0x3a
push edi
call eax
mov edi, eax
add esp, 8
test edi, edi
je 0x43675d
push 0xa
lea ecx, [edi + 1]
push 0
push ecx
call dword [sym.imp.MSVCR120.dll_strtoul]
push eax
call fcn.00421100
movzx eax, ax
push 0x2d
push edi
mov dword [esp + 0x3c], eax
call dword [sym.imp.MSVCR120.dll_strchr]
add esp, 0x18
test eax, eax
je 0x43673d
push 0xa
inc eax
push 0
push eax
call dword [sym.imp.MSVCR120.dll_strtoul]
push eax
call fcn.00421100
mov ecx, dword [esp + 0x34]
add esp, 0x10
movzx eax, ax
mov dword [esp + 0x20], eax
cmp cx, ax
jbe 0x43675d
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
jmp 0x43675d
mov ecx, dword [esp + 0x24]
movzx eax, cx
mov dword [esp + 0x20], eax
jmp 0x43675d
mov ecx, ebp
sub ecx, edi
mov edi, edi
mov al, byte [edi]
lea edi, [edi + 1]
mov byte [ecx + edi - 1], al
test al, al
jne 0x436750
cmp byte [ebp], 0
je 0x4367a3
push 0x401
lea eax, [esp + 0x1bc]
push eax
mov eax, dword [esi + 0x4c]
push ebp
push dword [esi + 0x88]
push dword [eax + 0x18]
call fcn.00422ae0
add esp, 4
push eax
mov eax, dword [esi + 0x4c]
push dword [eax + 4]
call fcn.00422ae0
add esp, 0x18
sub eax, 0
je 0x4367f0
dec eax
je 0x436c7d
dec eax
je 0x436819
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0x80
push eax
lea eax, [esp + 0x3c]
push eax
push dword [esi + 0x168]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4367f4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.0042c120
push eax
push str.getsockname___failed:__s
push dword [esp + 0x28]
call fcn.0041f0e0
push ebp
call dword [0x45e004]
add esp, 0x18
jmp 0x436c7d
mov edi, ebp
jmp 0x436820
push 0x401
lea eax, [esp + 0x1bc]
push eax
lea eax, [esp + 0x44]
push eax
movzx eax, word [esp + 0x44]
push eax
call fcn.0042c950
add esp, 0x10
mov byte [esp + 0x13], 0
lea edi, [esp + 0x1b8]
lea eax, [esp + 0x2c]
push eax
push 0
push edi
push esi
call fcn.00416630
add esp, 0x10
cmp eax, 1
jne 0x436844
lea eax, [esp + 0x2c]
push eax
push esi
call fcn.00415cc0
add esp, 8
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x436c61
mov ebp, dword [eax]
push eax
push dword [esp + 0x1c]
call fcn.004167c0
add esp, 8
test ebp, ebp
je 0x436c61
push dword [esp + 0x28]
call dword [0x45e004]
add esp, 4
mov dword [esp + 0x14], 0xffffffff
xor edi, edi
mov edi, edi
lea eax, [esp + 0x14]
push eax
push 0
push ebp
push esi
call fcn.00420200
add esp, 0x10
mov dword [esp + 0x28], eax
test eax, eax
je 0x4368aa
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, dword [ebp + 0x1c]
mov edi, eax
test ebp, ebp
jne 0x436880
jmp 0x4368ae
test ebp, ebp
jne 0x4368cc
push edi
push esi
call fcn.0042c120
push eax
push str.socket_failure:__s
push dword [esp + 0x28]
call fcn.0041f0e0
add esp, 0x14
jmp 0x436c7d
push dword [ebp + 0x10]
lea eax, [esp + 0x3c]
push dword [ebp + 0x18]
push eax
call sub.MSVCR120.dll_memcpy
mov eax, dword [ebp + 0x10]
add esp, 0xc
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x24]
movzx edi, ax
cmp ax, word [esp + 0x20]
ja 0x4369a1
cmp word [esp + 0x38], 2
jne 0x43690c
push edi
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x3a], ax
push dword [esp + 0x1c]
lea eax, [esp + 0x3c]
push eax
push dword [esp + 0x1c]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x436a15
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [esp + 0x13], 0
je 0x436989
cmp eax, 0x2741
jne 0x436989
push eax
push esi
call fcn.0042c120
push eax
movzx eax, di
mov edi, dword [esp + 0x24]
push eax
push str.bind_port_hu__on_non_local_address_failed:__s_n
push edi
call fcn.0041f1b0
add esp, 0x18
mov dword [esp + 0x1c], 0x80
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x3c]
push eax
push dword [esi + 0x168]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4369be
mov eax, dword [esp + 0x24]
movzx edi, ax
mov byte [esp + 0x13], 0
jmp 0x436996
cmp eax, 0x2740
je 0x436995
cmp eax, 0xd
jne 0x4369e9
inc edi
cmp di, word [esp + 0x20]
jbe 0x4368f8
push str.bind___failed__we_ran_out_of_ports_
push dword [esp + 0x1c]
call fcn.0041f0e0
push dword [esp + 0x1c]
push esi
call fcn.0041f9a0
jmp 0x436c7a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.0042c120
push eax
push str.getsockname___failed:__s
push edi
call fcn.0041f0e0
push dword [esp + 0x28]
push esi
call fcn.0041f9a0
add esp, 0x1c
jmp 0x436c7d
push eax
push esi
call fcn.0042c120
push eax
movzx eax, di
push eax
push str.bind_port_hu__failed:__s
push dword [esp + 0x2c]
call fcn.0041f0e0
push dword [esp + 0x2c]
push esi
call fcn.0041f9a0
add esp, 0x20
jmp 0x436c7d
cmp di, word [esp + 0x20]
ja 0x4369a1
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0x80
push eax
lea eax, [esp + 0x3c]
push eax
push dword [esp + 0x1c]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x436a58
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.0042c120
push eax
push str.getsockname___failed:__s
push dword [esp + 0x28]
jmp 0x4369d2
push 1
push dword [esp + 0x18]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x436a84
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.0042c120
push eax
push str.socket_failure:__s
push dword [esp + 0x28]
jmp 0x4369d2
push 0x100
lea eax, [esp + 0xbc]
push eax
push ebp
call fcn.00416600
add esp, 0xc
cmp ebx, 2
je 0x436af1
mov edi, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [esp + 0x38]
lea ebx, [ebx]
cmp byte [esi + 0x29c], 0
jne 0x436abd
test ebx, ebx
je 0x436aeb
cmp ebx, 1
jne 0x436ac8
cmp cx, 2
jne 0x436aeb
movzx eax, cx
sub eax, 2
jne 0x436aeb
push dword [esp + 0x3a]
call edi
movzx ebp, ax
test ebx, ebx
je 0x436bf1
cmp ebx, 1
je 0x436b49
mov cx, word [esp + 0x38]
inc ebx
cmp ebx, 2
jne 0x436ab0
mov ebp, dword [esp + 0x28]
lea edi, [esi + 0x4e8]
mov dword [edi + 0x5c], ebx
mov eax, dword [esi + 0x16c]
cmp eax, 0xffffffff
je 0x436b1d
push eax
push esi
call fcn.0041f9a0
add esp, 8
mov dword [esi + 0x16c], 0xffffffff
mov eax, dword [esp + 0x14]
mov dword [esi + 0x16c], eax
mov eax, ebp
mov dword [esi + 0x598], 0
mov byte [esi + 0x295], 1
mov dword [esi + 0x550], 0x1c
jmp 0x436c82
lea edx, [esp + 0x5bc]
mov esi, 0x2c
lea edi, [esp + 0xb8]
lea esp, [esp]
mov cl, byte [edi]
test cl, cl
je 0x436b75
cmp cl, 0x2e
movzx eax, cl
cmove eax, esi
mov byte [edx], al
inc edx
inc edi
jne 0x436b60
mov ecx, ebp
mov byte [edx], 0
movzx eax, cl
push eax
shr ecx, 8
push ecx
push str.__d__d
push 0x14
push edx
call fcn.004212a0
mov esi, dword [esp + 0x48]
lea eax, [esp + 0x5d0]
push eax
push str.PORT
push 0x454248
lea edi, [esi + 0x4e8]
push edi
call fcn.00445190
mov ebp, eax
add esp, 0x24
test ebp, ebp
je 0x436afb
push ebp
call fcn.0042c200
push eax
push str.Failure_sending_PORT_command:__s
push dword [esp + 0x24]
call fcn.0041f0e0
push dword [esp + 0x24]
push esi
call fcn.0041f9a0
add esp, 0x18
mov dword [esi + 0x550], 0
mov eax, ebp
jmp 0x436c82
push ebp
lea eax, [esp + 0xbc]
push eax
xor eax, eax
lea edi, [esi + 0x4e8]
cmp word [esp + 0x40], 2
setne al
inc eax
push eax
push str.EPRT
push str._s__d_s_hu
push edi
call fcn.00445190
mov ebp, eax
add esp, 0x18
test ebp, ebp
je 0x436afb
push ebp
call fcn.0042c200
push eax
push str.Failure_sending_EPRT_command:__s
push dword [esp + 0x24]
call fcn.0041f0e0
push dword [esp + 0x24]
push esi
call fcn.0041f9a0
mov dword [edi + 0x5c], 1
add esp, 0x18
mov dword [esi + 0x550], 0
mov eax, ebp
jmp 0x436c82
push edi
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push dword [esp + 0x20]
call fcn.0041f0e0
push dword [esp + 0x34]
call dword [0x45e004]
add esp, 0x10
mov eax, 0x1e
mov ecx, dword [esp + 0x9bc]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0044998c
add esp, 0x9b0
ret