Function at 0x404d0a
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 fcn.004062b0
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 fcn.00402b7c
mov dword [esp], 0x10
call fcn.0040325d
mov dword [0x40a05c], eax
mov dword [esp], 0x10
call fcn.0040325d
mov dword [0x40a060], eax
mov dword [esp], 0x2000
call fcn.0040325d
mov dword [0x40a548], eax
mov dword [esp], 0x2000
call fcn.0040325d
mov dword [0x40a540], eax
mov dword [esp], 0x104
call fcn.0040325d
mov dword [0x40a54c], eax
mov dword [esp], 0x104
call fcn.0040325d
mov dword [0x40a554], eax
mov dword [esp], 0x4a
call fcn.0040325d
mov dword [0x40a06c], eax
mov dword [esp], 1
call sub.msvcrt.dll_malloc
mov dword [0x40a550], eax
mov eax, dword [0x40a550]
mov byte [eax], 1
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov dword [eax], 0
mov dword [0x407024], 4
cmp dword [esi], 1
jne 0x404f90
mov eax, dword [esi + 4]
mov ebx, dword [eax]
mov dword [esp], 0x200
call fcn.0040325d
mov dword [esi + 4], eax
mov eax, dword [esi + 4]
mov dword [eax], ebx
mov dword [esp], 0x2000
call fcn.0040325d
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 sub.msvcrt.dll_fwrite
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp + 8], 0x2000
mov dword [esp + 4], ebx
mov dword [esp], 0
call sub.msvcrt.dll__read
mov dword [0x40a048], eax
mov eax, dword [0x40a048]
test eax, eax
jne 0x404ebb
mov dword [esp], str.wrong
call fcn.0040313a
mov eax, dword [0x40a048]
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.004032b7
mov edi, eax
test edi, edi
je 0x404ee0
mov eax, dword [0x40a048]
mov edx, edi
sub eax, edx
mov dword [0x40a048], eax
mov eax, dword [0x40a048]
test eax, eax
je 0x404f09
mov edx, dword [0x40a048]
mov eax, edi
lea ecx, [ebx + eax]
mov eax, dword [0x40a548]
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [esi + 4]
add eax, 4
mov eax, dword [eax]
mov dword [esp + 4], 0xa
mov dword [esp], eax
call sub.msvcrt.dll_strchr
mov ebx, eax
test ebx, ebx
je 0x404f2a
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 sub.msvcrt.dll_strchr
mov ebx, eax
test ebx, ebx
je 0x404f4b
mov byte [ebx], 0
mov eax, dword [esi + 4]
mov ebx, dword [eax + 4]
add ebx, 1
mov edi, 2
jmp 0x404f87
movzx eax, byte [ebx]
cmp al, 0x20
jne 0x404f67
mov byte [ebx], 0
jmp 0x404f84
lea eax, [ebx - 1]
movzx eax, byte [eax]
test al, al
jne 0x404f84
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 0x404f5b
mov dword [esi], edi
jmp 0x4052bd
lea eax, [edi - 0x47]
cmp eax, 0x33
ja case.0x404fa8.72
mov eax, dword [eax*4 + 0x408ad8]
jmp eax
mov dword [esp], str.all_A_records_NIY
call fcn.0040313a
movzx eax, word [0x40a074]
add eax, 1
mov word [0x40a074], ax
jmp 0x4052bd
mov eax, dword [0x40a020]
mov dword [0x40a090], eax
jmp 0x4052bd
movzx eax, word [0x40a07c]
add eax, 1
mov word [0x40a07c], ax
mov dword [ebp - 0x34], 1
jmp 0x4052bd
mov eax, dword [sym.imp.KERNEL32.dll_FreeConsole]
call eax
jmp 0x4052bd
mov eax, dword [0x40a020]
mov dword [esp], eax
call sub.msvcrt.dll_atoi
mov edi, eax
test edi, edi
je 0x405026
mov eax, edi
and eax, 0x1c
cmp eax, edi
jne 0x405026
mov dword [0x407024], edi
jmp 0x405036
mov dword [esp + 4], edi
mov dword [esp], str.invalid_hop_pointer__d__must_be_multiple_of_4___28
call fcn.0040313a
jmp 0x4052bd
mov eax, dword [0x40a044]
cmp eax, 8
jle 0x405051
mov dword [esp], str.too_many__g_hops
call fcn.0040313a
mov eax, dword [0x40a064]
test eax, eax
jne 0x40506b
mov dword [esp], 0x28
call fcn.0040325d
mov dword [0x40a064], eax
movzx eax, word [0x40a07e]
movzx edx, ax
mov eax, dword [0x40a020]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0040335e
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
je 0x4050a4
mov eax, dword [0x40a064]
mov edx, dword [0x40a044]
shl edx, 2
add edx, eax
mov eax, dword [ebp - 0x40]
mov dword [edx], eax
mov eax, dword [0x40a044]
add eax, 1
mov dword [0x40a044], eax
jmp 0x4052bd
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov dword [eax], 0
mov dword [esp], str.no_help_available__dork____RTFS
call fcn.0040313a
mov eax, dword [0x40a020]
mov dword [esp], eax
call sub.msvcrt.dll_atoi
movzx eax, ax
mov dword [0x40a078], eax
mov eax, dword [0x40a078]
imul eax, eax, 0x3e8
mov dword [0x40a078], eax
mov eax, dword [0x40a078]
test eax, eax
jne 0x405112
mov eax, dword [0x40a020]
mov dword [esp + 4], eax
mov dword [esp], str.invalid_interval_time__s
call fcn.0040313a
jmp 0x4052bd
movzx eax, word [0x40a07c]
add eax, 1
mov word [0x40a07c], ax
jmp 0x4052bd
movzx eax, word [0x40a07e]
add eax, 1
mov word [0x40a07e], ax
jmp 0x4052bd
mov eax, dword [0x40a020]
mov dword [0x40a070], eax
movzx eax, word [0x40a080]
add eax, 1
mov word [0x40a080], ax
jmp 0x4052bd
mov eax, dword [0x40a020]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.0040369d
mov word [ebp - 0x26], ax
cmp word [ebp - 0x26], 0
jne 0x405195
mov eax, dword [0x40a020]
mov dword [esp + 4], eax
mov dword [esp], str.invalid_local_port__s
call fcn.0040313a
jmp 0x4052bd
movzx eax, word [0x40a082]
add eax, 1
mov word [0x40a082], ax
jmp 0x4052bd
movzx eax, word [0x40a07e]
movzx edx, ax
mov eax, dword [0x40a020]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0040335e
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
add eax, 0x1c0
mov dword [ebp - 0x20], eax
jmp 0x4052bd
movzx eax, word [0x40a094]
add eax, 1
mov word [0x40a094], ax
jmp 0x4052bd
movzx eax, word [0x40a08e]
add eax, 1
mov word [0x40a08e], ax
jmp 0x4052bd
movzx eax, word [0x40a084]
add eax, 1
mov word [0x40a084], ax
jmp 0x4052bd
movzx eax, word [0x40a086]
add eax, 1
mov word [0x40a086], ax
jmp 0x4052bd
mov eax, dword [0x40a020]
mov dword [esp], eax
call sub.msvcrt.dll_atoi
mov dword [0x40a088], eax
mov eax, dword [0x40a088]
test eax, eax
jne 0x405261
mov eax, dword [0x40a020]
mov dword [esp + 4], eax
mov dword [esp], str.invalid_wait_time__s
call fcn.0040313a
mov dword [esp], 8
call fcn.0040325d
mov dword [0x40a054], eax
mov dword [esp], 8
call fcn.0040325d
mov dword [0x40a058], eax
mov eax, dword [0x40a054]
mov edx, dword [0x40a088]
mov dword [eax], edx
jmp 0x4052bd
movzx eax, word [0x40a08c]
add eax, 1
mov word [0x40a08c], ax
jmp 0x4052bd
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov dword [eax], 0
mov dword [esp], str.nc__h_for_help
call fcn.0040313a
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 fcn.00402081
mov edi, eax
cmp edi, 0xffffffff
jne 0x404f95
movzx eax, word [0x40a082]
test ax, ax
je 0x405310
mov dword [esp], 0
call sub.msvcrt.dll_time
mov dword [esp], eax
call sub.msvcrt.dll_srand
mov dword [esp], 0x10000
call fcn.0040325d
mov dword [ebp - 0x30], eax
mov eax, dword [0x40a090]
test eax, eax
je 0x405338
mov dword [esp], 0
call sub.msvcrt.dll__close
mov word [0x40a080], 0
mov dword [0x40a040], 0
movzx eax, word [0x40a080]
test ax, ax
je 0x405395
mov eax, dword [0x40a070]
mov dword [esp + 8], 0x1b4
mov dword [esp + 4], 0x301
mov dword [esp], eax
call sub.msvcrt.dll__open
mov dword [0x40a040], eax
mov eax, dword [0x40a040]
test eax, eax
jg 0x405384
mov eax, dword [0x40a070]
mov dword [esp + 4], eax
mov dword [esp], str.cant_open__s
call fcn.0040313a
mov dword [esp], 0x64
call fcn.0040325d
mov dword [0x40a070], eax
mov eax, dword [0x40a024]
lea edx, [eax*4]
mov eax, dword [esi + 4]
add eax, edx
mov eax, dword [eax]
test eax, eax
je 0x4053d8
movzx eax, word [0x40a07e]
movzx edx, ax
mov eax, dword [0x40a024]
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 fcn.0040335e
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x4053f5
mov eax, dword [ebp - 0x1c]
add eax, 0x1c0
test eax, eax
je 0x4053f5
mov eax, dword [ebp - 0x1c]
add eax, 0x1c0
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x405408
mov eax, dword [0x40a024]
add eax, 1
mov dword [0x40a024], eax
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov dword [eax], 0
movzx eax, word [0x40a07c]
test ax, ax
je 0x40553c
mov word [ebp - 0x2c], 0
mov eax, dword [0x40a024]
lea edx, [eax*4]
mov eax, dword [esi + 4]
add eax, edx
mov eax, dword [eax]
test eax, eax
je 0x405493
mov eax, dword [0x40a024]
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 fcn.0040369d
mov word [ebp - 0x2c], ax
cmp word [ebp - 0x2c], 0
jne 0x405493
mov eax, dword [0x40a024]
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 fcn.0040313a
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 fcn.00403d28
mov dword [0x40700c], eax
mov eax, dword [0x40700c]
test eax, eax
jle 0x405530
mov eax, dword [0x40a090]
test eax, eax
je 0x4054d9
mov eax, dword [0x40700c]
mov dword [esp], eax
call fcn.00402340
mov eax, dword [0x40a090]
test eax, eax
jne 0x4054f1
mov eax, dword [0x40700c]
mov dword [esp], eax
call fcn.0040461b
mov edi, eax
movzx eax, word [0x40a086]
cmp ax, 1
jbe 0x40551d
mov edx, dword [0x40a04c]
mov eax, dword [0x40a050]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], str._sent__d__rcvd__d
call fcn.0040307f
cmp dword [ebp - 0x34], 1
jne 0x405528
jmp 0x404e19
mov dword [esp], edi
call sub.msvcrt.dll_exit
mov dword [esp], str.no_connection
call fcn.0040313a
cmp dword [ebp - 0x24], 0
jne 0x40554e
mov dword [esp], str.no_destination
call fcn.0040313a
mov eax, dword [0x40a024]
lea edx, [eax*4]
mov eax, dword [esi + 4]
add eax, edx
mov eax, dword [eax]
test eax, eax
jne 0x405571
mov dword [esp], str.no_port_s__to_connect_to
call fcn.0040313a
mov eax, dword [0x40a024]
add eax, 1
lea edx, [eax*4]
mov eax, dword [esi + 4]
add eax, edx
mov eax, dword [eax]
test eax, eax
je 0x405594
mov word [0x407028], 0
movzx eax, word [ebp - 0x26]
mov word [ebp - 0x28], ax
jmp 0x4058c3
mov word [ebp - 0x3a], 0
movzx eax, word [ebp - 0x3a]
mov word [ebp - 0x2a], ax
mov eax, dword [0x40a024]
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 sub.msvcrt.dll_strchr
mov ebx, eax
test ebx, ebx
je 0x405609
mov byte [ebx], 0
add ebx, 1
mov dword [esp + 4], 0
mov dword [esp], ebx
call fcn.0040369d
mov word [ebp - 0x2a], ax
cmp word [ebp - 0x2a], 0
jne 0x405609
mov dword [esp + 4], ebx
mov dword [esp], str.invalid_port__s
call fcn.0040313a
mov eax, dword [0x40a024]
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 fcn.0040369d
mov word [ebp - 0x3a], ax
cmp word [ebp - 0x3a], 0
jne 0x40565a
mov eax, dword [0x40a024]
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 fcn.0040313a
movzx eax, word [ebp - 0x2a]
cmp ax, word [ebp - 0x3a]
jbe 0x4056b0
mov word [0x407028], 0
movzx eax, word [ebp - 0x2a]
mov word [ebp - 0x2c], ax
movzx eax, word [0x40a082]
test ax, ax
je 0x4056b8
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 fcn.0040390e
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call fcn.0040389b
mov word [ebp - 0x2c], ax
jmp 0x4058a8
movzx eax, word [ebp - 0x3a]
mov word [ebp - 0x2c], ax
jmp 0x4058a8
cmp word [ebp - 0x26], 0
jne 0x4056e7
movzx eax, word [0x40a082]
test ax, ax
je 0x4056e7
call sub.msvcrt.dll_rand
mov word [ebp - 0x28], ax
cmp word [ebp - 0x28], 0x1fff
ja 0x4056e7
add word [ebp - 0x28], 0x2000
movzx eax, word [ebp - 0x2c]
mov dword [esp + 4], eax
mov dword [esp], 0
call fcn.0040369d
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 fcn.0040398b
mov dword [0x40700c], eax
mov eax, dword [0x40700c]
test eax, eax
jle 0x405760
movzx eax, word [0x40a08c]
test ax, ax
je 0x405760
movzx eax, word [0x40a084]
test ax, ax
je 0x405760
mov eax, dword [0x40700c]
mov edx, dword [ebp - 0x24]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00404254
mov dword [0x40700c], eax
mov eax, dword [0x40700c]
test eax, eax
jle 0x4057dd
mov edi, 0
mov eax, dword [0x40a06c]
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 fcn.0040307f
mov eax, dword [0x40a090]
test eax, eax
je 0x4057b7
mov eax, dword [0x40700c]
mov dword [esp], eax
call fcn.00402340
movzx eax, word [0x40a08c]
test ax, ax
jne 0x40583c
mov eax, dword [0x40a090]
test eax, eax
jne 0x40583c
mov eax, dword [0x40700c]
mov dword [esp], eax
call fcn.0040461b
mov edi, eax
jmp 0x40583c
mov edi, 1
movzx eax, word [0x407028]
test ax, ax
jne 0x405809
movzx eax, word [0x40a086]
cmp ax, 1
ja 0x405809
mov eax, dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
call eax
cmp eax, 0x274d
je 0x40583c
mov eax, dword [0x40a06c]
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 fcn.0040307f
mov eax, dword [0x40700c]
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 [0x40700c]
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_closesocket]
call eax
sub esp, 4
mov eax, dword [0x40a078]
test eax, eax
je 0x405880
mov eax, dword [0x40a078]
mov dword [esp], eax
mov eax, dword [sym.imp.msvcrt.dll__sleep]
call eax
movzx eax, word [0x40a082]
test ax, ax
je 0x40589d
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call fcn.0040389b
mov word [ebp - 0x2c], ax
jmp 0x4058a8
movzx eax, word [ebp - 0x2c]
sub eax, 1
mov word [ebp - 0x2c], ax
movzx eax, word [ebp - 0x3a]
cmp ax, word [ebp - 0x2c]
jbe 0x4056bd
mov eax, dword [0x40a024]
add eax, 1
mov dword [0x40a024], eax
mov eax, dword [0x40a024]
lea edx, [eax*4]
mov eax, dword [esi + 4]
add eax, edx
mov eax, dword [eax]
test eax, eax
jne 0x4055a1
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov dword [eax], 0
movzx eax, word [0x40a086]
cmp ax, 1
jbe 0x405917
mov edx, dword [0x40a04c]
mov eax, dword [0x40a050]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], str.sent__d__rcvd__d
call fcn.0040307f
mov eax, dword [sym.imp.WSOCK32.DLL_WSACleanup]
call eax
cmp dword [ebp - 0x34], 1
jne 0x405929
jmp 0x404e19
movzx eax, word [0x407028]
test ax, ax
je 0x40593d
mov dword [esp], edi
call sub.msvcrt.dll_exit
mov dword [esp], 0
call sub.msvcrt.dll_exit
nop
nop
nop