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

Disassembly:
sub esp, 0x9b0
mov eax, dword [0x5279f0]
xor eax, esp
mov dword [esp + 0x9ac], eax
push ebx
mov ebx, dword [esp + 0x9bc]
push ebp
push esi
mov esi, dword [esp + 0x9c0]
push edi
mov ebp, dword [esi]
push 0xff
lea eax, [esp + 0xbd]
push 0
push eax
mov dword [esp + 0x40], esi
mov dword [esp + 0x20], ebp
mov dword [esp + 0x1c], 0xffffffff
mov byte [esp + 0xc4], 0
call fcn.004c46b0
mov edi, dword [ebp + 0x398]
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x38], 0
mov ecx, dword [ecx + 0x398]
add esp, 0xc
xor ebp, ebp
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x28], 1
test ecx, ecx
je 0x42124c
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4210f4
sub ecx, edx
cmp ecx, 1
jbe 0x42124c
mov ecx, edi
lea edx, [ecx + 1]
jmp 0x421110
mov al, byte [ecx]
inc ecx
test al, al
jne 0x421110
sub ecx, edx
cmp ecx, 0x16
jae 0x421125
mov ecx, 0x16
jmp 0x421139
mov ecx, edi
lea edx, [ecx + 1]
lea ebx, [ebx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x421130
sub ecx, edx
lea eax, [ecx + 1]
push 1
push eax
call dword [0x51f04c]
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x421156
lea eax, [ebp + 0x1b]
jmp 0x421739
cmp byte [edi], 0x3a
je 0x421185
push 0x3a
push edi
call fcn.004c4740
add esp, 8
mov dword [esp + 0x1c], eax
test eax, eax
je 0x421208
mov ecx, eax
sub ecx, edi
push ecx
push edi
push ebp
call fcn.004c5e20
mov edi, dword [esp + 0x28]
add esp, 0xc
test edi, edi
je 0x42121c
push 0x3a
push edi
call fcn.004c4740
mov edi, eax
add esp, 8
test edi, edi
je 0x42121c
push 0xa
lea ecx, [edi + 1]
push 0
push ecx
call fcn.004c56d2
push eax
call fcn.00424070
movzx eax, ax
push 0x2d
push edi
mov dword [esp + 0x3c], eax
call fcn.004c4740
add esp, 0x18
test eax, eax
je 0x4211fb
push 0xa
inc eax
push 0
push eax
call fcn.004c56d2
push eax
call fcn.00424070
movzx eax, ax
add esp, 0x10
mov dword [esp + 0x20], eax
cmp word [esp + 0x24], ax
jbe 0x42121c
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
jmp 0x42121c
mov eax, dword [esp + 0x24]
movzx eax, ax
mov dword [esp + 0x20], eax
jmp 0x42121c
mov ecx, ebp
sub ecx, edi
lea esp, [esp]
mov al, byte [edi]
mov byte [ecx + edi], al
lea edi, [edi + 1]
test al, al
jne 0x421210
cmp byte [ebp], 0
je 0x42124c
push 0x401
lea eax, [esp + 0x1bc]
push eax
mov eax, dword [esi + 0x3c]
push ebp
push dword [eax + 4]
call fcn.0045d480
add esp, 0x10
lea ecx, [esp + 0x1b8]
test eax, eax
cmove ecx, ebp
jmp 0x4212c1
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x3c]
push eax
push dword [esi + 0x130]
mov dword [esp + 0x24], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x421292
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.00413d60
push eax
push str.getsockname___failed:__s
push dword [esp + 0x24]
call fcn.0040fad0
add esp, 0x14
jmp 0x421726
push 0x401
lea eax, [esp + 0x1bc]
push eax
lea eax, [esp + 0x44]
push eax
movzx eax, word [esp + 0x44]
push eax
call fcn.00415200
add esp, 0x10
lea ecx, [esp + 0x1b8]
mov dword [esp + 0x28], 0
lea eax, [esp + 0x2c]
push eax
push 0
push ecx
push esi
mov dword [esp + 0x2c], ecx
call fcn.00406440
add esp, 0x10
cmp eax, 1
jne 0x4212e9
lea eax, [esp + 0x2c]
push eax
push esi
call fcn.00405c00
add esp, 8
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x421711
mov edi, dword [eax]
push eax
push dword [esp + 0x18]
mov dword [esp + 0x38], edi
call fcn.00406610
add esp, 8
test edi, edi
je 0x421711
test ebp, ebp
je 0x42131e
push ebp
call dword [0x51f040]
add esp, 4
mov dword [esp + 0x10], 0xffffffff
xor ebp, ebp
lea eax, [esp + 0x10]
push eax
push 0
push edi
push esi
call fcn.004105c0
add esp, 0x10
mov dword [esp + 0x1c], eax
test eax, eax
je 0x421356
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, dword [edi + 0x1c]
mov ebp, eax
mov dword [esp + 0x30], edi
test edi, edi
jne 0x421328
jmp 0x42135a
test edi, edi
jne 0x421378
push ebp
push esi
call fcn.00413d60
push eax
push str.socket_failure:__s
push dword [esp + 0x24]
call fcn.0040fad0
add esp, 0x14
jmp 0x421734
push dword [edi + 0x10]
lea eax, [esp + 0x3c]
push dword [edi + 0x18]
push eax
call fcn.004c3f80
mov eax, dword [edi + 0x10]
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x2c]
movzx eax, ax
movzx ebp, cx
add esp, 0xc
movzx edi, cx
cmp ebp, eax
jg 0x421460
jmp 0x4213b0
cmp word [esp + 0x38], 2
jne 0x4213c4
push edi
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x3a], ax
push dword [esp + 0x18]
lea eax, [esp + 0x3c]
push eax
push dword [esp + 0x18]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x421460
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp dword [esp + 0x28], 0
je 0x421441
cmp eax, 0x2741
jne 0x421441
push eax
push esi
call fcn.00413d60
push eax
push ebp
mov ebp, dword [esp + 0x24]
push str.bind_port_hu__on_non_local_address_failed:__s_n
push ebp
call fcn.0040fba0
add esp, 0x18
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x3c]
push eax
push dword [esi + 0x130]
mov dword [esp + 0x24], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x421487
mov eax, dword [esp + 0x24]
movzx edi, ax
mov dword [esp + 0x28], 0
jmp 0x42144e
cmp eax, 0x2740
je 0x42144d
cmp eax, 0xd
jne 0x4214b2
inc edi
mov ecx, dword [esp + 0x20]
movzx ebp, di
movzx eax, cx
cmp ebp, eax
jle 0x4213b0
cmp di, word [esp + 0x20]
jbe 0x4214de
push str.bind___failed__we_ran_out_of_ports_
push dword [esp + 0x18]
call fcn.0040fad0
push dword [esp + 0x18]
push esi
call fcn.00410060
add esp, 0x10
jmp 0x421734
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.00413d60
push eax
push str.getsockname___failed:__s
push ebp
call fcn.0040fad0
push dword [esp + 0x24]
push esi
call fcn.00410060
add esp, 0x1c
jmp 0x421734
push eax
push esi
call fcn.00413d60
push eax
movzx eax, di
push eax
push str.bind_port_hu__failed:__s
push dword [esp + 0x28]
call fcn.0040fad0
push dword [esp + 0x28]
push esi
call fcn.00410060
add esp, 0x20
jmp 0x421734
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x3c]
push eax
push dword [esp + 0x18]
mov dword [esp + 0x24], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x421517
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.00413d60
push eax
push str.getsockname___failed:__s
push dword [esp + 0x24]
jmp 0x42149b
push 1
push dword [esp + 0x14]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x421543
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.00413d60
push eax
push str.socket_failure:__s
push dword [esp + 0x24]
jmp 0x42149b
push 0x100
lea eax, [esp + 0xbc]
push eax
push dword [esp + 0x38]
call fcn.00406410
add esp, 0xc
cmp ebx, 2
je 0x4215b1
mov edi, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [esp + 0x38]
lea esp, [esp]
cmp dword [esi + 0x208], 0
jne 0x42157d
test ebx, ebx
je 0x4215ab
cmp ebx, 1
jne 0x421588
cmp cx, 2
jne 0x4215ab
movzx eax, cx
sub eax, 2
jne 0x4215ab
push dword [esp + 0x3a]
call edi
movzx ebp, ax
test ebx, ebx
je 0x4216a1
cmp ebx, 1
je 0x4215f8
mov cx, word [esp + 0x38]
inc ebx
cmp ebx, 2
jne 0x421570
mov ebp, dword [esp + 0x1c]
lea edi, [esi + 0x3f8]
mov dword [edi + 0x68], ebx
mov eax, dword [esi + 0x134]
cmp eax, 0xffffffff
je 0x4215d3
push eax
push esi
call fcn.00410060
add esp, 8
mov eax, dword [esp + 0x10]
mov dword [esi + 0x134], eax
mov dword [esi + 0x1e8], 1
mov dword [esi + 0x46c], 0x1c
mov eax, ebp
jmp 0x421739
lea edx, [esp + 0x5bc]
lea edi, [esp + 0xb8]
mov esi, 0x2c
jmp 0x421610
mov cl, byte [edi]
test cl, cl
je 0x421625
movzx eax, cl
cmp cl, 0x2e
cmove eax, esi
mov byte [edx], al
inc edx
inc edi
jne 0x421610
mov ecx, ebp
movzx eax, cl
push eax
shr ecx, 8
push ecx
push str.__d__d
push 0x14
push edx
mov byte [edx], 0
call fcn.00411ca0
mov esi, dword [esp + 0x48]
lea eax, [esp + 0x5d0]
push eax
push str.PORT
push str._s__s
lea edi, [esi + 0x3f8]
push edi
call fcn.00426a30
mov ebp, eax
add esp, 0x24
test ebp, ebp
je 0x4215bb
push ebp
call fcn.00413e60
push eax
push str.Failure_sending_PORT_command:__s
push dword [esp + 0x20]
call fcn.0040fad0
push dword [esp + 0x20]
push esi
call fcn.00410060
add esp, 0x18
mov dword [esi + 0x46c], 0
mov eax, ebp
jmp 0x421739
push ebp
lea eax, [esp + 0xbc]
push eax
xor eax, eax
cmp word [esp + 0x40], 2
lea edi, [esi + 0x3f8]
setne al
inc eax
push eax
push str.EPRT
push str._s__d_s_hu
push edi
call fcn.00426a30
mov ebp, eax
add esp, 0x18
test ebp, ebp
je 0x4215bb
push ebp
call fcn.00413e60
push eax
push str.Failure_sending_EPRT_command:__s
push dword [esp + 0x20]
call fcn.0040fad0
push dword [esp + 0x20]
push esi
call fcn.00410060
mov dword [edi + 0x68], 1
add esp, 0x18
mov dword [esi + 0x46c], 0
mov eax, ebp
jmp 0x421739
push dword [esp + 0x1c]
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push dword [esp + 0x1c]
call fcn.0040fad0
add esp, 0xc
test ebp, ebp
je 0x421734
push ebp
call dword [0x51f040]
add esp, 4
mov eax, 0x1e
mov ecx, dword [esp + 0x9bc]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004c22ab
add esp, 0x9b0
ret