Function at 0x428040
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.00437000
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 0x428280
push ebx
call fcn.0043b7c0
pop ecx
cmp eax, 1
jbe 0x42827b
push ebx
call fcn.0043b7c0
pop ecx
push 0x41
pop ecx
cmp eax, ecx
jb 0x4280ba
push ebx
call fcn.0043b7c0
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 0x4280d6
push 0x1b
jmp 0x428785
mov al, byte [ebx]
cmp al, 0x5b
jne 0x42810c
lea eax, [ebx + 1]
push 0x5d
push ebx
mov dword [ebp - 0x10], eax
call fcn.00437c60
mov ebx, eax
mov dword [ebp - 4], ebx
pop ecx
pop ecx
test ebx, ebx
je 0x428113
mov eax, dword [ebp - 0x10]
mov ecx, ebx
sub ecx, eax
push ecx
push eax
mov ebx, dword [ebp - 0x14]
push ebx
call fcn.004419a0
add esp, 0xc
jmp 0x428116
cmp al, 0x3a
jne 0x428181
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 0x4281df
push 0x3a
push eax
call fcn.00437c60
and dword [ebp - 4], 0
xor edx, edx
mov dword [ebp - 0x10], eax
pop ecx
pop ecx
test eax, eax
je 0x4281df
push 0xa
push edx
lea ecx, [eax + 1]
push ecx
call fcn.00442938
push eax
call fcn.00414794
push 0x2d
push dword [ebp - 0x10]
movzx eax, ax
mov dword [ebp - 4], eax
call fcn.00437c60
add esp, 0x18
test eax, eax
je 0x4281d9
push 0xa
inc eax
push 0
push eax
call fcn.00442938
push eax
call fcn.00414794
add esp, 0x10
jmp 0x4281dc
push 0x3a
push ebx
call fcn.00437c60
mov dword [ebp - 4], eax
pop ecx
pop ecx
test eax, eax
je 0x4281c8
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 0x4281bc
push ebx
mov ebx, dword [ebp - 0x14]
push ebx
call fcn.00441250
pop ecx
pop ecx
xor eax, eax
jmp 0x428119
mov eax, dword [ebp - 4]
sub eax, ebx
push eax
push ebx
jmp 0x4280fe
push ebx
mov ebx, dword [ebp - 0x14]
push ebx
call fcn.00441250
pop ecx
pop ecx
jmp 0x428116
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 0x428258
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.0042d0b6
pop ecx
push eax
mov eax, dword [edi + 0x48]
push dword [eax + 4]
call fcn.0040a79e
add esp, 0x18
sub eax, 0
je 0x428251
sub eax, 1
je 0x428783
sub eax, 1
jne 0x42825c
lea eax, [ebp - 0x61c]
jmp 0x428253
mov eax, ebx
mov dword [ebp - 8], eax
jmp 0x42825f
xor eax, eax
jmp 0x428253
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 0x42831f
jmp 0x428282
mov ebx, dword [ebp - 0x14]
jmp 0x428282
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 0x4282d7
push 0x100
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0042c63f
push eax
push str.getsockname___failed:__s
push esi
call fcn.004129df
push ebx
call dword [0x46c004]
add esp, 0x1c
jmp 0x428783
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.0042d13c
add esp, 0x10
test eax, eax
je 0x428783
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.004169aa
add esp, 0x14
cmp eax, 1
jne 0x428342
lea eax, [ebp - 0x20]
push eax
push esi
call fcn.0040a90a
pop ecx
pop ecx
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x42835c
mov eax, dword [ecx]
push ecx
push esi
mov dword [ebp - 4], eax
call fcn.00416c04
mov eax, dword [ebp - 4]
pop ecx
pop ecx
jmp 0x428361
xor eax, eax
mov dword [ebp - 4], eax
test eax, eax
jne 0x428383
mov eax, dword [ebp - 8]
push eax
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push esi
call fcn.004129df
push ebx
call dword [0x46c004]
add esp, 0x10
jmp 0x428783
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.00413ab1
add esp, 0x10
mov dword [ebp - 4], eax
test eax, eax
je 0x4283bb
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, dword [ebx + 0x1c]
mov dword [ebp - 8], eax
test ebx, ebx
jne 0x428392
jmp 0x4283be
mov eax, dword [ebp - 8]
test ebx, ebx
jne 0x4283e8
push 0x100
lea ecx, [ebp - 0x218]
push ecx
push eax
call fcn.0042c63f
push eax
push str.socket_failure:__s
push esi
call fcn.004129df
add esp, 0x18
jmp 0x428783
push dword [ebx + 0x10]
lea eax, [ebp - 0xa4]
push dword [ebx + 0x18]
push eax
call fcn.00437160
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 0x42876b
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 0x42853a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [ebp + 0xb], 0
je 0x4284b2
mov ecx, 0x2741
cmp eax, ecx
jne 0x4284b2
push 0x100
lea eax, [ebp - 0x218]
push eax
push ecx
call fcn.0042c63f
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.00412a73
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 0x4284cd
mov eax, dword [ebp - 0x10]
movzx eax, ax
mov byte [ebp + 0xb], 0
jmp 0x4284c2
cmp eax, 0x2740
je 0x4284be
cmp eax, 0xd
jne 0x428503
mov eax, dword [ebp - 8]
inc eax
mov ecx, dword [ebp - 0x1c]
cmp ax, cx
jmp 0x42840f
push 0x100
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0042c63f
push eax
push str.getsockname___failed:__s
push esi
call fcn.004129df
push dword [ebp - 0xc]
push edi
push esi
call fcn.00413126
add esp, 0x24
jmp 0x428783
push 0x100
lea ecx, [ebp - 0x218]
push ecx
push eax
call fcn.0042c63f
push eax
mov eax, dword [ebp - 8]
movzx eax, ax
push eax
push str.bind_port_hu__failed:__s
push esi
call fcn.004129df
push dword [ebp - 0xc]
push edi
push esi
call fcn.00413126
add esp, 0x28
jmp 0x428783
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x1c]
cmp ax, cx
ja 0x42876b
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 0x4284cd
push 1
push dword [ebp - 0xc]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x42859e
push 0x100
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0042c63f
push eax
push str.socket_failure:__s
jmp 0x4284eb
push 0x2f
lea eax, [ebp - 0xd4]
push eax
push ebx
call fcn.0041696a
add esp, 0xc
cmp byte [edi + 0x254], 0
jne 0x4285c9
cmp byte [edi + 0x24d], 0
je 0x4285c9
mov byte [edi + 0x254], 1
mov ebx, dword [ebp + 0xc]
push 2
pop edx
cmp ebx, edx
je 0x42862b
mov cx, word [ebp - 0xa4]
cmp byte [edi + 0x254], 0
jne 0x4285e7
test ebx, ebx
je 0x428626
cmp ebx, 1
jne 0x4285f1
cmp cx, dx
jne 0x428626
movzx eax, cx
sub eax, edx
je 0x4285fd
sub eax, 0x15
jne 0x428626
push dword [ebp - 0xa2]
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
mov dword [ebp - 0x10], eax
test ebx, ebx
je 0x4286f4
cmp ebx, 1
je 0x428658
mov cx, word [ebp - 0xa4]
push 2
pop edx
inc ebx
cmp ebx, edx
jne 0x4285da
push edi
push esi
mov dword [edi + 0x498], ebx
call fcn.004261fd
mov eax, dword [ebp - 0xc]
push 0x1c
push esi
mov dword [edi + 0x14c], eax
mov byte [edi + 0x23d], 1
call fcn.004261e9
add esp, 0x10
jmp 0x428766
lea eax, [ebp - 0xd4]
lea edx, [ebp - 0x118]
mov dword [ebp + 8], eax
mov cl, byte [eax]
test cl, cl
je 0x42868c
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 0x428667
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 0x45ebcc
lea eax, [edi + 0x420]
push eax
push esi
call fcn.004339af
add esp, 0x28
mov dword [ebp - 4], eax
test eax, eax
je 0x42862b
push eax
call sym.knocker.exe_curl_easy_strerror
push eax
push str.Failure_sending_PORT_command:__s
push esi
call fcn.004129df
push dword [ebp - 0xc]
push edi
push esi
call fcn.00413126
jmp 0x42875b
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.004339af
add esp, 0x1c
mov dword [ebp - 4], eax
test eax, eax
je 0x42862b
push eax
call sym.knocker.exe_curl_easy_strerror
push eax
push str.Failure_sending_EPRT_command:__s
push esi
call fcn.004129df
push dword [ebp - 0xc]
push edi
push esi
call fcn.00413126
mov dword [edi + 0x498], 1
push 0
push esi
call fcn.004261e9
add esp, 0x24
mov eax, dword [ebp - 4]
jmp 0x428786
push str.bind___failed__we_ran_out_of_ports_
push esi
call fcn.004129df
push dword [ebp - 0xc]
push edi
push esi
call fcn.00413126
add esp, 0x14
push 0x1e
pop eax
pop edi
pop esi
pop ebx
leave
ret