Function at 0x14000502c
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push rbx
add rsp, 0xffffffffffffff80
lea rbp, [rsp + 0x80]
mov dword [rbp + 0x20], ecx
mov qword [rbp + 0x28], rdx
call fcn.140006020
mov qword [rbp - 8], 0
mov qword [rbp - 0x38], 0
mov qword [rbp - 0x10], 0
mov qword [rbp - 0x18], 0
mov word [rbp - 0x1a], 0
mov word [rbp - 0x1c], 0
mov word [rbp - 0x3a], 0
mov word [rbp - 0x1e], 0
mov word [rbp - 0x20], 0
mov qword [rbp - 0x28], 0
mov dword [rbp - 0x2c], 0
call fcn.140002ef8
mov ecx, 0x10
call fcn.1400034a1
mov qword [0x1400121a8], rax
mov ecx, 0x10
call fcn.1400034a1
mov qword [0x1400121b0], rax
mov ecx, 0x2000
call fcn.1400034a1
mov qword [0x1400121c8], rax
mov ecx, 0x2000
call fcn.1400034a1
mov qword [0x1400121d0], rax
mov ecx, 0x208
call fcn.1400034a1
mov qword [0x1400121d8], rax
mov ecx, 0x208
call fcn.1400034a1
mov qword [0x1400121e0], rax
mov ecx, 0x4a
call fcn.1400034a1
mov qword [0x1400121e8], rax
mov ecx, 1
call sub.msvcrt.dll_malloc
mov qword [0x1400121f8], rax
mov rax, qword [0x1400121f8]
mov byte [rax], 1
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov dword [rax], 0
mov dword [0x14000d02c], 4
cmp dword [rbp + 0x20], 1
jne 0x140005686
mov rax, qword [rbp + 0x28]
mov rbx, qword [rax]
mov ecx, 0x400
call fcn.1400034a1
mov qword [rbp + 0x28], rax
mov rax, qword [rbp + 0x28]
mov qword [rax], rbx
mov ecx, 0x2000
call fcn.1400034a1
mov rbx, rax
mov rax, qword [rbp + 0x28]
add rax, 8
mov qword [rax], rbx
mov ecx, 2
mov rax, qword [fcn.14000bef0]
call rax
mov rcx, rax
lea rax, str.Cmd_line:
mov rdx, rax
call fcn.140002e72
mov ecx, 2
mov rax, qword [fcn.14000bef0]
call rax
mov rcx, rax
call sub.msvcrt.dll_fflush
mov r8d, 0x2000
mov rdx, rbx
mov ecx, 0
call sub.msvcrt.dll__read
mov dword [0x14001218c], eax
mov eax, dword [0x14001218c]
test eax, eax
jne 0x1400051ea
lea rax, str.wrong
mov rcx, rax
call fcn.140003349
mov eax, dword [0x14001218c]
mov edx, eax
mov rcx, rbx
call fcn.140003505
mov esi, eax
test esi, esi
je 0x140005210
mov eax, dword [0x14001218c]
mov edx, esi
sub eax, edx
mov dword [0x14001218c], eax
mov eax, dword [0x14001218c]
test eax, eax
je 0x14000523b
mov eax, dword [0x14001218c]
mov ecx, eax
movsxd rax, esi
lea rdx, [rbx + rax]
mov rax, qword [0x1400121c8]
mov r8, rcx
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rax, qword [rbp + 0x28]
add rax, 8
mov rax, qword [rax]
mov edx, 0xa
mov rcx, rax
call sub.msvcrt.dll_strchr
mov rbx, rax
test rbx, rbx
je 0x14000525e
mov byte [rbx], 0
mov rax, qword [rbp + 0x28]
add rax, 8
mov rax, qword [rax]
mov edx, 0xd
mov rcx, rax
call sub.msvcrt.dll_strchr
mov rbx, rax
test rbx, rbx
je 0x140005281
mov byte [rbx], 0
mov rax, qword [rbp + 0x28]
mov rbx, qword [rax + 8]
add rbx, 1
mov esi, 2
jmp 0x1400052c7
movzx eax, byte [rbx]
cmp al, 0x20
jne 0x1400052a0
mov byte [rbx], 0
jmp 0x1400052c3
lea rax, [rbx - 1]
movzx eax, byte [rax]
test al, al
jne 0x1400052c3
movsxd rax, esi
lea rdx, [rax*8]
mov rax, qword [rbp + 0x28]
add rax, rdx
mov qword [rax], rbx
add esi, 1
add rbx, 1
movzx eax, byte [rbx]
test al, al
jne 0x140005294
mov dword [rbp + 0x20], esi
jmp 0x140005686
lea eax, [rsi - 0x47]
cmp eax, 0x33
ja case.0x140005302.72
mov eax, eax
lea rdx, [rax*4]
lea rax, [0x14000ec70]
mov eax, dword [rdx + rax]
cdqe
lea rdx, [0x14000ec70]
add rax, rdx
jmp rax
lea rax, str.all_A_records_NIY
mov rcx, rax
call fcn.140003349
movzx eax, word [0x140012204]
add eax, 1
mov word [0x140012204], ax
jmp 0x140005686
mov rax, qword [0x14000f5c0]
mov rax, qword [rax]
mov qword [0x140012228], rax
jmp 0x140005686
movzx eax, word [0x14001220c]
add eax, 1
mov word [0x14001220c], ax
mov dword [rbp - 0x2c], 1
jmp 0x140005686
mov rax, qword [sym.imp.KERNEL32.dll_FreeConsole]
call rax
jmp 0x140005686
mov rax, qword [0x14000f5c0]
mov rax, qword [rax]
mov rcx, rax
call sub.msvcrt.dll_atoi
mov esi, eax
test esi, esi
je 0x140005393
mov eax, esi
and eax, 0xffffffe3
test eax, eax
jne 0x140005393
mov dword [0x14000d02c], esi
jmp 0x1400053a4
mov edx, esi
lea rax, str.invalid_hop_pointer__d__must_be_multiple_of_4___28
mov rcx, rax
call fcn.140003349
jmp 0x140005686
mov eax, dword [0x140012188]
cmp eax, 8
jle 0x1400053c3
lea rax, str.too_many__g_hops
mov rcx, rax
call fcn.140003349
mov rax, qword [0x1400121b8]
test rax, rax
jne 0x1400053e0
mov ecx, 0x50
call fcn.1400034a1
mov qword [0x1400121b8], rax
movzx eax, word [0x14001220e]
movzx edx, ax
mov rax, qword [0x14000f5c0]
mov rax, qword [rax]
mov rcx, rax
call fcn.1400035cb
mov qword [rbp - 0x48], rax
cmp qword [rbp - 0x48], 0
je 0x140005425
mov rax, qword [0x1400121b8]
mov edx, dword [0x140012188]
movsxd rdx, edx
shl rdx, 3
add rdx, rax
mov rax, qword [rbp - 0x48]
mov qword [rdx], rax
mov eax, dword [0x140012188]
add eax, 1
mov dword [0x140012188], eax
jmp 0x140005686
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov dword [rax], 0
call 0x140005dcc
mov rax, qword [0x14000f5c0]
mov rax, qword [rax]
mov rcx, rax
call sub.msvcrt.dll_atoi
movzx eax, ax
mov dword [0x140012208], eax
mov eax, dword [0x140012208]
imul eax, eax, 0x3e8
mov dword [0x140012208], eax
mov eax, dword [0x140012208]
test eax, eax
jne 0x140005686
mov rax, qword [0x14000f5c0]
mov rax, qword [rax]
mov rdx, rax
lea rax, str.invalid_interval_time__s
mov rcx, rax
call fcn.140003349
jmp 0x140005686
movzx eax, word [0x14001220c]
add eax, 1
mov word [0x14001220c], ax
jmp 0x140005686
movzx eax, word [0x14001220e]
add eax, 1
mov word [0x14001220e], ax
jmp 0x140005686
mov rax, qword [0x14000f5c0]
mov rax, qword [rax]
mov qword [0x1400121f0], rax
movzx eax, word [0x140012210]
add eax, 1
mov word [0x140012210], ax
jmp 0x140005686
mov rax, qword [0x14000f5c0]
mov rax, qword [rax]
mov edx, 0
mov rcx, rax
call fcn.14000393c
mov word [rbp - 0x1a], ax
cmp word [rbp - 0x1a], 0
jne 0x140005686
mov rax, qword [0x14000f5c0]
mov rax, qword [rax]
mov rdx, rax
lea rax, str.invalid_local_port__s
mov rcx, rax
call fcn.140003349
jmp 0x140005686
movzx eax, word [0x140012212]
add eax, 1
mov word [0x140012212], ax
jmp 0x140005686
movzx eax, word [0x14001220e]
movzx edx, ax
mov rax, qword [0x14000f5c0]
mov rax, qword [rax]
mov rcx, rax
call fcn.1400035cb
mov qword [rbp - 0x38], rax
mov rax, qword [rbp - 0x38]
add rax, 0x1c0
mov qword [rbp - 0x10], rax
jmp 0x140005686
movzx eax, word [0x140012230]
add eax, 1
mov word [0x140012230], ax
jmp 0x140005686
movzx eax, word [0x14001221e]
add eax, 1
mov word [0x14001221e], ax
jmp 0x140005686
movzx eax, word [0x140012214]
add eax, 1
mov word [0x140012214], ax
jmp 0x140005686
movzx eax, word [0x140012216]
add eax, 1
mov word [0x140012216], ax
jmp 0x140005686
mov rax, qword [0x14000f5c0]
mov rax, qword [rax]
mov rcx, rax
call sub.msvcrt.dll_atoi
mov dword [0x140012218], eax
mov eax, dword [0x140012218]
test eax, eax
jne 0x140005622
mov rax, qword [0x14000f5c0]
mov rax, qword [rax]
mov rdx, rax
lea rax, str.invalid_wait_time__s
mov rcx, rax
call fcn.140003349
mov ecx, 8
call fcn.1400034a1
mov qword [0x140012198], rax
mov ecx, 8
call fcn.1400034a1
mov qword [0x1400121a0], rax
mov edx, dword [0x140012218]
mov rax, qword [0x140012198]
mov dword [rax], edx
jmp 0x140005686
movzx eax, word [0x14001221c]
add eax, 1
mov word [0x14001221c], ax
jmp 0x140005686
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov dword [rax], 0
lea rax, str.nc__h_for_help
mov rcx, rax
call fcn.140003349
mov rdx, qword [rbp + 0x28]
mov eax, dword [rbp + 0x20]
lea r8, str.ade:g:G:hi:lLno:p:rs:tcuvw:z
mov ecx, eax
call fcn.14000225d
mov esi, eax
cmp esi, 0xffffffff
jne 0x1400052d6
movzx eax, word [0x140012212]
test ax, ax
je 0x1400056d1
mov ecx, 0
call fcn.140002e50
mov ecx, eax
call sub.msvcrt.dll_srand
mov ecx, 0x10000
call fcn.1400034a1
mov qword [rbp - 0x28], rax
mov rax, qword [0x140012228]
test rax, rax
je 0x1400056fa
mov ecx, 0
call sub.msvcrt.dll__close
mov word [0x140012210], 0
mov dword [0x140012184], 0
movzx eax, word [0x140012210]
test ax, ax
je 0x14000575a
mov rax, qword [0x1400121f0]
mov r8d, 0x1b4
mov edx, 0x301
mov rcx, rax
call sub.msvcrt.dll__open
mov dword [0x140012184], eax
mov eax, dword [0x140012184]
test eax, eax
jg 0x140005749
mov rax, qword [0x1400121f0]
mov rdx, rax
lea rax, str.cant_open__s
mov rcx, rax
call fcn.140003349
mov ecx, 0x64
call fcn.1400034a1
mov qword [0x1400121f0], rax
mov rax, qword [0x14000f5d0]
mov eax, dword [rax]
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x28]
add rax, rdx
mov rax, qword [rax]
test rax, rax
je 0x1400057af
movzx eax, word [0x14001220e]
movzx edx, ax
mov rax, qword [0x14000f5d0]
mov eax, dword [rax]
cdqe
lea rcx, [rax*8]
mov rax, qword [rbp + 0x28]
add rax, rcx
mov rax, qword [rax]
mov rcx, rax
call fcn.1400035cb
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
je 0x1400057d3
mov rax, qword [rbp - 8]
add rax, 0x1c0
test rax, rax
je 0x1400057d3
mov rax, qword [rbp - 8]
add rax, 0x1c0
mov qword [rbp - 0x18], rax
cmp qword [rbp - 0x18], 0
je 0x1400057ef
mov rax, qword [0x14000f5d0]
mov eax, dword [rax]
lea edx, [rax + 1]
mov rax, qword [0x14000f5d0]
mov dword [rax], edx
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov dword [rax], 0
movzx eax, word [0x14001220c]
test ax, ax
je 0x14000594e
mov word [rbp - 0x20], 0
mov rax, qword [0x14000f5d0]
mov eax, dword [rax]
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x28]
add rax, rdx
mov rax, qword [rax]
test rax, rax
je 0x14000589a
mov rax, qword [0x14000f5d0]
mov eax, dword [rax]
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x28]
add rax, rdx
mov rax, qword [rax]
mov edx, 0
mov rcx, rax
call fcn.14000393c
mov word [rbp - 0x20], ax
cmp word [rbp - 0x20], 0
jne 0x14000589a
mov rax, qword [0x14000f5d0]
mov eax, dword [rax]
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x28]
add rax, rdx
mov rax, qword [rax]
mov rdx, rax
lea rax, str.invalid_port__s
mov rcx, rax
call fcn.140003349
movzx r8d, word [rbp - 0x1a]
movzx edx, word [rbp - 0x20]
mov rcx, qword [rbp - 0x10]
mov rax, qword [rbp - 0x18]
mov r9d, r8d
mov r8, rcx
mov rcx, rax
call fcn.140004002
mov dword [0x14000d010], eax
mov eax, dword [0x14000d010]
test eax, eax
jle 0x14000593f
mov rax, qword [0x140012228]
test rax, rax
je 0x1400058e5
mov eax, dword [0x14000d010]
cdqe
mov rcx, rax
call fcn.140002550
mov rax, qword [0x140012228]
test rax, rax
jne 0x140005900
mov eax, dword [0x14000d010]
mov ecx, eax
call fcn.140004934
mov esi, eax
movzx eax, word [0x140012216]
cmp ax, 1
jbe 0x14000592d
mov edx, dword [0x140012190]
mov eax, dword [0x140012194]
mov r8d, edx
mov edx, eax
lea rax, str._sent__d__rcvd__d
mov rcx, rax
call fcn.140003252
cmp dword [rbp - 0x2c], 1
jne 0x140005938
jmp 0x140005144
mov ecx, esi
call sub.msvcrt.dll_exit
lea rax, str.no_connection
mov rcx, rax
call fcn.140003349
cmp qword [rbp - 0x18], 0
jne 0x140005964
lea rax, str.no_destination
mov rcx, rax
call fcn.140003349
mov rax, qword [0x14000f5d0]
mov eax, dword [rax]
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x28]
add rax, rdx
mov rax, qword [rax]
test rax, rax
jne 0x140005995
lea rax, str.no_port_s__to_connect_to
mov rcx, rax
call fcn.140003349
mov rax, qword [0x14000f5d0]
mov eax, dword [rax]
cdqe
add rax, 1
lea rdx, [rax*8]
mov rax, qword [rbp + 0x28]
add rax, rdx
mov rax, qword [rax]
test rax, rax
je 0x1400059c4
mov word [0x14000d030], 0
movzx eax, word [rbp - 0x1a]
mov word [rbp - 0x1c], ax
jmp 0x140005d38
mov word [rbp - 0x3a], 0
movzx eax, word [rbp - 0x3a]
mov word [rbp - 0x1e], ax
mov rax, qword [0x14000f5d0]
mov eax, dword [rax]
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x28]
add rax, rdx
mov rax, qword [rax]
mov edx, 0x2d
mov rcx, rax
call sub.msvcrt.dll_strchr
mov rbx, rax
test rbx, rbx
je 0x140005a42
mov byte [rbx], 0
add rbx, 1
mov edx, 0
mov rcx, rbx
call fcn.14000393c
mov word [rbp - 0x1e], ax
cmp word [rbp - 0x1e], 0
jne 0x140005a42
mov rdx, rbx
lea rax, str.invalid_port__s
mov rcx, rax
call fcn.140003349
mov rax, qword [0x14000f5d0]
mov eax, dword [rax]
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x28]
add rax, rdx
mov rax, qword [rax]
mov edx, 0
mov rcx, rax
call fcn.14000393c
mov word [rbp - 0x3a], ax
cmp word [rbp - 0x3a], 0
jne 0x140005aa6
mov rax, qword [0x14000f5d0]
mov eax, dword [rax]
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x28]
add rax, rdx
mov rax, qword [rax]
mov rdx, rax
lea rax, str.invalid_port__s
mov rcx, rax
call fcn.140003349
movzx eax, word [rbp - 0x1e]
cmp word [rbp - 0x3a], ax
jae 0x140005afd
mov word [0x14000d030], 0
movzx eax, word [rbp - 0x1e]
mov word [rbp - 0x20], ax
movzx eax, word [0x140012212]
test ax, ax
je 0x140005d15
movzx ecx, word [rbp - 0x1e]
movzx edx, word [rbp - 0x3a]
mov rax, qword [rbp - 0x28]
mov r8d, ecx
mov rcx, rax
call fcn.140003be2
mov rax, qword [rbp - 0x28]
mov rcx, rax
call fcn.140003b50
mov word [rbp - 0x20], ax
jmp 0x140005d15
movzx eax, word [rbp - 0x3a]
mov word [rbp - 0x20], ax
jmp 0x140005d15
cmp word [rbp - 0x1a], 0
jne 0x140005b34
movzx eax, word [0x140012212]
test ax, ax
je 0x140005b34
call sub.msvcrt.dll_rand
mov word [rbp - 0x1c], ax
cmp word [rbp - 0x1c], 0x1fff
ja 0x140005b34
add word [rbp - 0x1c], 0x2000
movzx eax, word [rbp - 0x20]
mov edx, eax
mov ecx, 0
call fcn.14000393c
mov word [rbp - 0x20], ax
movzx r8d, word [rbp - 0x1c]
movzx edx, word [rbp - 0x20]
mov rcx, qword [rbp - 0x10]
mov rax, qword [rbp - 0x18]
mov r9d, r8d
mov r8, rcx
mov rcx, rax
call fcn.140003c72
mov dword [0x14000d010], eax
mov eax, dword [0x14000d010]
test eax, eax
jle 0x140005ba6
movzx eax, word [0x14001221c]
test ax, ax
je 0x140005ba6
movzx eax, word [0x140012214]
test ax, ax
je 0x140005ba6
mov eax, dword [0x14000d010]
mov rdx, qword [rbp - 0x18]
mov ecx, eax
call fcn.14000450d
mov dword [0x14000d010], eax
mov eax, dword [0x14000d010]
test eax, eax
jle 0x140005c3c
mov esi, 0
mov rax, qword [0x1400121e8]
mov r8, rax
movzx edx, word [rbp - 0x20]
mov rax, qword [rbp - 8]
lea rcx, [rax + 0x100]
mov rax, qword [rbp - 8]
mov qword [rsp + 0x20], r8
mov r9d, edx
mov r8, rcx
mov rdx, rax
lea rax, str._s___s___d___s__open
mov rcx, rax
call fcn.140003252
mov rax, qword [0x140012228]
test rax, rax
je 0x140005c0f
mov eax, dword [0x14000d010]
cdqe
mov rcx, rax
call fcn.140002550
movzx eax, word [0x14001221c]
test ax, ax
jne 0x140005ca4
mov rax, qword [0x140012228]
test rax, rax
jne 0x140005ca4
mov eax, dword [0x14000d010]
mov ecx, eax
call fcn.140004934
mov esi, eax
jmp 0x140005ca4
mov esi, 1
movzx eax, word [0x14000d030]
test ax, ax
jne 0x140005c6a
movzx eax, word [0x140012216]
cmp ax, 1
ja 0x140005c6a
mov rax, qword [sym.imp.WSOCK32.dll_WSAGetLastError]
call rax
cmp eax, 0x274d
je 0x140005ca4
mov rax, qword [0x1400121e8]
mov r8, rax
movzx edx, word [rbp - 0x20]
mov rax, qword [rbp - 8]
lea rcx, [rax + 0x100]
mov rax, qword [rbp - 8]
mov qword [rsp + 0x20], r8
mov r9d, edx
mov r8, rcx
mov rdx, rax
lea rax, str._s___s___d___s_
mov rcx, rax
call fcn.140003252
mov eax, dword [0x14000d010]
cdqe
mov edx, 2
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_shutdown]
call rax
mov eax, dword [0x14000d010]
cdqe
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_closesocket]
call rax
mov eax, dword [0x140012208]
test eax, eax
je 0x140005cec
mov eax, dword [0x140012208]
mov ecx, eax
mov rax, qword [sym.imp.msvcrt.dll__sleep]
call rax
movzx eax, word [0x140012212]
test ax, ax
je 0x140005d0a
mov rax, qword [rbp - 0x28]
mov rcx, rax
call fcn.140003b50
mov word [rbp - 0x20], ax
jmp 0x140005d15
movzx eax, word [rbp - 0x20]
sub eax, 1
mov word [rbp - 0x20], ax
movzx eax, word [rbp - 0x3a]
cmp word [rbp - 0x20], ax
jae 0x140005b0a
mov rax, qword [0x14000f5d0]
mov eax, dword [rax]
lea edx, [rax + 1]
mov rax, qword [0x14000f5d0]
mov dword [rax], edx
mov rax, qword [0x14000f5d0]
mov eax, dword [rax]
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x28]
add rax, rdx
mov rax, qword [rax]
test rax, rax
jne 0x1400059d1
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov dword [rax], 0
movzx eax, word [0x140012216]
cmp ax, 1
jbe 0x140005d9a
mov edx, dword [0x140012190]
mov eax, dword [0x140012194]
mov r8d, edx
mov edx, eax
lea rax, str.sent__d__rcvd__d
mov rcx, rax
call fcn.140003252
mov rax, qword [sym.imp.WSOCK32.dll_WSACleanup]
call rax
cmp dword [rbp - 0x2c], 1
jne 0x140005dae
jmp 0x140005144
movzx eax, word [0x14000d030]
test ax, ax
je 0x140005dc1
mov ecx, esi
call sub.msvcrt.dll_exit
mov ecx, 0
call sub.msvcrt.dll_exit
nop
push rbp
mov rbp, rsp
mov word [0x140012216], 1
mov eax, 0
pop rbp
ret