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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9ac
mov eax, dword [0x443018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [esi]
push edi
push 0xff
lea ecx, [ebp - 0x103]
push 0
push ecx
mov dword [ebp - 0x9a4], eax
mov dword [ebp - 0x990], ebx
mov dword [ebp - 0x98c], 0xffffffff
mov byte [ebp - 0x104], 0
call sub.MSVCR100.dll_memset
mov edi, dword [ebx + 0x3b8]
xor ecx, ecx
mov dword [ebp - 0x9a8], ecx
mov eax, dword [ebx + 0x3b8]
add esp, 0xc
mov dword [ebp - 0x99c], ecx
mov dword [ebp - 0x9a0], ecx
mov dword [ebp - 0x9ac], 1
mov dword [ebp - 0x994], ecx
cmp eax, ecx
je 0x42211b
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x421fd8
sub eax, edx
cmp eax, 1
jbe 0x42211b
mov eax, edi
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x421ff0
sub eax, edx
cmp eax, 0x16
jae 0x422005
mov eax, 0x16
jmp 0x422019
mov eax, edi
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x422010
sub eax, edx
inc eax
push 1
push eax
call dword [0x443040]
add esp, 8
mov dword [ebp - 0x994], eax
test eax, eax
jne 0x422045
pop edi
mov eax, 0x1b
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406648
mov esp, ebp
pop ebp
ret
cmp byte [edi], 0x3a
jne 0x42218c
mov ebx, edi
test ebx, ebx
je 0x4220ca
push 0x3a
push ebx
call dword [sym.imp.MSVCR100.dll_strchr]
mov edi, eax
add esp, 8
test edi, edi
je 0x4220ca
mov ebx, dword [sym.imp.MSVCR100.dll_strtoul]
push 0xa
lea ecx, [edi + 1]
push 0
push ecx
call ebx
push eax
call fcn.0042a1b0
movzx edx, ax
push 0x2d
push edi
mov dword [ebp - 0x99c], edx
call dword [sym.imp.MSVCR100.dll_strchr]
add esp, 0x18
test eax, eax
je 0x4221d2
push 0xa
inc eax
push 0
push eax
call ebx
push eax
call fcn.0042a1b0
movzx eax, ax
add esp, 0x10
mov dword [ebp - 0x9a0], eax
cmp word [ebp - 0x99c], ax
jbe 0x4220ca
xor eax, eax
mov dword [ebp - 0x99c], eax
mov dword [ebp - 0x9a0], eax
mov ebx, dword [ebp - 0x994]
cmp byte [ebx], 0
je 0x42211b
mov edx, dword [esi + 0x88]
mov eax, dword [esi + 0x4c]
push 0x401
lea ecx, [ebp - 0x508]
push ecx
mov ecx, dword [eax + 0x18]
push ebx
push edx
push ecx
call fcn.0042f160
mov edx, dword [esi + 0x4c]
add esp, 4
push eax
mov eax, dword [edx + 4]
push eax
call fcn.0042f160
add esp, 0x18
sub eax, 0
je 0x4221de
dec eax
je 0x422177
dec eax
je 0x422215
mov eax, dword [esi + 0x154]
lea ecx, [ebp - 0x998]
push ecx
lea edx, [ebp - 0x988]
push edx
push eax
mov dword [ebp - 0x998], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4221e2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.004168a0
mov ecx, dword [ebp - 0x990]
push eax
push str.getsockname___failed:__s
push ecx
call fcn.00411470
mov edx, dword [ebp - 0x994]
push edx
call dword [0x443034]
add esp, 0x18
pop edi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406648
mov esp, ebp
pop ebp
ret
push 0x3a
push edi
call dword [sym.imp.MSVCR100.dll_strchr]
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x4221b9
mov eax, dword [ebp - 0x994]
mov edx, ebx
sub edx, edi
push edx
push edi
push eax
call dword [sym.imp.MSVCR100.dll_strncpy]
add esp, 0xc
jmp 0x422050
mov edx, dword [ebp - 0x994]
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4221c3
jmp 0x4220ca
movzx eax, word [ebp - 0x99c]
jmp 0x4220c4
mov edi, ebx
jmp 0x42221b
movzx edx, word [ebp - 0x988]
push 0x401
lea eax, [ebp - 0x508]
push eax
lea ecx, [ebp - 0x984]
push ecx
push edx
call fcn.00417080
mov ebx, dword [ebp - 0x994]
add esp, 0x10
mov dword [ebp - 0x9ac], 0
lea edi, [ebp - 0x508]
lea eax, [ebp - 0x9a8]
push eax
push 0
push edi
push esi
call fcn.00408510
add esp, 0x10
cmp eax, 1
jne 0x422243
lea ecx, [ebp - 0x9a8]
push ecx
push esi
call fcn.00407e70
add esp, 8
mov eax, dword [ebp - 0x9a8]
test eax, eax
je 0x422269
mov edx, dword [ebp - 0x990]
mov ebx, dword [eax]
push eax
push edx
call fcn.00408a50
add esp, 8
test ebx, ebx
jne 0x42229a
mov ebx, dword [ebp - 0x994]
mov eax, dword [ebp - 0x990]
push edi
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push eax
call fcn.00411470
push ebx
call dword [0x443034]
add esp, 0x10
pop edi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406648
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x994]
push ecx
call dword [0x443034]
add esp, 4
mov dword [ebp - 0x98c], 0xffffffff
xor edi, edi
lea edx, [ebp - 0x98c]
push edx
push 0
push ebx
push esi
call fcn.00413c40
add esp, 0x10
mov dword [ebp - 0x994], eax
test eax, eax
je 0x4222e4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, dword [ebx + 0x1c]
mov edi, eax
test ebx, ebx
jne 0x4222b6
jmp 0x4222e8
test ebx, ebx
jne 0x422319
push edi
push esi
call fcn.004168a0
push eax
mov eax, dword [ebp - 0x990]
push str.socket_failure:__s
push eax
call fcn.00411470
add esp, 0x14
pop edi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406648
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebx + 0x10]
mov edx, dword [ebx + 0x18]
push ecx
push edx
lea eax, [ebp - 0x988]
push eax
call sub.MSVCR100.dll_memcpy
mov dx, word [ebp - 0x9a0]
mov ecx, dword [ebx + 0x10]
movzx edi, word [ebp - 0x99c]
add esp, 0xc
mov dword [ebp - 0x998], ecx
cmp word [ebp - 0x99c], dx
ja 0x4224ab
cmp word [ebp - 0x988], 2
jne 0x42236c
push edi
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x986], ax
mov eax, dword [ebp - 0x998]
mov edx, dword [ebp - 0x98c]
push eax
lea ecx, [ebp - 0x988]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x4224a2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp dword [ebp - 0x9ac], 0
je 0x4223fd
cmp eax, 0x2741
jne 0x4223fd
push eax
push esi
call fcn.004168a0
mov ecx, dword [ebp - 0x990]
push eax
movzx eax, di
push eax
push str.bind_port_hu__on_non_local_address_failed:__s_n
push ecx
call fcn.004113f0
mov ecx, dword [esi + 0x154]
add esp, 0x18
lea edx, [ebp - 0x998]
push edx
lea eax, [ebp - 0x988]
push eax
push ecx
mov dword [ebp - 0x998], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x42241c
movzx edi, word [ebp - 0x99c]
mov dword [ebp - 0x9ac], eax
jmp 0x42240a
cmp eax, 0x2740
je 0x422409
cmp eax, 0xd
jne 0x422460
inc edi
cmp di, word [ebp - 0x9a0]
jbe 0x422354
jmp 0x4224ab
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.004168a0
mov edx, dword [ebp - 0x990]
push eax
push str.getsockname___failed:__s
push edx
call fcn.00411470
mov eax, dword [ebp - 0x98c]
push eax
push esi
call fcn.00413be0
add esp, 0x1c
pop edi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406648
mov esp, ebp
pop ebp
ret
push eax
push esi
call fcn.004168a0
mov edx, dword [ebp - 0x990]
push eax
movzx ecx, di
push ecx
push str.bind_port_hu__failed:__s
push edx
call fcn.00411470
mov eax, dword [ebp - 0x98c]
push eax
push esi
call fcn.00413be0
add esp, 0x20
pop edi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406648
mov esp, ebp
pop ebp
ret
cmp di, word [ebp - 0x9a0]
jbe 0x4224e1
mov ecx, dword [ebp - 0x990]
push str.bind___failed__we_ran_out_of_ports_
push ecx
call fcn.00411470
mov edx, dword [ebp - 0x98c]
push edx
push esi
call fcn.00413be0
add esp, 0x10
pop edi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406648
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x98c]
lea eax, [ebp - 0x998]
push eax
lea ecx, [ebp - 0x988]
push ecx
push edx
mov dword [ebp - 0x998], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x42254e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.004168a0
push eax
push str.getsockname___failed:__s
mov eax, dword [ebp - 0x990]
push eax
call fcn.00411470
mov ecx, dword [ebp - 0x98c]
push ecx
push esi
call fcn.00413be0
add esp, 0x1c
pop edi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406648
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x98c]
push 1
push edx
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x422576
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.004168a0
push eax
push str.socket_failure:__s
jmp 0x42251d
push pe_nt_image_headers32
lea edx, [ebp - 0x104]
push edx
push ebx
call fcn.004081b0
mov edi, dword [ebp - 0x9a4]
add esp, 0xc
cmp edi, 2
je 0x4225ea
mov cx, word [ebp - 0x988]
lea ecx, [ecx]
cmp dword [esi + 0x218], 0
jne 0x4225ad
test edi, edi
je 0x4225e4
cmp edi, 1
jne 0x4225b8
cmp cx, 2
jne 0x4225e4
movzx eax, cx
sub eax, 2
jne 0x4225e4
mov eax, dword [ebp - 0x986]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ebx, ax
test edi, edi
je 0x4225f5
cmp edi, 1
je 0x42266b
mov cx, word [ebp - 0x988]
inc edi
cmp edi, 2
jne 0x4225a0
mov ebx, dword [ebp - 0x994]
jmp 0x422703
xor eax, eax
cmp word [ebp - 0x988], 2
push ebx
setne al
lea edx, [ebp - 0x104]
push edx
mov dword [ebp - 0x9a4], edi
lea edi, [esi + 0x400]
inc eax
push eax
push str.EPRT
push str._s__d_s_hu
push edi
call fcn.00431340
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x4226fd
push ebx
call fcn.00415e80
mov ecx, dword [ebp - 0x990]
push eax
push str.Failure_sending_EPRT_command:__s
push ecx
call fcn.00411470
mov edx, dword [ebp - 0x98c]
push edx
push esi
call fcn.00413be0
add esp, 0x18
mov dword [edi + 0x68], 1
xor eax, eax
jmp 0x422739
lea ecx, [ebp - 0x908]
lea edx, [ebp - 0x104]
mov al, byte [edx]
test al, al
je 0x42268c
cmp al, 0x2e
jne 0x422686
mov byte [ecx], 0x2c
jmp 0x422688
mov byte [ecx], al
inc ecx
inc edx
jne 0x422677
mov eax, ebx
mov edx, ebx
and edx, 0xff
push edx
shr eax, 8
push eax
push str.__d__d
push 0x14
push ecx
mov byte [ecx], 0
call fcn.00415250
lea eax, [ebp - 0x908]
push eax
push str.PORT
lea eax, [esi + 0x400]
push 0x43ad6c
push eax
call fcn.00431340
mov ebx, eax
add esp, 0x24
test ebx, ebx
je 0x422703
push ebx
call fcn.00415e80
mov ecx, dword [ebp - 0x990]
push eax
push str.Failure_sending_PORT_command:__s
push ecx
call fcn.00411470
mov edx, dword [ebp - 0x98c]
push edx
push esi
call fcn.00413be0
add esp, 0x18
xor eax, eax
jmp 0x422739
mov edi, dword [ebp - 0x9a4]
mov dword [esi + 0x468], edi
mov eax, dword [esi + 0x158]
cmp eax, 0xffffffff
je 0x42271e
push eax
push esi
call fcn.00413be0
add esp, 8
mov eax, dword [ebp - 0x98c]
mov dword [esi + 0x158], eax
mov dword [esi + 0x1fc], 1
mov eax, 0x1c
mov ecx, esi
call fcn.00421e20
mov ecx, dword [ebp - 4]
pop edi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.00406648
mov esp, ebp
pop ebp
ret