Function at 0x428170
Capabilities:
Convert ip address from string
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x61c
or dword [ebp - 0xc], 0xffffffff
lea eax, [ebp - 0xd4]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 0x2f
push 0
mov edi, dword [esi + 0xc]
push eax
call fcn.00437130
mov ebx, dword [esi + 0x544]
xor ecx, ecx
add esp, 0xc
mov dword [ebp - 8], ecx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x1c], ecx
mov byte [ebp + 0xb], 1
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x24], 0x17
test ebx, ebx
je 0x4283b0
push ebx
call fcn.0043b900
pop ecx
cmp eax, 1
jbe 0x4283ab
push ebx
call fcn.0043b900
pop ecx
push 0x41
pop ecx
cmp eax, ecx
jb 0x4281ea
push ebx
call fcn.0043b900
pop ecx
mov ecx, eax
lea eax, [ecx + 1]
push 1
push eax
call dword [0x46c010]
mov dword [ebp - 0x14], eax
pop ecx
pop ecx
test eax, eax
jne 0x428206
push 0x1b
jmp 0x4288b5
mov al, byte [ebx]
cmp al, 0x5b
jne 0x42823c
lea eax, [ebx + 1]
push 0x5d
push ebx
mov dword [ebp - 0x10], eax
call fcn.00437d90
mov ebx, eax
mov dword [ebp - 4], ebx
pop ecx
pop ecx
test ebx, ebx
je 0x428243
mov eax, dword [ebp - 0x10]
mov ecx, ebx
sub ecx, eax
push ecx
push eax
mov ebx, dword [ebp - 0x14]
push ebx
call fcn.00441ae0
add esp, 0xc
jmp 0x428246
cmp al, 0x3a
jne 0x4282b1
mov dword [ebp - 4], ebx
mov ebx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
and dword [ebp - 4], 0
xor edx, edx
test eax, eax
je 0x42830f
push 0x3a
push eax
call fcn.00437d90
and dword [ebp - 4], 0
xor edx, edx
mov dword [ebp - 0x10], eax
pop ecx
pop ecx
test eax, eax
je 0x42830f
push 0xa
push edx
lea ecx, [eax + 1]
push ecx
call fcn.00442a78
push eax
call fcn.004148c5
push 0x2d
push dword [ebp - 0x10]
movzx eax, ax
mov dword [ebp - 4], eax
call fcn.00437d90
add esp, 0x18
test eax, eax
je 0x428309
push 0xa
inc eax
push 0
push eax
call fcn.00442a78
push eax
call fcn.004148c5
add esp, 0x10
jmp 0x42830c
push 0x3a
push ebx
call fcn.00437d90
mov dword [ebp - 4], eax
pop ecx
pop ecx
test eax, eax
je 0x4282f8
lea eax, [ebp - 0xa4]
push eax
push ebx
push 0x17
pop eax
push eax
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x4282ec
push ebx
mov ebx, dword [ebp - 0x14]
push ebx
call fcn.00441390
pop ecx
pop ecx
xor eax, eax
jmp 0x428249
mov eax, dword [ebp - 4]
sub eax, ebx
push eax
push ebx
jmp 0x42822e
push ebx
mov ebx, dword [ebp - 0x14]
push ebx
call fcn.00441390
pop ecx
pop ecx
jmp 0x428246
mov eax, dword [ebp - 4]
movzx edx, ax
xor ecx, ecx
movzx eax, dx
cmp word [ebp - 4], dx
cmovbe ecx, eax
movzx eax, cx
xor ecx, ecx
cmp word [ebp - 4], dx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 4]
movzx eax, ax
cmovbe ecx, eax
cmp byte [ebx], 0
movzx eax, cx
mov dword [ebp - 0x10], eax
je 0x428388
push 0x401
lea eax, [ebp - 0x61c]
push eax
mov eax, dword [edi + 0x48]
push ebx
push dword [edi + 0x54]
push dword [eax + 0x18]
call fcn.0042d1e4
pop ecx
push eax
mov eax, dword [edi + 0x48]
push dword [eax + 4]
call fcn.0040a8ce
add esp, 0x18
sub eax, 0
je 0x428381
sub eax, 1
je 0x4288b3
sub eax, 1
jne 0x42838c
lea eax, [ebp - 0x61c]
jmp 0x428383
mov eax, ebx
mov dword [ebp - 8], eax
jmp 0x42838f
xor eax, eax
jmp 0x428383
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
movzx edx, cx
mov ecx, dword [ebp - 0x1c]
movzx ecx, cx
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x1c], ecx
test eax, eax
jne 0x42844f
jmp 0x4283b2
mov ebx, dword [ebp - 0x14]
jmp 0x4283b2
mov ebx, ecx
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0x80
push eax
lea eax, [ebp - 0xa4]
push eax
push dword [edi + 0x148]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x428407
push 0x100
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0042c76d
push eax
push str.getsockname___failed:__s
push esi
call fcn.00412b10
push ebx
call dword [0x46c004]
add esp, 0x1c
jmp 0x4288b3
mov ax, word [ebp - 0xa4]
lea edx, [ebp - 0x9c]
cmp ax, word [ebp - 0x24]
lea ecx, [ebp - 0xa0]
push 0x401
cmove ecx, edx
movzx eax, ax
lea edx, [ebp - 0x61c]
push edx
push ecx
push eax
call fcn.0042d26a
add esp, 0x10
test eax, eax
je 0x4288b3
lea eax, [ebp - 0x61c]
mov byte [ebp + 0xb], 0
mov dword [ebp - 8], eax
lea ecx, [ebp - 0x20]
push ecx
push 0
push 0
push eax
push esi
call fcn.00416adb
add esp, 0x14
cmp eax, 1
jne 0x428472
lea eax, [ebp - 0x20]
push eax
push esi
call fcn.0040aa3a
pop ecx
pop ecx
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x42848c
mov eax, dword [ecx]
push ecx
push esi
mov dword [ebp - 4], eax
call fcn.00416d35
mov eax, dword [ebp - 4]
pop ecx
pop ecx
jmp 0x428491
xor eax, eax
mov dword [ebp - 4], eax
test eax, eax
jne 0x4284b3
mov eax, dword [ebp - 8]
push eax
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push esi
call fcn.00412b10
push ebx
call dword [0x46c004]
add esp, 0x10
jmp 0x4288b3
push ebx
call dword [0x46c004]
and dword [ebp - 8], 0
mov ebx, dword [ebp - 4]
pop ecx
lea eax, [ebp - 0xc]
push eax
push 0
push ebx
push esi
call fcn.00413be2
add esp, 0x10
mov dword [ebp - 4], eax
test eax, eax
je 0x4284eb
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, dword [ebx + 0x1c]
mov dword [ebp - 8], eax
test ebx, ebx
jne 0x4284c2
jmp 0x4284ee
mov eax, dword [ebp - 8]
test ebx, ebx
jne 0x428518
push 0x100
lea ecx, [ebp - 0x218]
push ecx
push eax
call fcn.0042c76d
push eax
push str.socket_failure:__s
push esi
call fcn.00412b10
add esp, 0x18
jmp 0x4288b3
push dword [ebx + 0x10]
lea eax, [ebp - 0xa4]
push dword [ebx + 0x18]
push eax
call fcn.00437290
mov eax, dword [ebx + 0x10]
add esp, 0xc
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x1c]
cmp dx, cx
mov dword [ebp - 0x18], eax
movzx eax, dx
mov dword [ebp - 8], eax
ja 0x42889b
push 2
pop ecx
push eax
call dword [sym.imp.WS2_32.dll_htons]
push dword [ebp - 0x18]
movzx eax, ax
mov word [ebp - 0xa2], ax
lea eax, [ebp - 0xa4]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x42866a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [ebp + 0xb], 0
je 0x4285e2
mov ecx, 0x2741
cmp eax, ecx
jne 0x4285e2
push 0x100
lea eax, [ebp - 0x218]
push eax
push ecx
call fcn.0042c76d
push eax
mov eax, dword [ebp - 8]
movzx eax, ax
push eax
push str.bind_port_hu__on_non_local_address_failed:__s_n
push esi
call fcn.00412ba4
add esp, 0x1c
mov dword [ebp - 0x18], 0x80
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0xa4]
push eax
push dword [edi + 0x148]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4285fd
mov eax, dword [ebp - 0x10]
movzx eax, ax
mov byte [ebp + 0xb], 0
jmp 0x4285f2
cmp eax, 0x2740
je 0x4285ee
cmp eax, 0xd
jne 0x428633
mov eax, dword [ebp - 8]
inc eax
mov ecx, dword [ebp - 0x1c]
cmp ax, cx
jmp 0x42853f
push 0x100
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0042c76d
push eax
push str.getsockname___failed:__s
push esi
call fcn.00412b10
push dword [ebp - 0xc]
push edi
push esi
call fcn.00413257
add esp, 0x24
jmp 0x4288b3
push 0x100
lea ecx, [ebp - 0x218]
push ecx
push eax
call fcn.0042c76d
push eax
mov eax, dword [ebp - 8]
movzx eax, ax
push eax
push str.bind_port_hu__failed:__s
push esi
call fcn.00412b10
push dword [ebp - 0xc]
push edi
push esi
call fcn.00413257
add esp, 0x28
jmp 0x4288b3
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x1c]
cmp ax, cx
ja 0x42889b
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0x80
push eax
lea eax, [ebp - 0xa4]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4285fd
push 1
push dword [ebp - 0xc]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x4286ce
push 0x100
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0042c76d
push eax
push str.socket_failure:__s
jmp 0x42861b
push 0x2f
lea eax, [ebp - 0xd4]
push eax
push ebx
call fcn.00416a9b
add esp, 0xc
cmp byte [edi + 0x254], 0
jne 0x4286f9
cmp byte [edi + 0x24d], 0
je 0x4286f9
mov byte [edi + 0x254], 1
mov ebx, dword [ebp + 0xc]
push 2
pop edx
cmp ebx, edx
je 0x42875b
mov cx, word [ebp - 0xa4]
cmp byte [edi + 0x254], 0
jne 0x428717
test ebx, ebx
je 0x428756
cmp ebx, 1
jne 0x428721
cmp cx, dx
jne 0x428756
movzx eax, cx
sub eax, edx
je 0x42872d
sub eax, 0x15
jne 0x428756
push dword [ebp - 0xa2]
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
mov dword [ebp - 0x10], eax
test ebx, ebx
je 0x428824
cmp ebx, 1
je 0x428788
mov cx, word [ebp - 0xa4]
push 2
pop edx
inc ebx
cmp ebx, edx
jne 0x42870a
push edi
push esi
mov dword [edi + 0x498], ebx
call fcn.0042632e
mov eax, dword [ebp - 0xc]
push 0x1c
push esi
mov dword [edi + 0x14c], eax
mov byte [edi + 0x23d], 1
call fcn.0042631a
add esp, 0x10
jmp 0x428896
lea eax, [ebp - 0xd4]
lea edx, [ebp - 0x118]
mov dword [ebp + 8], eax
mov cl, byte [eax]
test cl, cl
je 0x4287bc
cmp cl, 0x2e
movzx eax, cl
mov dword [ebp - 0x24], 0x2c
cmove eax, dword [ebp - 0x24]
mov byte [edx], al
inc edx
mov eax, dword [ebp + 8]
add eax, 1
mov dword [ebp + 8], eax
jne 0x428797
mov eax, dword [ebp - 0x10]
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.knocker.exe_curl_msnprintf
lea eax, [ebp - 0x118]
push eax
push str.PORT
push 0x45ebdc
lea eax, [edi + 0x420]
push eax
push esi
call fcn.00433add
add esp, 0x28
mov dword [ebp - 4], eax
test eax, eax
je 0x42875b
push eax
call sym.knocker.exe_curl_easy_strerror
push eax
push str.Failure_sending_PORT_command:__s
push esi
call fcn.00412b10
push dword [ebp - 0xc]
push edi
push esi
call fcn.00413257
jmp 0x42888b
movzx eax, ax
push eax
lea eax, [ebp - 0xd4]
push eax
push 2
pop ecx
xor eax, eax
cmp word [ebp - 0xa4], cx
setne al
inc eax
push eax
push str.EPRT
push str._s__d_s_hu
lea eax, [edi + 0x420]
push eax
push esi
call fcn.00433add
add esp, 0x1c
mov dword [ebp - 4], eax
test eax, eax
je 0x42875b
push eax
call sym.knocker.exe_curl_easy_strerror
push eax
push str.Failure_sending_EPRT_command:__s
push esi
call fcn.00412b10
push dword [ebp - 0xc]
push edi
push esi
call fcn.00413257
mov dword [edi + 0x498], 1
push 0
push esi
call fcn.0042631a
add esp, 0x24
mov eax, dword [ebp - 4]
jmp 0x4288b6
push str.bind___failed__we_ran_out_of_ports_
push esi
call fcn.00412b10
push dword [ebp - 0xc]
push edi
push esi
call fcn.00413257
add esp, 0x14
push 0x1e
pop eax
pop edi
pop esi
pop ebx
leave
ret