Function at 0x140128670
Capabilities:
Convert ip address from string

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xd0
mov rax, qword [0x1401ac580]
xor rax, rsp
mov qword [rbp + 0x1f], rax
mov dword [rbp - 0x75], r8d
mov r14, rdx
mov qword [rbp - 0x59], rdx
mov rbx, rcx
mov byte [rbp - 0x79], 0
mov r12d, 3
test rcx, rcx
je 0x14012898f
mov r15, 0xffffffffffffffff
mov rsi, r15
inc rsi
cmp byte [rcx + rsi], 0
jne 0x1401286c5
cmp rsi, 0x7a1200
ja 0x14012898f
lea rcx, [rsi*2 + 2]
call qword [sub.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [r14 + 0x50], rax
mov rdi, rax
test rax, rax
je 0x1401291ca
lea r13, [rsi + 1]
xor edx, edx
add r13, rax
mov qword [rbp - 0x31], r13
mov byte [r13], 0
movzx ecx, byte [rbx]
lea eax, [rcx - 0x61]
cmp al, 0x19
jbe 0x14012871d
sub cl, 0x41
cmp cl, 0x19
ja 0x140128723
cmp byte [rbx + 1], 0x3a
je 0x140128798
lea rcx, [rbp - 0x21]
mov qword [rbp - 0x51], rdx
sub rcx, rbx
mov rax, rdx
mov qword [rbp - 0x41], rcx
mov r15, rbx
nop dword [rax + rax]
movzx esi, byte [r15]
test sil, sil
je 0x140128792
cmp sil, 0x3a
jne 0x140128756
cmp byte [r15 + 1], 0x2f
je 0x1401287c0
mov ecx, esi
call fcn.1401022c0
test eax, eax
jne 0x14012876e
lea eax, [rsi - 0x2b]
test al, 0xfc
jne 0x140128792
cmp sil, 0x2c
je 0x140128792
mov ecx, esi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_tolower]
mov rcx, qword [rbp - 0x41]
mov byte [rcx + r15], al
inc r15
mov rax, qword [rbp - 0x51]
inc rax
mov qword [rbp - 0x51], rax
cmp rax, 0x29
jb 0x140128740
xor edx, edx
lea r15, [rdx - 1]
mov ecx, dword [rbp - 0x75]
mov rax, rdi
mov byte [rax], 0
test ecx, 0x204
je 0x14012898f
test cl, 4
lea r14, str.https
cmove r14, rdx
jmp 0x1401289bc
mov r15, 0xffffffffffffffff
mov byte [rbp + rax - 0x21], 0
mov rsi, r15
lea rax, [rbp - 0x21]
inc rsi
cmp byte [rax + rsi], 0
jne 0x1401287d3
lea rdx, str.file
lea rcx, [rbp - 0x21]
call fcn.140102430
test eax, eax
je 0x140128920
add rbx, 5
mov rdx, rdi
sub rdx, rbx
nop
movzx eax, byte [rbx]
mov byte [rbx + rdx], al
lea rbx, [rbx + 1]
test al, al
jne 0x140128800
lea rcx, str.file
call qword [case.0x140104b19.0]
mov qword [r14], rax
test rax, rax
je 0x1401291ca
movzx eax, byte [rdi]
cmp al, 0x2f
jne 0x140128905
cmp byte [rdi + 1], al
jne 0x1401288b6
movzx ecx, byte [rdi + 2]
add rdi, 2
movzx eax, cl
cmp cl, 0x2f
je 0x1401288b2
lea eax, [rcx - 0x61]
cmp al, 0x19
jbe 0x140128855
lea eax, [rcx - 0x41]
cmp al, 0x19
ja 0x140128876
movzx eax, byte [rdi + 1]
cmp al, 0x3a
je 0x140128861
cmp al, 0x7c
jne 0x140128876
movzx edx, byte [rdi + 2]
movzx eax, cl
cmp dl, 0x2f
je 0x1401288b2
cmp dl, 0x5c
je 0x1401288b2
test dl, dl
je 0x1401288b2
mov r8d, 0xa
lea rcx, str.localhost_
mov rdx, rdi
call fcn.1401025e0
test eax, eax
jne 0x1401288aa
lea r8d, [rax + 0xa]
mov rdx, rdi
lea rcx, str.127.0.0.1_
call fcn.1401025e0
test eax, eax
je 0x14012898f
movzx eax, byte [rdi + 9]
add rdi, 9
cmp al, 0x2f
jne 0x140128905
movzx ecx, byte [rdi + 1]
lea rdx, [rdi + 1]
lea eax, [rcx - 0x61]
cmp al, 0x19
jbe 0x1401288cd
sub cl, 0x41
cmp cl, 0x19
ja 0x140128905
movzx eax, byte [rdi + 2]
cmp al, 0x3a
je 0x1401288d9
cmp al, 0x7c
jne 0x140128905
movzx eax, byte [rdi + 3]
cmp al, 0x2f
je 0x1401288e9
cmp al, 0x5c
je 0x1401288e9
test al, al
jne 0x140128905
mov r8, r15
nop dword [rax]
inc r8
cmp byte [rdx + r8], 0
jne 0x1401288f0
inc r8
mov rcx, rdi
call sub.VCRUNTIME140.dll_memmove
xor r13d, r13d
mov eax, r13d
mov r14d, r13d
mov qword [rbp - 0x31], rax
test rdi, rdi
je 0x140128a76
jmp 0x140128a49
xor ecx, ecx
mov byte [rdi], 0
inc rbx
mov eax, ecx
add rbx, rsi
je 0x14012898f
nop
cmp byte [rbx], 0x2f
jne 0x140128942
cmp eax, 4
jge 0x140128942
inc eax
add rbx, 1
jne 0x140128930
dec eax
cmp eax, 2
ja 0x14012898f
lea rcx, [rbp - 0x21]
lea r14, [rbp - 0x21]
call fcn.14010bda0
test rax, rax
jne 0x140128968
test byte [rbp - 0x75], 8
jne 0x140128968
mov eax, 5
jmp 0x140128992
lea rax, [rbp - 0x21]
mov rsi, r15
nop
inc rsi
cmp byte [rax + rsi], 0
jne 0x140128970
lea rdx, [0x1401638d0]
lea rcx, [rbp - 0x21]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcspn]
cmp rax, rsi
je 0x1401289b9
mov eax, r12d
mov rcx, qword [rbp + 0x1f]
xor rcx, rsp
call fcn.1400e74c0
mov rbx, qword [rsp + 0x120]
add rsp, 0xd0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov ecx, dword [rbp - 0x75]
movzx eax, byte [rbx]
mov rdx, rbx
test al, al
je 0x1401289e5
movabs r8, 0x8000800800000000
cmp al, 0x3f
ja 0x1401289da
bt r8, rax
jb 0x1401289e5
movzx eax, byte [rbx + 1]
inc rbx
test al, al
jne 0x1401289d0
mov rsi, rbx
sub rsi, rdx
je 0x1401289ff
mov r8, rsi
mov rcx, r13
call sub.VCRUNTIME140.dll_memcpy
mov byte [rsi + r13], 0
jmp 0x140128a05
bt ecx, 0xa
jae 0x14012898f
mov rsi, r15
nop dword [rax + rax]
inc rsi
cmp byte [rbx + rsi], 0
jne 0x140128a10
mov r8, rsi
mov rdx, rbx
mov rcx, rdi
call sub.VCRUNTIME140.dll_memcpy
mov byte [rsi + rdi], 0
test r14, r14
je 0x140128a49
mov rcx, r14
call qword [case.0x140104b19.0]
mov rcx, qword [rbp - 0x59]
mov qword [rcx], rax
test rax, rax
je 0x1401291ca
mov rbx, r15
nop dword [rax]
inc rbx
cmp byte [rdi + rbx], 0
jne 0x140128a50
lea rdx, [0x1401638d0]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcspn]
cmp rax, rbx
jne 0x14012898f
mov rax, qword [rbp - 0x31]
mov ebx, dword [rbp - 0x75]
mov r13, rdi
mov qword [rbp - 0x69], r14
mov rsi, rax
test bl, bl
jns 0x140128bc4
cmp byte [rdi], 0
mov qword [rbp - 0x69], r14
je 0x140128bc4
mov rax, r15
nop dword [rax + rax]
cmp byte [rdi + rax + 1], 0
lea rax, [rax + 1]
jne 0x140128aa0
lea rcx, [rax + rax*2]
call qword [sub.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rbp - 0x51], rax
mov r13, rax
test rax, rax
je 0x1401291ca
cmp byte [rdi], 0
mov rbx, rax
mov rax, qword [rbp - 0x31]
mov r8b, 1
mov rsi, rax
mov byte [rbp - 0x79], 1
mov qword [rbp - 0x69], r14
je 0x140128bb4
mov qword [rbp - 0x69], r14
mov r15, rdi
xor r13d, r13d
nop dword [rax]
cmp rdi, r15
jae 0x140128aff
movzx eax, byte [rdi]
mov byte [rbx], al
jmp 0x140128b9a
movzx edx, byte [rdi]
cmp dl, 0x20
je 0x140128b84
cmp dl, 0x3f
movzx eax, r8b
mov ecx, r13d
mov r14d, edx
cmovne ecx, eax
mov byte [rbp - 0x71], cl
mov ecx, edx
call fcn.140102300
test eax, eax
jne 0x140128b68
mov ecx, r14d
call fcn.1401023a0
test eax, eax
jne 0x140128b68
mov ecx, r14d
call fcn.140102340
test eax, eax
jne 0x140128b68
movzx r9d, byte [rdi]
lea r8, str.___02x
lea edx, [rax + 4]
mov rcx, rbx
call fcn.140120dc0
mov rcx, qword [rbp - 0x69]
mov rax, r12
movzx r8d, byte [rbp - 0x71]
add rbx, rax
mov qword [rbp - 0x69], rcx
jmp 0x140128b9d
movzx eax, byte [rdi]
mov rcx, qword [rbp - 0x69]
movzx r8d, byte [rbp - 0x71]
mov byte [rbx], al
mov eax, 1
add rbx, rax
mov qword [rbp - 0x69], rcx
jmp 0x140128b9d
test r8b, r8b
je 0x140128b97
mov word [rbx], 0x3225
mov byte [rbx + 2], 0x30
add rbx, r12
jmp 0x140128b9d
mov byte [rbx], 0x2b
inc rbx
inc rdi
cmp byte [rdi], r13b
jne 0x140128af0
mov r13, qword [rbp - 0x51]
mov r15, 0xffffffffffffffff
mov rdi, qword [rbp - 0x59]
mov byte [rbx], 0
mov ebx, dword [rbp - 0x75]
mov qword [rdi + 0x58], r13
jmp 0x140128bc8
mov rdi, qword [rbp - 0x59]
mov edx, 0x23
mov rcx, r13
call sub.VCRUNTIME140.dll_strchr
test rax, rax
je 0x140128bfa
mov byte [rax], 0
cmp byte [rax + 1], 0
je 0x140128bfa
lea rcx, [rax + 1]
call qword [case.0x140104b19.0]
mov qword [rdi + 0x48], rax
test rax, rax
je 0x1401291ca
mov edx, 0x3f
mov rcx, r13
call sub.VCRUNTIME140.dll_strchr
test rax, rax
je 0x140128c26
lea rcx, [rax + 1]
mov byte [rax], 0
call qword [case.0x140104b19.0]
mov qword [rdi + 0x40], rax
test rax, rax
je 0x1401291ca
cmp byte [r13], 0
je 0x140128cb7
test bl, 0x10
jne 0x140128c8f
mov rcx, r13
call fcn.140135500
mov rbx, rax
test rax, rax
je 0x1401291ca
mov r8, r13
sub r8, rax
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x140128c63
inc rax
test ecx, ecx
jne 0x140128c50
test edx, edx
je 0x140128c86
cmp byte [rbp - 0x79], 0
je 0x140128c7d
mov rcx, qword [rdi + 0x58]
call qword [0x1401ac608]
xor eax, eax
mov qword [rdi + 0x58], rax
mov r13, rbx
mov qword [rdi + 0x58], rbx
jmp 0x140128ca1
mov rcx, rbx
call qword [0x1401ac608]
cmp byte [rbp - 0x79], 0
jne 0x140128ca1
mov rcx, r13
call qword [case.0x140104b19.0]
mov r13, rax
mov qword [rdi + 0x38], r13
test r13, r13
je 0x1401291ca
xor r13d, r13d
mov qword [rdi + 0x58], r13
jmp 0x140128cba
xor r13d, r13d
test rsi, rsi
je 0x1401291a5
mov rbx, r15
inc rbx
cmp byte [rsi + rbx], 0
jne 0x140128cc6
lea rdx, [0x1401638d0]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcspn]
cmp rax, rbx
jne 0x14012898f
mov edx, 0x40
mov qword [rbp - 0x39], r13
mov rcx, rsi
mov qword [rbp - 0x41], r13
mov r14d, r13d
mov qword [rbp - 0x51], r13
call sub.VCRUNTIME140.dll_strchr
mov rdi, rax
mov rbx, rsi
test rax, rax
je 0x140128da2
mov r14, qword [rbp - 0x59]
inc rdi
mov rbx, rdi
mov rcx, qword [r14]
test rcx, rcx
je 0x140128d3f
call fcn.14010bda0
test rax, rax
je 0x140128d3f
test dword [rax + 0x84], 0x400
lea rax, [rbp - 0x51]
jne 0x140128d42
mov rax, r13
sub rdi, rsi
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x41]
mov rcx, rsi
lea r8, [rbp - 0x39]
lea rdx, [rdi - 1]
call fcn.14010cd40
mov rcx, qword [rbp - 0x39]
test eax, eax
je 0x140128d6b
mov r14d, r12d
jmp 0x140128da6
mov r13d, dword [rbp - 0x75]
test rcx, rcx
je 0x140128d86
test r13b, 0x20
je 0x140128d82
mov r14d, 8
jmp 0x140128daa
mov qword [r14 + 8], rcx
mov rax, qword [rbp - 0x41]
test rax, rax
je 0x140128d93
mov qword [r14 + 0x10], rax
mov rax, qword [rbp - 0x51]
test rax, rax
je 0x140128dd5
mov qword [r14 + 0x18], rax
jmp 0x140128dd5
mov rcx, qword [rbp - 0x39]
mov r13d, dword [rbp - 0x75]
call qword [0x1401ac608]
mov rcx, qword [rbp - 0x41]
call qword [0x1401ac608]
mov rcx, qword [rbp - 0x51]
call qword [0x1401ac608]
test r14d, r14d
je 0x140128dd1
mov eax, r14d
jmp 0x140128992
mov r14, qword [rbp - 0x59]
lea r9, [rbp - 0x61]
mov rcx, rbx
lea r8, [rbp - 0x79]
lea rdx, str.__45_0123456789abcdefABCDEF:.__c_n
call fcn.1400eca60
cmp eax, 1
jne 0x140128e5e
movzx eax, byte [rbp - 0x79]
cmp al, 0x5d
jne 0x140128dff
movsxd rax, dword [rbp - 0x61]
jmp 0x140128e3d
cmp al, 0x25
jne 0x14012898f
movsxd rdi, dword [rbp - 0x61]
lea r9, [rbp - 0x61]
lea r8, [rbp - 0x79]
lea rdx, str._____c_n
lea rcx, [rbx + rdi]
call fcn.1400eca60
cmp eax, 1
jne 0x14012898f
cmp byte [rbp - 0x79], 0x5d
jne 0x14012898f
mov eax, dword [rbp - 0x61]
add eax, edi
cdqe
lea rdi, [rax + rbx]
test rdi, rdi
je 0x140128f04
movzx eax, byte [rdi]
test al, al
je 0x140128f04
cmp al, 0x3a
je 0x140128e77
jmp 0x14012898f
mov edx, 0x3a
mov rcx, rbx
call sub.VCRUNTIME140.dll_strchr
mov rdi, rax
test rax, rax
je 0x140128f04
movzx eax, byte [rdi + 1]
test al, al
jne 0x140128e86
mov byte [rdi], al
jmp 0x140128f0c
mov ecx, eax
call fcn.140102320
test eax, eax
je 0x140128ef9
mov r8d, 0xa
lea rdx, [rbp - 0x49]
lea rcx, [rdi + 1]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtol]
mov esi, eax
dec eax
cmp eax, 0xfffe
ja 0x140128ef9
mov rax, qword [rbp - 0x49]
cmp byte [rax], 0
jne 0x140128ef9
mov byte [rdi], 0
lea r8, [0x140162568]
mov r9d, esi
mov byte [rax], 0
mov edx, 7
lea rcx, [rbp - 0x31]
call fcn.140120dc0
lea rcx, [rbp - 0x31]
mov dword [r14 + 0x60], esi
call qword [case.0x140104b19.0]
mov qword [r14 + 0x30], rax
test rax, rax
jne 0x140128f04
mov r12d, 7
jmp 0x14012898f
mov r12d, 4
jmp 0x14012898f
mov rax, qword [rbp - 0x69]
mov qword [rbp - 0x69], rax
mov rax, r15
nop
inc rax
cmp byte [rbx + rax], 0
jne 0x140128f10
test rax, rax
jne 0x140128f29
bt r13d, 0xa
jb 0x14012908e
mov r14, rbx
nop dword [rax]
inc r15
cmp byte [rbx + r15], 0
jne 0x140128f30
cmp byte [rbx], 0x5b
jne 0x140129060
cmp r15, 4
jb 0x14012898f
sub r15, 2
lea r14, [rbx + 1]
cmp byte [r15 + r14], 0x5d
jne 0x14012898f
lea rdx, str.0123456789abcdefABCDEF:.
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strspn]
cmp r15, rax
je 0x140129039
cmp byte [rax + r14], 0x25
lea r15, [rax + r14]
mov qword [rbp - 0x49], rax
jne 0x14012898f
xor eax, eax
lea rdx, [0x140163960]
lea rcx, [r15 + 1]
mov esi, eax
lea rdi, [r15 + 1]
lea r8d, [rax + 2]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x140128fc0
movzx eax, byte [r15 + 3]
lea rcx, [r15 + 3]
test al, al
je 0x140128fc0
cmp al, 0x5d
cmovne rdi, rcx
movzx eax, byte [rdi]
test al, al
je 0x14012898f
xor ecx, ecx
lea rdx, [rbp - 0x31]
sub rdx, rdi
cmp al, 0x5d
je 0x140128ff1
cmp rcx, 0xf
jge 0x140128ff1
mov byte [rdi + rdx], al
inc esi
movzx eax, byte [rdi + 1]
inc rdi
inc rcx
test al, al
jne 0x140128fd4
test esi, esi
je 0x14012898f
cmp byte [rdi], 0x5d
jne 0x14012898f
movsxd rax, esi
cmp rax, 0x10
jae 0x1401291d4
lea rcx, [rbp - 0x31]
mov byte [rbp + rax - 0x31], 0
call qword [case.0x140104b19.0]
mov rcx, qword [rbp - 0x59]
mov qword [rcx + 0x28], rax
test rax, rax
je 0x140128eee
mov word [r15], 0x5d
mov r15, qword [rbp - 0x49]
lea r8, [rbp + 0xf]
mov byte [r15 + r14], 0
mov rdx, r14
mov ecx, reloc.WS2_32.dll_socket
call qword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x14012898f
mov byte [r15 + r14], 0x5d
jmp 0x140129079
lea rdx, [0x1401512d0]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcspn]
cmp r15, rax
jne 0x14012898f
cmp byte [r14], 0
jne 0x14012908a
mov r12d, recv
jmp 0x14012898f
mov r13d, dword [rbp - 0x75]
mov rcx, rbx
call qword [case.0x140104b19.0]
mov rdi, qword [rbp - 0x59]
mov qword [rdi + 0x20], rax
test rax, rax
je 0x1401291ca
bt r13d, 9
jae 0x1401291a5
cmp qword [rbp - 0x69], 0
jne 0x1401291a5
mov r8d, 4
lea rcx, str.ftp.
mov rdx, rbx
call fcn.1401025e0
test eax, eax
je 0x1401290e3
lea rcx, [0x1401607a8]
jmp 0x140129197
mov r8d, 5
lea rcx, str.dict.
mov rdx, rbx
call fcn.1401025e0
test eax, eax
je 0x140129108
lea rcx, str.dict
jmp 0x140129197
mov r8d, 5
lea rcx, str.ldap.
mov rdx, rbx
call fcn.1401025e0
test eax, eax
je 0x14012912a
lea rcx, str.ldap
jmp 0x140129197
mov r8d, 5
lea rcx, str.imap.
mov rdx, rbx
call fcn.1401025e0
test eax, eax
je 0x14012914c
lea rcx, str.imap
jmp 0x140129197
mov r8d, 5
lea rcx, str.smtp.
mov rdx, rbx
call fcn.1401025e0
test eax, eax
je 0x14012916e
lea rcx, str.smtp
jmp 0x140129197
mov r8d, 5
lea rcx, str.pop3.
mov rdx, rbx
call fcn.1401025e0
test eax, eax
lea rcx, str.pop3
lea rdx, str.http
cmove rcx, rdx
call qword [case.0x140104b19.0]
mov qword [rdi], rax
test rax, rax
je 0x1401291ca
mov rcx, qword [rdi + 0x50]
call qword [0x1401ac608]
mov rcx, qword [rdi + 0x58]
xor ebx, ebx
mov qword [rdi + 0x50], rbx
call qword [0x1401ac608]
xor eax, eax
mov qword [rdi + 0x58], rbx
jmp 0x140128992
mov eax, 7
jmp 0x140128992
call fcn.1400e7d3c
int3