Function at 0x404eb6
Capabilities:
Read file on windows

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x58
mov esi, ecx
call dbg.__main
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], 0
mov word [ebp - 0x26], 0
mov word [ebp - 0x28], 0
mov word [ebp - 0x3a], 0
mov word [ebp - 0x2a], 0
mov word [ebp - 0x2c], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x34], 0
call sym._res_init
mov dword [esp], 0x10
call sym._Hmalloc
mov dword [0x4120e0], eax
mov dword [esp], 0x10
call sym._Hmalloc
mov dword [0x4120e4], eax
mov dword [esp], 0x2000
call sym._Hmalloc
mov dword [0x4120f0], eax
mov dword [esp], 0x2000
call sym._Hmalloc
mov dword [0x4120f4], eax
mov dword [esp], 0x104
call sym._Hmalloc
mov dword [0x4120f8], eax
mov dword [esp], 0x104
call sym._Hmalloc
mov dword [0x4120fc], eax
mov dword [esp], 0x4a
call sym._Hmalloc
mov dword [0x412100], eax
mov dword [esp], 1
call sym._malloc
mov dword [0x412108], eax
mov eax, dword [0x412108]
mov byte [eax], 1
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov dword [eax], 0
mov dword [0x40d028], 4
cmp dword [esi], 1
jne 0x4051a9
mov eax, dword [esi + 4]
mov ebx, dword [eax]
mov dword [esp], 0x200
call sym._Hmalloc
mov dword [esi + 4], eax
mov eax, dword [esi + 4]
mov dword [eax], ebx
mov dword [esp], 0x2000
call sym._Hmalloc
mov ebx, eax
mov eax, dword [esi + 4]
add eax, 4
mov dword [eax], ebx
mov dword [esp], 2
mov eax, dword [dbg.__acrt_iob_func]
call eax
mov dword [esp + 4], str.Cmd_line:
mov dword [esp], eax
call sym._fprintf_1
mov dword [esp], 2
mov eax, dword [dbg.__acrt_iob_func]
call eax
mov dword [esp], eax
call sym._fflush
mov dword [esp + 8], 0x2000
mov dword [esp + 4], ebx
mov dword [esp], 0
call sym._read
mov dword [0x4120cc], eax
mov eax, dword [0x4120cc]
test eax, eax
jne 0x404da6
mov dword [esp], str.wrong
call sym._bail
mov eax, dword [0x4120cc]
mov dword [esp + 4], eax
mov dword [esp], ebx
call sym._findline
mov edi, eax
test edi, edi
je 0x404dcb
mov eax, dword [0x4120cc]
mov edx, edi
sub eax, edx
mov dword [0x4120cc], eax
mov eax, dword [0x4120cc]
test eax, eax
je 0x404df4
mov edx, dword [0x4120cc]
mov eax, edi
lea ecx, [ebx + eax]
mov eax, dword [0x4120f0]
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], eax
call sym._memcpy
mov eax, dword [esi + 4]
add eax, 4
mov eax, dword [eax]
mov dword [esp + 4], 0xa
mov dword [esp], eax
call sym._strchr
mov ebx, eax
test ebx, ebx
je 0x404e15
mov byte [ebx], 0
mov eax, dword [esi + 4]
add eax, 4
mov eax, dword [eax]
mov dword [esp + 4], 0xd
mov dword [esp], eax
call sym._strchr
mov ebx, eax
test ebx, ebx
je 0x404e36
mov byte [ebx], 0
mov eax, dword [esi + 4]
mov ebx, dword [eax + 4]
add ebx, 1
mov edi, 2
jmp 0x404e72
movzx eax, byte [ebx]
cmp al, 0x20
jne 0x404e52
mov byte [ebx], 0
jmp 0x404e6f
lea eax, [ebx - 1]
movzx eax, byte [eax]
test al, al
jne 0x404e6f
mov eax, edi
lea edx, [eax*4]
mov eax, dword [esi + 4]
add eax, edx
mov dword [eax], ebx
add edi, 1
add ebx, 1
movzx eax, byte [ebx]
test al, al
jne 0x404e46
mov dword [esi], edi
jmp 0x4051a9
lea eax, [edi - 0x47]
cmp eax, 0x33
ja case.0x404e93.72
mov eax, dword [eax*4 + 0x40ec84]
jmp eax
mov dword [esp], str.all_A_records_NIY
call sym._bail
movzx eax, word [0x412110]
add eax, 1
mov word [0x412110], ax
jmp 0x4051a9
mov eax, dword [0x412044]
mov dword [0x412130], eax
jmp 0x4051a9
movzx eax, word [0x412118]
add eax, 1
mov word [0x412118], ax
mov dword [ebp - 0x34], 1
jmp 0x4051a9
mov eax, dword [sym.imp.KERNEL32.dll_FreeConsole]
call eax
jmp 0x4051a9
mov eax, dword [0x412044]
mov dword [esp], eax
call sym._atoi
mov edi, eax
test edi, edi
je 0x404f11
mov eax, edi
and eax, 0x1c
cmp edi, eax
jne 0x404f11
mov dword [0x40d028], edi
jmp 0x404f21
mov dword [esp + 4], edi
mov dword [esp], str.invalid_hop_pointer__d__must_be_multiple_of_4___28
call sym._bail
jmp 0x4051a9
mov eax, dword [0x4120c8]
cmp eax, 8
jle 0x404f3c
mov dword [esp], str.too_many__g_hops
call sym._bail
mov eax, dword [0x4120e8]
test eax, eax
jne 0x404f56
mov dword [esp], 0x28
call sym._Hmalloc
mov dword [0x4120e8], eax
movzx eax, word [0x41211a]
movzx edx, ax
mov eax, dword [0x412044]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._gethostpoop
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
je 0x404f8f
mov eax, dword [0x4120e8]
mov edx, dword [0x4120c8]
shl edx, 2
add edx, eax
mov eax, dword [ebp - 0x40]
mov dword [edx], eax
mov eax, dword [0x4120c8]
add eax, 1
mov dword [0x4120c8], eax
jmp 0x4051a9
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov dword [eax], 0
call sym._helpme
mov eax, dword [0x412044]
mov dword [esp], eax
call sym._atoi
movzx eax, ax
mov dword [0x412114], eax
mov eax, dword [0x412114]
imul eax, eax, 0x3e8
mov dword [0x412114], eax
mov eax, dword [0x412114]
test eax, eax
jne 0x4051a9
mov eax, dword [0x412044]
mov dword [esp + 4], eax
mov dword [esp], str.invalid_interval_time__s
call sym._bail
jmp 0x4051a9
movzx eax, word [0x412118]
add eax, 1
mov word [0x412118], ax
jmp 0x4051a9
movzx eax, word [0x41211a]
add eax, 1
mov word [0x41211a], ax
jmp 0x4051a9
mov eax, dword [0x412044]
mov dword [0x412104], eax
movzx eax, word [0x41211c]
add eax, 1
mov word [0x41211c], ax
jmp 0x4051a9
mov eax, dword [0x412044]
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._getportpoop
mov word [ebp - 0x26], ax
cmp word [ebp - 0x26], 0
jne 0x4051a9
mov eax, dword [0x412044]
mov dword [esp + 4], eax
mov dword [esp], str.invalid_local_port__s
call sym._bail
jmp 0x4051a9
movzx eax, word [0x41211e]
add eax, 1
mov word [0x41211e], ax
jmp 0x4051a9
movzx eax, word [0x41211a]
movzx edx, ax
mov eax, dword [0x412044]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._gethostpoop
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
add eax, 0x1c0
mov dword [ebp - 0x20], eax
jmp 0x4051a9
movzx eax, word [0x412134]
add eax, 1
mov word [0x412134], ax
jmp 0x4051a9
movzx eax, word [0x41212a]
add eax, 1
mov word [0x41212a], ax
jmp 0x4051a9
movzx eax, word [0x412120]
add eax, 1
mov word [0x412120], ax
jmp 0x4051a9
movzx eax, word [0x412122]
add eax, 1
mov word [0x412122], ax
jmp 0x4051a9
mov eax, dword [0x412044]
mov dword [esp], eax
call sym._atoi
mov dword [0x412124], eax
mov eax, dword [0x412124]
test eax, eax
jne 0x40514d
mov eax, dword [0x412044]
mov dword [esp + 4], eax
mov dword [esp], str.invalid_wait_time__s
call sym._bail
mov dword [esp], 8
call sym._Hmalloc
mov dword [0x4120d8], eax
mov dword [esp], 8
call sym._Hmalloc
mov dword [0x4120dc], eax
mov edx, dword [0x412124]
mov eax, dword [0x4120d8]
mov dword [eax], edx
jmp 0x4051a9
movzx eax, word [0x412128]
add eax, 1
mov word [0x412128], ax
jmp 0x4051a9
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov dword [eax], 0
mov dword [esp], str.nc__h_for_help
call sym._bail
mov dword [esp + 8], str.ade:g:G:hi:lLno:p:rs:tcuvw:z
mov eax, dword [esi + 4]
mov dword [esp + 4], eax
mov eax, dword [esi]
mov dword [esp], eax
call sym._getopt
mov edi, eax
cmp edi, 0xffffffff
jne 0x404e80
movzx eax, word [0x41211e]
test ax, ax
je 0x4051fc
mov dword [esp], 0
call sym._time
mov dword [esp], eax
call sym._srand
mov dword [esp], 0x10000
call sym._Hmalloc
mov dword [ebp - 0x30], eax
mov eax, dword [0x412130]
test eax, eax
je 0x405224
mov dword [esp], 0
call sym._close
mov word [0x41211c], 0
mov dword [0x4120c4], 0
movzx eax, word [0x41211c]
test ax, ax
je 0x405281
mov eax, dword [0x412104]
mov dword [esp + 8], 0x1b4
mov dword [esp + 4], 0x301
mov dword [esp], eax
call sym._open
mov dword [0x4120c4], eax
mov eax, dword [0x4120c4]
test eax, eax
jg 0x405270
mov eax, dword [0x412104]
mov dword [esp + 4], eax
mov dword [esp], str.cant_open__s
call sym._bail
mov dword [esp], 0x64
call sym._Hmalloc
mov dword [0x412104], eax
mov eax, dword [0x412048]
lea edx, [eax*4]
mov eax, dword [esi + 4]
add eax, edx
mov eax, dword [eax]
test eax, eax
je 0x4052c4
movzx eax, word [0x41211a]
movzx edx, ax
mov eax, dword [0x412048]
lea ecx, [eax*4]
mov eax, dword [esi + 4]
add eax, ecx
mov eax, dword [eax]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._gethostpoop
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x4052e1
mov eax, dword [ebp - 0x1c]
add eax, 0x1c0
test eax, eax
je 0x4052e1
mov eax, dword [ebp - 0x1c]
add eax, 0x1c0
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x4052f4
mov eax, dword [0x412048]
add eax, 1
mov dword [0x412048], eax
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov dword [eax], 0
movzx eax, word [0x412118]
test ax, ax
je 0x405428
mov word [ebp - 0x2c], 0
mov eax, dword [0x412048]
lea edx, [eax*4]
mov eax, dword [esi + 4]
add eax, edx
mov eax, dword [eax]
test eax, eax
je 0x40537f
mov eax, dword [0x412048]
lea edx, [eax*4]
mov eax, dword [esi + 4]
add eax, edx
mov eax, dword [eax]
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._getportpoop
mov word [ebp - 0x2c], ax
cmp word [ebp - 0x2c], 0
jne 0x40537f
mov eax, dword [0x412048]
lea edx, [eax*4]
mov eax, dword [esi + 4]
add eax, edx
mov eax, dword [eax]
mov dword [esp + 4], eax
mov dword [esp], str.invalid_port__s
call sym._bail
movzx edx, word [ebp - 0x26]
movzx eax, word [ebp - 0x2c]
mov dword [esp + 0xc], edx
mov edx, dword [ebp - 0x20]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sym._dolisten
mov dword [0x40d010], eax
mov eax, dword [0x40d010]
test eax, eax
jle 0x40541c
mov eax, dword [0x412130]
test eax, eax
je 0x4053c5
mov eax, dword [0x40d010]
mov dword [esp], eax
call sym._doexec
mov eax, dword [0x412130]
test eax, eax
jne 0x4053dd
mov eax, dword [0x40d010]
mov dword [esp], eax
call sym._readwrite
mov edi, eax
movzx eax, word [0x412122]
cmp ax, 1
jbe 0x405409
mov edx, dword [0x4120d0]
mov eax, dword [0x4120d4]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], str._sent__d__rcvd__d
call sym._holler
cmp dword [ebp - 0x34], 1
jne 0x405414
jmp 0x404d08
mov dword [esp], edi
call sym._exit
mov dword [esp], str.no_connection
call sym._bail
cmp dword [ebp - 0x24], 0
jne 0x40543a
mov dword [esp], str.no_destination
call sym._bail
mov eax, dword [0x412048]
lea edx, [eax*4]
mov eax, dword [esi + 4]
add eax, edx
mov eax, dword [eax]
test eax, eax
jne 0x40545d
mov dword [esp], str.no_port_s__to_connect_to
call sym._bail
mov eax, dword [0x412048]
add eax, 1
lea edx, [eax*4]
mov eax, dword [esi + 4]
add eax, edx
mov eax, dword [eax]
test eax, eax
je 0x405480
mov word [0x40d02c], 0
movzx eax, word [ebp - 0x26]
mov word [ebp - 0x28], ax
jmp 0x4057b3
mov word [ebp - 0x3a], 0
movzx eax, word [ebp - 0x3a]
mov word [ebp - 0x2a], ax
mov eax, dword [0x412048]
lea edx, [eax*4]
mov eax, dword [esi + 4]
add eax, edx
mov eax, dword [eax]
mov dword [esp + 4], 0x2d
mov dword [esp], eax
call sym._strchr
mov ebx, eax
test ebx, ebx
je 0x4054f5
mov byte [ebx], 0
add ebx, 1
mov dword [esp + 4], 0
mov dword [esp], ebx
call sym._getportpoop
mov word [ebp - 0x2a], ax
cmp word [ebp - 0x2a], 0
jne 0x4054f5
mov dword [esp + 4], ebx
mov dword [esp], str.invalid_port__s
call sym._bail
mov eax, dword [0x412048]
lea edx, [eax*4]
mov eax, dword [esi + 4]
add eax, edx
mov eax, dword [eax]
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._getportpoop
mov word [ebp - 0x3a], ax
cmp word [ebp - 0x3a], 0
jne 0x405546
mov eax, dword [0x412048]
lea edx, [eax*4]
mov eax, dword [esi + 4]
add eax, edx
mov eax, dword [eax]
mov dword [esp + 4], eax
mov dword [esp], str.invalid_port__s
call sym._bail
movzx eax, word [ebp - 0x2a]
cmp word [ebp - 0x3a], ax
jae 0x4055a0
mov word [0x40d02c], 0
movzx eax, word [ebp - 0x2a]
mov word [ebp - 0x2c], ax
movzx eax, word [0x41211e]
test ax, ax
je 0x405798
movzx edx, word [ebp - 0x2a]
movzx eax, word [ebp - 0x3a]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call sym._loadports
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call sym._nextport
mov word [ebp - 0x2c], ax
jmp 0x405798
movzx eax, word [ebp - 0x3a]
mov word [ebp - 0x2c], ax
jmp 0x405798
cmp word [ebp - 0x26], 0
jne 0x4055d7
movzx eax, word [0x41211e]
test ax, ax
je 0x4055d7
call sym._rand
mov word [ebp - 0x28], ax
cmp word [ebp - 0x28], 0x1fff
ja 0x4055d7
add word [ebp - 0x28], 0x2000
movzx eax, word [ebp - 0x2c]
mov dword [esp + 4], eax
mov dword [esp], 0
call sym._getportpoop
mov word [ebp - 0x2c], ax
movzx edx, word [ebp - 0x28]
movzx eax, word [ebp - 0x2c]
mov dword [esp + 0xc], edx
mov edx, dword [ebp - 0x20]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sym._doconnect
mov dword [0x40d010], eax
mov eax, dword [0x40d010]
test eax, eax
jle 0x405650
movzx eax, word [0x412128]
test ax, ax
je 0x405650
movzx eax, word [0x412120]
test ax, ax
je 0x405650
mov eax, dword [0x40d010]
mov edx, dword [ebp - 0x24]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._udptest
mov dword [0x40d010], eax
mov eax, dword [0x40d010]
test eax, eax
jle 0x4056cd
mov edi, 0
mov eax, dword [0x412100]
mov ebx, eax
movzx edx, word [ebp - 0x2c]
mov eax, dword [ebp - 0x1c]
lea ecx, [eax + 0x100]
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], edx
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
mov dword [esp], str._s___s___d___s__open
call sym._holler
mov eax, dword [0x412130]
test eax, eax
je 0x4056a7
mov eax, dword [0x40d010]
mov dword [esp], eax
call sym._doexec
movzx eax, word [0x412128]
test ax, ax
jne 0x40572c
mov eax, dword [0x412130]
test eax, eax
jne 0x40572c
mov eax, dword [0x40d010]
mov dword [esp], eax
call sym._readwrite
mov edi, eax
jmp 0x40572c
mov edi, 1
movzx eax, word [0x40d02c]
test ax, ax
jne 0x4056f9
movzx eax, word [0x412122]
cmp ax, 1
ja 0x4056f9
mov eax, dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
call eax
cmp eax, 0x274d
je 0x40572c
mov eax, dword [0x412100]
mov ebx, eax
movzx edx, word [ebp - 0x2c]
mov eax, dword [ebp - 0x1c]
lea ecx, [eax + 0x100]
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], edx
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
mov dword [esp], str._s___s___d___s_
call sym._holler
mov eax, dword [0x40d010]
mov dword [esp + 4], 2
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_shutdown]
call eax
sub esp, 8
mov eax, dword [0x40d010]
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_closesocket]
call eax
sub esp, 4
mov eax, dword [0x412114]
test eax, eax
je 0x405770
mov eax, dword [0x412114]
mov dword [esp], eax
mov eax, dword [sym.imp.msvcrt.dll__sleep]
call eax
movzx eax, word [0x41211e]
test ax, ax
je 0x40578d
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call sym._nextport
mov word [ebp - 0x2c], ax
jmp 0x405798
movzx eax, word [ebp - 0x2c]
sub eax, 1
mov word [ebp - 0x2c], ax
movzx eax, word [ebp - 0x3a]
cmp word [ebp - 0x2c], ax
jae 0x4055ad
mov eax, dword [0x412048]
add eax, 1
mov dword [0x412048], eax
mov eax, dword [0x412048]
lea edx, [eax*4]
mov eax, dword [esi + 4]
add eax, edx
mov eax, dword [eax]
test eax, eax
jne 0x40548d
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov dword [eax], 0
movzx eax, word [0x412122]
cmp ax, 1
jbe 0x405807
mov edx, dword [0x4120d0]
mov eax, dword [0x4120d4]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], str.sent__d__rcvd__d
call sym._holler
mov eax, dword [sym.imp.WSOCK32.DLL_WSACleanup]
call eax
cmp dword [ebp - 0x34], 1
jne 0x405819
jmp 0x404d08
movzx eax, word [0x40d02c]
test ax, ax
je 0x40582d
mov dword [esp], edi
call sym._exit
mov dword [esp], 0
call sym._exit