Function at 0x140004eda
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 sym.__main
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 sym.res_init
mov ecx, 0x10
call sym.Hmalloc
mov qword [0x1400121a8], rax
mov ecx, 0x10
call sym.Hmalloc
mov qword [0x1400121b0], rax
mov ecx, 0x2000
call sym.Hmalloc
mov qword [0x1400121c8], rax
mov ecx, 0x2000
call sym.Hmalloc
mov qword [0x1400121d0], rax
mov ecx, 0x208
call sym.Hmalloc
mov qword [0x1400121d8], rax
mov ecx, 0x208
call sym.Hmalloc
mov qword [0x1400121e0], rax
mov ecx, 0x4a
call sym.Hmalloc
mov qword [0x1400121e8], rax
mov ecx, 1
call sym.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 0x14000551b
mov rax, qword [rbp + 0x28]
mov rbx, qword [rax]
mov ecx, 0x400
call sym.Hmalloc
mov qword [rbp + 0x28], rax
mov rax, qword [rbp + 0x28]
mov qword [rax], rbx
mov ecx, 0x2000
call sym.Hmalloc
mov rbx, rax
mov rax, qword [rbp + 0x28]
add rax, 8
mov qword [rax], rbx
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov rcx, rax
lea rax, str.Cmd_line:
mov rdx, rax
call sym.fprintf_1
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov rcx, rax
call sym.fflush
mov r8d, 0x2000
mov rdx, rbx
mov ecx, 0
call sym.read
mov dword [0x14001218c], eax
mov eax, dword [0x14001218c]
test eax, eax
jne 0x140005098
lea rax, str.wrong
mov rcx, rax
call sym.bail
mov eax, dword [0x14001218c]
mov edx, eax
mov rcx, rbx
call sym.findline
mov esi, eax
test esi, esi
je 0x1400050be
mov eax, dword [0x14001218c]
mov edx, esi
sub eax, edx
mov dword [0x14001218c], eax
mov eax, dword [0x14001218c]
test eax, eax
je 0x1400050e9
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 sym.memcpy
mov rax, qword [rbp + 0x28]
add rax, 8
mov rax, qword [rax]
mov edx, 0xa
mov rcx, rax
call sym.strchr
mov rbx, rax
test rbx, rbx
je 0x14000510c
mov byte [rbx], 0
mov rax, qword [rbp + 0x28]
add rax, 8
mov rax, qword [rax]
mov edx, 0xd
mov rcx, rax
call sym.strchr
mov rbx, rax
test rbx, rbx
je 0x14000512f
mov byte [rbx], 0
mov rax, qword [rbp + 0x28]
mov rbx, qword [rax + 8]
add rbx, 1
mov esi, 2
jmp 0x140005175
movzx eax, byte [rbx]
cmp al, 0x20
jne 0x14000514e
mov byte [rbx], 0
jmp 0x140005171
lea rax, [rbx - 1]
movzx eax, byte [rax]
test al, al
jne 0x140005171
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 0x140005142
mov dword [rbp + 0x20], esi
jmp 0x14000551b
lea eax, [rsi - 0x47]
cmp eax, 0x33
ja case.0x1400051b0.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 sym.bail
movzx eax, word [0x140012204]
add eax, 1
mov word [0x140012204], ax
jmp 0x14000551b
mov rax, qword [0x14000f9a0]
mov rax, qword [rax]
mov qword [0x140012228], rax
jmp 0x14000551b
movzx eax, word [0x14001220c]
add eax, 1
mov word [0x14001220c], ax
mov dword [rbp - 0x2c], 1
jmp 0x14000551b
mov rax, qword [sym.imp.KERNEL32.dll_FreeConsole]
call rax
jmp 0x14000551b
mov rax, qword [0x14000f9a0]
mov rax, qword [rax]
mov rcx, rax
call sym.atoi
mov esi, eax
test esi, esi
je 0x140005241
mov eax, esi
and eax, 0xffffffe3
test eax, eax
jne 0x140005241
mov dword [0x14000d02c], esi
jmp 0x140005252
mov edx, esi
lea rax, str.invalid_hop_pointer__d__must_be_multiple_of_4___28
mov rcx, rax
call sym.bail
jmp 0x14000551b
mov eax, dword [0x140012188]
cmp eax, 8
jle 0x140005271
lea rax, str.too_many__g_hops
mov rcx, rax
call sym.bail
mov rax, qword [0x1400121b8]
test rax, rax
jne 0x14000528e
mov ecx, 0x50
call sym.Hmalloc
mov qword [0x1400121b8], rax
movzx eax, word [0x14001220e]
movzx eax, ax
mov rdx, qword [0x14000f9a0]
mov rcx, qword [rdx]
mov edx, eax
call sym.gethostpoop
mov qword [rbp - 0x48], rax
cmp qword [rbp - 0x48], 0
je 0x1400052d1
mov rdx, qword [0x1400121b8]
mov eax, dword [0x140012188]
cdqe
shl rax, 3
add rax, rdx
mov rdx, qword [rbp - 0x48]
mov qword [rax], rdx
mov eax, dword [0x140012188]
add eax, 1
mov dword [0x140012188], eax
jmp 0x14000551b
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov dword [rax], 0
call sym.helpme
mov rax, qword [0x14000f9a0]
mov rax, qword [rax]
mov rcx, rax
call sym.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 0x14000551b
mov rax, qword [0x14000f9a0]
mov rax, qword [rax]
mov rdx, rax
lea rax, str.invalid_interval_time__s
mov rcx, rax
call sym.bail
jmp 0x14000551b
movzx eax, word [0x14001220c]
add eax, 1
mov word [0x14001220c], ax
jmp 0x14000551b
movzx eax, word [0x14001220e]
add eax, 1
mov word [0x14001220e], ax
jmp 0x14000551b
mov rax, qword [0x14000f9a0]
mov rax, qword [rax]
mov qword [0x1400121f0], rax
movzx eax, word [0x140012210]
add eax, 1
mov word [0x140012210], ax
jmp 0x14000551b
mov rax, qword [0x14000f9a0]
mov rax, qword [rax]
mov edx, 0
mov rcx, rax
call sym.getportpoop
mov word [rbp - 0x1a], ax
cmp word [rbp - 0x1a], 0
jne 0x14000551b
mov rax, qword [0x14000f9a0]
mov rax, qword [rax]
mov rdx, rax
lea rax, str.invalid_local_port__s
mov rcx, rax
call sym.bail
jmp 0x14000551b
movzx eax, word [0x140012212]
add eax, 1
mov word [0x140012212], ax
jmp 0x14000551b
movzx eax, word [0x14001220e]
movzx eax, ax
mov rdx, qword [0x14000f9a0]
mov rcx, qword [rdx]
mov edx, eax
call sym.gethostpoop
mov qword [rbp - 0x38], rax
mov rax, qword [rbp - 0x38]
add rax, 0x1c0
mov qword [rbp - 0x10], rax
jmp 0x14000551b
movzx eax, word [0x14001221e]
add eax, 1
mov word [0x14001221e], ax
jmp 0x14000551b
movzx eax, word [0x140012214]
add eax, 1
mov word [0x140012214], ax
jmp 0x14000551b
movzx eax, word [0x140012216]
add eax, 1
mov word [0x140012216], ax
jmp 0x14000551b
mov rax, qword [0x14000f9a0]
mov rax, qword [rax]
mov rcx, rax
call sym.atoi
mov dword [0x140012218], eax
mov eax, dword [0x140012218]
test eax, eax
jne 0x1400054b7
mov rax, qword [0x14000f9a0]
mov rax, qword [rax]
mov rdx, rax
lea rax, str.invalid_wait_time__s
mov rcx, rax
call sym.bail
mov ecx, 8
call sym.Hmalloc
mov qword [0x140012198], rax
mov ecx, 8
call sym.Hmalloc
mov qword [0x1400121a0], rax
mov edx, dword [0x140012218]
mov rax, qword [0x140012198]
mov dword [rax], edx
jmp 0x14000551b
movzx eax, word [0x14001221c]
add eax, 1
mov word [0x14001221c], ax
jmp 0x14000551b
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 sym.bail
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 sym.getopt
mov esi, eax
cmp esi, 0xffffffff
jne 0x140005184
movzx eax, word [0x140012212]
test ax, ax
je 0x140005566
mov ecx, 0
call sub.msvcrt.dll__time64
mov ecx, eax
call sym.srand
mov ecx, 0x10000
call sym.Hmalloc
mov qword [rbp - 0x28], rax
mov rax, qword [0x140012228]
test rax, rax
je 0x14000558f
mov ecx, 0
call sym.close
mov word [0x140012210], 0
mov dword [0x140012184], 0
movzx eax, word [0x140012210]
test ax, ax
je 0x1400055ef
mov rax, qword [0x1400121f0]
mov r8d, 0x1b4
mov edx, 0x301
mov rcx, rax
call sym.open
mov dword [0x140012184], eax
mov eax, dword [0x140012184]
test eax, eax
jg 0x1400055de
mov rax, qword [0x1400121f0]
mov rdx, rax
lea rax, str.cant_open__s
mov rcx, rax
call sym.bail
mov ecx, 0x64
call sym.Hmalloc
mov qword [0x1400121f0], rax
mov rax, qword [0x14000f9b0]
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 0x140005644
movzx eax, word [0x14001220e]
movzx eax, ax
mov rdx, qword [0x14000f9b0]
mov edx, dword [rdx]
movsxd rdx, edx
lea rcx, [rdx*8]
mov rdx, qword [rbp + 0x28]
add rdx, rcx
mov rcx, qword [rdx]
mov edx, eax
call sym.gethostpoop
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
je 0x140005668
mov rax, qword [rbp - 8]
add rax, 0x1c0
test rax, rax
je 0x140005668
mov rax, qword [rbp - 8]
add rax, 0x1c0
mov qword [rbp - 0x18], rax
cmp qword [rbp - 0x18], 0
je 0x140005684
mov rax, qword [0x14000f9b0]
mov eax, dword [rax]
lea edx, [rax + 1]
mov rax, qword [0x14000f9b0]
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 0x1400057de
mov word [rbp - 0x20], 0
mov rax, qword [0x14000f9b0]
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 0x14000572f
mov rax, qword [0x14000f9b0]
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 sym.getportpoop
mov word [rbp - 0x20], ax
cmp word [rbp - 0x20], 0
jne 0x14000572f
mov rax, qword [0x14000f9b0]
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 sym.bail
movzx edx, word [rbp - 0x1a]
movzx eax, word [rbp - 0x20]
mov r8, qword [rbp - 0x10]
mov rcx, qword [rbp - 0x18]
mov r9d, edx
mov edx, eax
call sym.dolisten
mov dword [0x14000d010], eax
mov eax, dword [0x14000d010]
test eax, eax
jle 0x1400057cf
mov rax, qword [0x140012228]
test rax, rax
je 0x140005775
mov eax, dword [0x14000d010]
cdqe
mov rcx, rax
call sym.doexec
mov rax, qword [0x140012228]
test rax, rax
jne 0x140005790
mov eax, dword [0x14000d010]
mov ecx, eax
call sym.readwrite
mov esi, eax
movzx eax, word [0x140012216]
cmp ax, 1
jbe 0x1400057bd
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 sym.holler
cmp dword [rbp - 0x2c], 1
jne 0x1400057c8
jmp 0x140004ff2
mov ecx, esi
call sym.exit
lea rax, str.no_connection
mov rcx, rax
call sym.bail
cmp qword [rbp - 0x18], 0
jne 0x1400057f4
lea rax, str.no_destination
mov rcx, rax
call sym.bail
mov rax, qword [0x14000f9b0]
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 0x140005825
lea rax, str.no_port_s__to_connect_to
mov rcx, rax
call sym.bail
mov rax, qword [0x14000f9b0]
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 0x140005854
mov word [0x14000d030], 0
movzx eax, word [rbp - 0x1a]
mov word [rbp - 0x1c], ax
jmp 0x140005bc2
mov word [rbp - 0x3a], 0
movzx eax, word [rbp - 0x3a]
mov word [rbp - 0x1e], ax
mov rax, qword [0x14000f9b0]
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 sym.strchr
mov rbx, rax
test rbx, rbx
je 0x1400058d2
mov byte [rbx], 0
add rbx, 1
mov edx, 0
mov rcx, rbx
call sym.getportpoop
mov word [rbp - 0x1e], ax
cmp word [rbp - 0x1e], 0
jne 0x1400058d2
mov rdx, rbx
lea rax, str.invalid_port__s
mov rcx, rax
call sym.bail
mov rax, qword [0x14000f9b0]
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 sym.getportpoop
mov word [rbp - 0x3a], ax
cmp word [rbp - 0x3a], 0
jne 0x140005936
mov rax, qword [0x14000f9b0]
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 sym.bail
movzx eax, word [rbp - 0x1e]
cmp word [rbp - 0x3a], ax
jae 0x14000598c
mov word [0x14000d030], 0
movzx eax, word [rbp - 0x1e]
mov word [rbp - 0x20], ax
movzx eax, word [0x140012212]
test ax, ax
je 0x140005b9f
movzx edx, word [rbp - 0x1e]
movzx eax, word [rbp - 0x3a]
mov rcx, qword [rbp - 0x28]
mov r8d, edx
mov edx, eax
call sym.loadports
mov rax, qword [rbp - 0x28]
mov rcx, rax
call sym.nextport
mov word [rbp - 0x20], ax
jmp 0x140005b9f
movzx eax, word [rbp - 0x3a]
mov word [rbp - 0x20], ax
jmp 0x140005b9f
cmp word [rbp - 0x1a], 0
jne 0x1400059c3
movzx eax, word [0x140012212]
test ax, ax
je 0x1400059c3
call sym.rand
mov word [rbp - 0x1c], ax
cmp word [rbp - 0x1c], 0x1fff
ja 0x1400059c3
add word [rbp - 0x1c], 0x2000
movzx eax, word [rbp - 0x20]
mov edx, eax
mov ecx, 0
call sym.getportpoop
mov word [rbp - 0x20], ax
movzx edx, word [rbp - 0x1c]
movzx eax, word [rbp - 0x20]
mov r8, qword [rbp - 0x10]
mov rcx, qword [rbp - 0x18]
mov r9d, edx
mov edx, eax
call sym.doconnect
mov dword [0x14000d010], eax
mov eax, dword [0x14000d010]
test eax, eax
jle 0x140005a30
movzx eax, word [0x14001221c]
test ax, ax
je 0x140005a30
movzx eax, word [0x140012214]
test ax, ax
je 0x140005a30
mov eax, dword [0x14000d010]
mov rdx, qword [rbp - 0x18]
mov ecx, eax
call sym.udptest
mov dword [0x14000d010], eax
mov eax, dword [0x14000d010]
test eax, eax
jle 0x140005ac6
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 sym.holler
mov rax, qword [0x140012228]
test rax, rax
je 0x140005a99
mov eax, dword [0x14000d010]
cdqe
mov rcx, rax
call sym.doexec
movzx eax, word [0x14001221c]
test ax, ax
jne 0x140005b2e
mov rax, qword [0x140012228]
test rax, rax
jne 0x140005b2e
mov eax, dword [0x14000d010]
mov ecx, eax
call sym.readwrite
mov esi, eax
jmp 0x140005b2e
mov esi, 1
movzx eax, word [0x14000d030]
test ax, ax
jne 0x140005af4
movzx eax, word [0x140012216]
cmp ax, 1
ja 0x140005af4
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
cmp eax, 0x274d
je 0x140005b2e
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 sym.holler
mov eax, dword [0x14000d010]
cdqe
mov edx, 2
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_shutdown]
call rax
mov eax, dword [0x14000d010]
cdqe
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
mov eax, dword [0x140012208]
test eax, eax
je 0x140005b76
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 0x140005b94
mov rax, qword [rbp - 0x28]
mov rcx, rax
call sym.nextport
mov word [rbp - 0x20], ax
jmp 0x140005b9f
movzx eax, word [rbp - 0x20]
sub eax, 1
mov word [rbp - 0x20], ax
movzx eax, word [rbp - 0x3a]
cmp word [rbp - 0x20], ax
jae 0x140005999
mov rax, qword [0x14000f9b0]
mov eax, dword [rax]
lea edx, [rax + 1]
mov rax, qword [0x14000f9b0]
mov dword [rax], edx
mov rax, qword [0x14000f9b0]
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 0x140005861
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov dword [rax], 0
movzx eax, word [0x140012216]
cmp ax, 1
jbe 0x140005c24
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 sym.holler
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
cmp dword [rbp - 0x2c], 1
jne 0x140005c38
jmp 0x140004ff2
movzx eax, word [0x14000d030]
test ax, ax
je 0x140005c4b
mov ecx, esi
call sym.exit
mov ecx, 0
call sym.exit
nop