Function at 0x4048d6
Capabilities:
Read file on windows
Write 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 sym.___main
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov word [ebp - 0x2a], 0
mov word [ebp - 0x28], 0
mov word [ebp - 0x26], 0
mov word [ebp - 0x24], 0
mov word [ebp - 0x22], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
call dbg.res_init
mov dword [esp], 0x10
call dbg.Hmalloc
mov dword [0x40a0a0], eax
mov dword [esp], 0x10
call dbg.Hmalloc
mov dword [0x40a0a4], eax
mov dword [esp], 0x2000
call dbg.Hmalloc
mov dword [0x40a1b8], eax
mov dword [esp], 0x2000
call dbg.Hmalloc
mov dword [0x40a198], eax
mov dword [esp], 0x104
call dbg.Hmalloc
mov dword [0x40a1c8], eax
mov dword [esp], 0x104
call dbg.Hmalloc
mov dword [0x40a1e8], eax
mov dword [esp], 0x4a
call dbg.Hmalloc
mov dword [0x40a0b0], eax
mov dword [esp], 1
call sym._malloc
mov dword [0x40a1d8], eax
mov eax, dword [0x40a1d8]
mov byte [eax], 1
call sym.__errno
mov dword [eax], 0
mov dword [0x407020], 4
jmp 0x4049e9
nop
jmp 0x4049e9
nop
cmp dword [esi], 1
jne 0x404e57
mov eax, dword [esi + 4]
mov ebx, dword [eax]
mov dword [esp], 0x200
call dbg.Hmalloc
mov dword [esi + 4], eax
mov eax, dword [esi + 4]
mov dword [eax], ebx
mov dword [esp], 0x2000
call dbg.Hmalloc
mov ebx, eax
mov eax, dword [esi + 4]
add eax, 4
mov dword [eax], ebx
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0xa
mov dword [esp + 4], 1
mov dword [esp], str.Cmd_line:
call sym._fwrite
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
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 [0x40a08c], eax
mov eax, dword [0x40a08c]
test eax, eax
jne 0x404a8b
mov dword [esp], str.wrong
call dbg.bail
mov eax, dword [0x40a08c]
mov dword [esp + 4], eax
mov dword [esp], ebx
call dbg.findline
mov edi, eax
test edi, edi
je 0x404ab5
mov edx, dword [0x40a08c]
mov eax, edi
mov ecx, edx
sub ecx, eax
mov eax, ecx
mov dword [0x40a08c], eax
mov eax, dword [0x40a08c]
test eax, eax
je 0x404ade
mov edx, dword [0x40a08c]
mov eax, edi
lea ecx, [ebx + eax]
mov eax, dword [0x40a1b8]
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 0x404aff
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 0x404b20
mov byte [ebx], 0
mov eax, dword [esi + 4]
add eax, 4
mov ebx, dword [eax]
inc ebx
mov edi, 2
jmp 0x404b50
mov al, byte [ebx]
cmp al, 0x20
jne 0x404b3b
mov byte [ebx], 0
jmp 0x404b4f
lea eax, [ebx - 1]
mov al, byte [eax]
test al, al
jne 0x404b4f
mov eax, edi
shl eax, 2
add eax, dword [esi + 4]
mov dword [eax], ebx
inc edi
inc ebx
mov al, byte [ebx]
test al, al
jne 0x404b30
mov dword [esi], edi
jmp 0x404e5e
lea eax, [edi - 0x47]
cmp eax, 0x33
ja case.0x404b70.72
mov eax, dword [eax*4 + 0x408b64]
jmp eax
mov dword [esp], str.all_A_records_NIY
call dbg.bail
mov ax, word [0x40a0b8]
inc eax
mov word [0x40a0b8], ax
jmp 0x404e5e
mov eax, dword [0x40a028]
mov dword [0x40a0d4], eax
jmp 0x404e5e
mov ax, word [0x40a0c0]
inc eax
mov word [0x40a0c0], ax
mov dword [ebp - 0x1c], 1
jmp 0x404e5e
call sym._FreeConsole_0
jmp 0x404e5e
mov eax, dword [0x40a028]
mov dword [esp], eax
call sym._atoi
mov edi, eax
test edi, edi
je 0x404bea
mov eax, edi
and eax, 0x1c
cmp eax, edi
jne 0x404bea
mov dword [0x407020], edi
nop
jmp 0x404e5e
mov dword [esp + 4], edi
mov dword [esp], str.invalid_hop_pointer__d__must_be_multiple_of_4___28
call dbg.bail
jmp 0x404e5e
mov eax, dword [0x40a088]
cmp eax, 8
jle 0x404c15
mov dword [esp], str.too_many__g_hops
call dbg.bail
mov eax, dword [0x40a0a8]
test eax, eax
jne 0x404c2f
mov dword [esp], 0x28
call dbg.Hmalloc
mov dword [0x40a0a8], eax
mov ax, word [0x40a0c2]
movzx edx, ax
mov eax, dword [0x40a028]
mov dword [esp + 4], edx
mov dword [esp], eax
call dbg.gethostpoop
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
je 0x404c68
mov eax, dword [0x40a0a8]
mov edx, dword [0x40a088]
shl edx, 2
lea edx, [eax + edx]
mov eax, dword [ebp - 0x40]
mov dword [edx], eax
mov eax, dword [0x40a088]
inc eax
mov dword [0x40a088], eax
jmp 0x404e5e
call sym.__errno
mov dword [eax], 0
call dbg.helpme
mov eax, dword [0x40a028]
mov dword [esp], eax
call sym._atoi
and eax, 0xffff
mov dword [0x40a0bc], eax
mov edx, dword [0x40a0bc]
mov eax, edx
shl eax, 2
add eax, edx
lea edx, [eax*4]
add eax, edx
lea edx, [eax*4]
add eax, edx
shl eax, 3
mov dword [0x40a0bc], eax
mov eax, dword [0x40a0bc]
test eax, eax
jne 0x404e5a
mov eax, dword [0x40a028]
mov dword [esp + 4], eax
mov dword [esp], str.invalid_interval_time__s
call dbg.bail
jmp 0x404e5e
mov ax, word [0x40a0c0]
inc eax
mov word [0x40a0c0], ax
jmp 0x404e5e
mov ax, word [0x40a0c2]
inc eax
mov word [0x40a0c2], ax
jmp 0x404e5e
mov eax, dword [0x40a028]
mov dword [0x40a0b4], eax
mov ax, word [0x40a0c4]
inc eax
mov word [0x40a0c4], ax
jmp 0x404e5e
mov eax, dword [0x40a028]
mov dword [esp + 4], 0
mov dword [esp], eax
call dbg.getportpoop
mov word [ebp - 0x2a], ax
cmp word [ebp - 0x2a], 0
jne 0x404e5d
mov eax, dword [0x40a028]
mov dword [esp + 4], eax
mov dword [esp], str.invalid_local_port__s
call dbg.bail
jmp 0x404e5e
mov ax, word [0x40a0c6]
inc eax
mov word [0x40a0c6], ax
jmp 0x404e5e
mov ax, word [0x40a0c2]
movzx edx, ax
mov eax, dword [0x40a028]
mov dword [esp + 4], edx
mov dword [esp], eax
call dbg.gethostpoop
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
add eax, 0x1c0
mov dword [ebp - 0x34], eax
jmp 0x404e5e
mov ax, word [0x40a0c8]
inc eax
mov word [0x40a0c8], ax
jmp 0x404e5e
mov ax, word [0x40a0ca]
inc eax
mov word [0x40a0ca], ax
jmp 0x404e5e
mov eax, dword [0x40a028]
mov dword [esp], eax
call sym._atoi
mov dword [0x40a0cc], eax
mov eax, dword [0x40a0cc]
test eax, eax
jne 0x404dfe
mov eax, dword [0x40a028]
mov dword [esp + 4], eax
mov dword [esp], str.invalid_wait_time__s
call dbg.bail
mov dword [esp], 8
call dbg.Hmalloc
mov dword [0x40a098], eax
mov dword [esp], 8
call dbg.Hmalloc
mov dword [0x40a09c], eax
mov eax, dword [0x40a098]
mov edx, dword [0x40a0cc]
mov dword [eax], edx
jmp 0x404e5e
mov ax, word [0x40a0d0]
inc eax
mov word [0x40a0d0], ax
jmp 0x404e5e
call sym.__errno
mov dword [eax], 0
mov dword [esp], str.nc__h_for_help
call dbg.bail
jmp 0x404e5e
nop
jmp 0x404e5e
nop
jmp 0x404e5e
nop
mov dword [esp + 8], str.ade:g:G:hi:lLno:p:rs:tuvw:z
mov eax, dword [esi + 4]
mov dword [esp + 4], eax
mov eax, dword [esi]
mov dword [esp], eax
call dbg.getopt
mov edi, eax
cmp edi, 0xffffffff
jne 0x404b5d
mov ax, word [0x40a0c6]
test ax, ax
je 0x404eb0
mov dword [esp], 0
call sym._time
mov dword [esp], eax
call sym._srand
mov dword [esp], 0x10000
call dbg.Hmalloc
mov dword [ebp - 0x20], eax
mov eax, dword [0x40a0d4]
test eax, eax
je 0x404ed8
mov dword [esp], 0
call sym._close
mov word [0x40a0c4], 0
mov dword [0x40a084], 0
mov ax, word [0x40a0c4]
test ax, ax
je 0x404f34
mov eax, dword [0x40a0b4]
mov dword [esp + 8], 0x1b4
mov dword [esp + 4], 0x301
mov dword [esp], eax
call sym._open
mov dword [0x40a084], eax
mov eax, dword [0x40a084]
test eax, eax
jg 0x404f23
mov eax, dword [0x40a0b4]
mov dword [esp + 4], eax
mov dword [esp], str.cant_open__s
call dbg.bail
mov dword [esp], 0x64
call dbg.Hmalloc
mov dword [0x40a0b4], eax
mov eax, dword [0x40a02c]
shl eax, 2
add eax, dword [esi + 4]
mov eax, dword [eax]
test eax, eax
je 0x404f6a
mov ax, word [0x40a0c2]
movzx edx, ax
mov eax, dword [0x40a02c]
shl eax, 2
add eax, dword [esi + 4]
mov eax, dword [eax]
mov dword [esp + 4], edx
mov dword [esp], eax
call dbg.gethostpoop
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
je 0x404f7b
mov eax, dword [ebp - 0x3c]
add eax, 0x1c0
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x404f8c
mov eax, dword [0x40a02c]
inc eax
mov dword [0x40a02c], eax
call sym.__errno
mov dword [eax], 0
mov ax, word [0x40a0c0]
test ax, ax
je 0x4050a9
mov word [ebp - 0x22], 0
mov eax, dword [0x40a02c]
shl eax, 2
add eax, dword [esi + 4]
mov eax, dword [eax]
test eax, eax
je 0x405002
mov eax, dword [0x40a02c]
shl eax, 2
add eax, dword [esi + 4]
mov eax, dword [eax]
mov dword [esp + 4], 0
mov dword [esp], eax
call dbg.getportpoop
mov word [ebp - 0x22], ax
cmp word [ebp - 0x22], 0
jne 0x405002
mov eax, dword [0x40a02c]
shl eax, 2
add eax, dword [esi + 4]
mov eax, dword [eax]
mov dword [esp + 4], eax
mov dword [esp], str.invalid_port__s
call dbg.bail
movzx edx, word [ebp - 0x2a]
movzx eax, word [ebp - 0x22]
mov dword [esp + 0xc], edx
mov edx, dword [ebp - 0x34]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call dbg.dolisten
mov dword [0x407008], eax
mov eax, dword [0x407008]
test eax, eax
jle 0x40509d
mov eax, dword [0x40a0d4]
test eax, eax
je 0x405048
mov eax, dword [0x407008]
mov dword [esp], eax
call dbg.doexec
mov eax, dword [0x40a0d4]
test eax, eax
jne 0x405060
mov eax, dword [0x407008]
mov dword [esp], eax
call dbg.readwrite
mov edi, eax
mov ax, word [0x40a0ca]
cmp ax, 1
jbe 0x40508b
mov edx, dword [0x40a090]
mov eax, dword [0x40a094]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], str._sent__d__rcvd__d
call dbg.holler
cmp dword [ebp - 0x1c], 1
je 0x4049e5
mov dword [esp], edi
call sym._exit
mov dword [esp], str.no_connection
call dbg.bail
cmp dword [ebp - 0x30], 0
jne 0x4050bb
mov dword [esp], str.no_destination
call dbg.bail
mov eax, dword [0x40a02c]
shl eax, 2
add eax, dword [esi + 4]
mov eax, dword [eax]
test eax, eax
jne 0x4050d8
mov dword [esp], str.no_port_s__to_connect_to
call dbg.bail
mov eax, dword [0x40a02c]
inc eax
shl eax, 2
add eax, dword [esi + 4]
mov eax, dword [eax]
test eax, eax
je 0x4050f3
mov word [0x407024], 0
mov ax, word [ebp - 0x2a]
mov word [ebp - 0x28], ax
jmp 0x4053ff
mov word [ebp - 0x26], 0
mov ax, word [ebp - 0x26]
mov word [ebp - 0x24], ax
mov eax, dword [0x40a02c]
shl eax, 2
add eax, dword [esi + 4]
mov eax, dword [eax]
mov dword [esp + 4], 0x2d
mov dword [esp], eax
call sym._strchr
mov ebx, eax
test ebx, ebx
je 0x405160
mov byte [ebx], 0
inc ebx
mov dword [esp + 4], 0
mov dword [esp], ebx
call dbg.getportpoop
mov word [ebp - 0x24], ax
cmp word [ebp - 0x24], 0
jne 0x405160
mov dword [esp + 4], ebx
mov dword [esp], str.invalid_port__s
call dbg.bail
mov eax, dword [0x40a02c]
shl eax, 2
add eax, dword [esi + 4]
mov eax, dword [eax]
mov dword [esp + 4], 0
mov dword [esp], eax
call dbg.getportpoop
mov word [ebp - 0x26], ax
cmp word [ebp - 0x26], 0
jne 0x4051a5
mov eax, dword [0x40a02c]
shl eax, 2
add eax, dword [esi + 4]
mov eax, dword [eax]
mov dword [esp + 4], eax
mov dword [esp], str.invalid_port__s
call dbg.bail
mov eax, dword [ebp - 0x24]
cmp ax, word [ebp - 0x26]
jbe 0x4051fc
mov word [0x407024], 0
mov eax, dword [ebp - 0x24]
mov word [ebp - 0x22], ax
mov ax, word [0x40a0c6]
test ax, ax
je 0x4053e6
movzx edx, word [ebp - 0x24]
movzx eax, word [ebp - 0x26]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call dbg.loadports
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call dbg.nextport
mov word [ebp - 0x22], ax
jmp 0x4053e6
mov ax, word [ebp - 0x26]
mov word [ebp - 0x22], ax
jmp 0x4053e6
cmp word [ebp - 0x2a], 0
jne 0x405232
mov ax, word [0x40a0c6]
test ax, ax
je 0x405232
call sym._rand
mov word [ebp - 0x28], ax
cmp word [ebp - 0x28], 0x1fff
ja 0x405232
add word [ebp - 0x28], 0x2000
movzx eax, word [ebp - 0x22]
mov dword [esp + 4], eax
mov dword [esp], 0
call dbg.getportpoop
mov word [ebp - 0x22], ax
movzx edx, word [ebp - 0x28]
movzx eax, word [ebp - 0x22]
mov dword [esp + 0xc], edx
mov edx, dword [ebp - 0x34]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call dbg.doconnect
mov dword [0x407008], eax
mov eax, dword [0x407008]
test eax, eax
jle 0x4052a9
mov ax, word [0x40a0d0]
test ax, ax
je 0x4052a9
mov ax, word [0x40a0c8]
test ax, ax
je 0x4052a9
mov eax, dword [0x407008]
mov edx, dword [ebp - 0x30]
mov dword [esp + 4], edx
mov dword [esp], eax
call dbg.udptest
mov dword [0x407008], eax
mov eax, dword [0x407008]
test eax, eax
jle 0x405326
mov edi, 0
mov eax, dword [0x40a0b0]
mov ebx, eax
movzx ecx, word [ebp - 0x22]
mov eax, dword [ebp - 0x3c]
add eax, 0x100
mov edx, eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], str._s___s___d___s__open
call dbg.holler
mov eax, dword [0x40a0d4]
test eax, eax
je 0x405301
mov eax, dword [0x407008]
mov dword [esp], eax
call dbg.doexec
mov ax, word [0x40a0d0]
test ax, ax
jne 0x405384
mov eax, dword [0x40a0d4]
test eax, eax
jne 0x405387
mov eax, dword [0x407008]
mov dword [esp], eax
call dbg.readwrite
mov edi, eax
jmp 0x405388
mov edi, 1
mov ax, word [0x407024]
test ax, ax
jne 0x40534e
mov ax, word [0x40a0ca]
cmp ax, 1
ja 0x40534e
call sym._WSAGetLastError_0
cmp eax, 0x274d
je 0x405388
mov eax, dword [0x40a0b0]
mov ebx, eax
movzx ecx, word [ebp - 0x22]
mov eax, dword [ebp - 0x3c]
add eax, 0x100
mov edx, eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], str._s___s___d___s_
call dbg.holler
jmp 0x405388
nop
jmp 0x405388
nop
mov eax, dword [0x407008]
mov dword [esp + 4], 2
mov dword [esp], eax
call sym._shutdown_8
sub esp, 8
mov eax, dword [0x407008]
mov dword [esp], eax
call sym._closesocket_4
sub esp, 4
mov eax, dword [0x40a0bc]
test eax, eax
je 0x4053c6
mov eax, dword [0x40a0bc]
mov dword [esp], eax
call sym.__sleep
mov ax, word [0x40a0c6]
test ax, ax
je 0x4053e2
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call dbg.nextport
mov word [ebp - 0x22], ax
jmp 0x4053e6
dec word [ebp - 0x22]
mov ax, word [ebp - 0x26]
cmp ax, word [ebp - 0x22]
jbe 0x405209
mov eax, dword [0x40a02c]
inc eax
mov dword [0x40a02c], eax
mov eax, dword [0x40a02c]
shl eax, 2
add eax, dword [esi + 4]
mov eax, dword [eax]
test eax, eax
jne 0x405100
call sym.__errno
mov dword [eax], 0
mov ax, word [0x40a0ca]
cmp ax, 1
jbe 0x40544a
mov edx, dword [0x40a090]
mov eax, dword [0x40a094]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], str.sent__d__rcvd__d
call dbg.holler
call sym._WSACleanup_0
cmp dword [ebp - 0x1c], 1
je 0x4049e8
mov ax, word [0x407024]
test ax, ax
je 0x40546c
mov dword [esp], edi
call sym._exit
mov dword [esp], 0
call sym._exit