Function at 0x402dad
Capabilities:
Read and send data from client to server
Read file on windows
Send data
Send data on socket
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c4
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x1c0], eax
mov eax, dword [ebp + 0xc]
push ebx
mov dword [esp + 8], eax
xor ebx, ebx
xor eax, eax
mov dword [esp + 0x10], ebx
push esi
push edi
mov dword [esp + 0x2c], eax
xor edi, edi
mov dword [esp + 0x30], eax
lea eax, [esp + 0x38]
push eax
push 0x101
mov dword [esp + 0x28], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x24], ebx
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x402acb
mov eax, dword [esp + 0x38]
cmp al, 1
jne 0x402ac5
shr eax, 8
cmp al, 1
je 0x402acb
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
push 0x14
call esi
add esp, 4
test eax, eax
je 0x4036a2
xorps xmm0, xmm0
mov dword [0x407428], eax
movups xmmword [eax], xmm0
push 0x14
mov dword [eax + 0x10], ebx
call esi
add esp, 4
test eax, eax
je 0x4036a2
xorps xmm0, xmm0
mov dword [0x407444], eax
movups xmmword [eax], xmm0
push 0x2004
mov dword [eax + 0x10], ebx
call esi
mov esi, eax
add esp, 4
test esi, esi
je 0x403693
push 0x2004
push 0
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [0x4074c0], esi
push 0x2004
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
je 0x403693
push 0x2004
push 0
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [0x4074c8], esi
push pe_nt_image_headers32
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
je 0x403684
push pe_nt_image_headers32
push 0
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [0x4074d0], esi
push pe_nt_image_headers32
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
je 0x403684
push pe_nt_image_headers32
push 0
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [0x4074cc], esi
push 0x4c
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov esi, eax
push 0x4c
test esi, esi
je 0x403590
push 0
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [0x407448], esi
push 1
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov dword [0x4074d4], eax
mov byte [eax], 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], ebx
mov esi, dword [esp + 0x10]
nop word [eax + eax]
mov eax, dword [ebp + 8]
cmp eax, 1
jne 0x402d77
mov esi, dword [esi]
push 0x204
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
je 0x40358b
push 0x200
lea ecx, [eax + 4]
push 0
push ecx
call sub.VCRUNTIME140.dll_memset
mov eax, dword [esp + 0x1c]
add esp, 0xc
push 0x2004
mov dword [eax], esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
je 0x403693
push 0x2004
push 0
push esi
call sub.VCRUNTIME140.dll_memset
mov eax, dword [esp + 0x1c]
add esp, 0xc
push str.Cmd_line:
push 2
mov dword [eax + 4], esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401040
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 0xc
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
add esp, 4
push 0x2000
push esi
push 0
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
mov edx, eax
add esp, 0xc
mov dword [0x40743c], edx
test edx, edx
je 0x403581
cmp edx, 0x2000
jbe 0x402cd8
xor eax, eax
jmp 0x402cf9
mov eax, esi
test edx, edx
jle 0x402ceb
mov ecx, edx
cmp byte [eax], 0xa
je 0x402d5a
dec ecx
inc eax
test ecx, ecx
jg 0x402ce0
mov eax, edx
test eax, eax
je 0x402cf9
sub edx, eax
mov dword [0x40743c], edx
test edx, edx
je 0x402d0f
push edx
add eax, esi
push eax
push dword [0x4074c0]
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov esi, dword [esp + 0x10]
push 0xa
push dword [esi + 4]
call dword [sym.imp.VCRUNTIME140.dll_strchr]
add esp, 8
test eax, eax
je 0x402d28
mov byte [eax], 0
push 0xd
push dword [esi + 4]
call dword [sym.imp.VCRUNTIME140.dll_strchr]
add esp, 8
test eax, eax
je 0x402d3d
mov byte [eax], 0
mov eax, dword [esi + 4]
mov edx, 2
inc eax
mov dword [ebp + 8], edx
mov cl, byte [eax]
test cl, cl
je 0x402d74
nop
cmp cl, 0x20
jne 0x402d5f
mov byte [eax], 0
jmp 0x402d69
sub eax, esi
inc eax
jmp 0x402ced
cmp byte [eax - 1], 0
jne 0x402d69
mov dword [esi + edx*4], eax
inc edx
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x402d50
mov dword [ebp + 8], edx
mov eax, dword [ebp + 8]
sub esp, 0x10
mov edx, esi
mov ecx, eax
call fcn.00401150
add esp, 0x10
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
je 0x402fe2
add eax, 0xffffffb9
cmp eax, 0x33
ja case.0x402da6.72
movzx eax, byte [eax + 0x4036fc]
jmp dword [eax*4 + 0x4036b0]
inc word [0x407418]
mov dword [esp + 0x30], 1
jmp 0x402fc5
call dword [sym.imp.KERNEL32.dll_FreeConsole]
jmp 0x402fc5
push dword [0x407400]
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
add esp, 4
test eax, eax
je 0x402dec
mov ecx, eax
and ecx, 0x1c
cmp eax, ecx
je 0x402fc5
push eax
push str.invalid_hop_pointer__d__must_be_multiple_of_4___28
call fcn.00401850
cmp dword [0x407408], 8
jg 0x40359a
cmp dword [0x407404], 0
jne 0x402e39
push 0x2c
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov esi, eax
push 0x2c
test esi, esi
je 0x403590
push 0
push esi
call sub.VCRUNTIME140.dll_memset
mov dword [0x407404], esi
add esp, 0xc
mov esi, dword [esp + 0x10]
movzx edx, word [0x407434]
mov ecx, dword [0x407400]
call fcn.004018b0
mov edx, dword [0x407408]
test eax, eax
je 0x402e5e
mov ecx, dword [0x407404]
mov dword [ecx + edx*4], eax
inc edx
mov dword [0x407408], edx
jmp 0x402fc5
push dword [0x407400]
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
movzx eax, ax
add esp, 4
imul eax, eax, 0x3e8
mov dword [0x407424], eax
test eax, eax
jne 0x402fc5
push dword [0x407400]
push str.invalid_interval_time__s
call fcn.00401850
inc word [0x407418]
jmp 0x402fc5
inc word [0x407434]
jmp 0x402fc5
mov eax, dword [0x407400]
inc word [0x40744c]
mov dword [0x40742c], eax
jmp 0x402fc5
mov ecx, dword [0x407400]
xor edx, edx
call fcn.00401b60
movzx eax, ax
mov dword [esp + 0x1c], eax
test ax, ax
jne 0x402fc5
push dword [0x407400]
push str.invalid_local_port__s
call fcn.00401850
inc word [0x407450]
jmp 0x402fc5
movzx edx, word [0x407434]
mov ecx, dword [0x407400]
call fcn.004018b0
add eax, 0x1c0
mov dword [esp + 0x28], eax
jmp 0x402fc5
inc word [0x407430]
jmp 0x402fc5
inc word [0x40740c]
jmp 0x402fc5
inc word [0x407414]
jmp 0x402fc5
push dword [0x407400]
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
add esp, 4
mov dword [0x407454], eax
test eax, eax
je 0x4035b0
push 0xc
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
test eax, eax
je 0x4035a4
xorps xmm0, xmm0
mov dword [0x407440], eax
movq qword [eax], xmm0
push 0xc
mov dword [eax + 8], 0
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
test eax, eax
je 0x4035a4
mov ecx, dword [0x407454]
xorps xmm0, xmm0
movq qword [eax], xmm0
mov dword [eax + 8], 0
mov dword [0x407410], eax
mov eax, dword [0x407440]
mov dword [eax], ecx
jmp 0x402fc5
inc word [0x40741c]
mov ecx, dword [ebp + 8]
sub esp, 0x10
mov edx, esi
call fcn.00401150
add esp, 0x10
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
jne 0x402d93
cmp word [0x407450], 0
je 0x40302b
push 0
call dword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
add esp, 4
push eax
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_srand]
add esp, 4
push 0x10004
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov dword [esp + 0x2c], eax
push 0x10004
test eax, eax
je 0x403590
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
cmp word [0x40744c], 0
je 0x403087
push 0x1b4
push 0x301
push dword [0x40742c]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__open]
add esp, 0xc
mov dword [0x407420], eax
test eax, eax
jle 0x4035f1
push 0x68
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov esi, eax
push 0x68
test esi, esi
je 0x403590
push 0
push esi
call sub.VCRUNTIME140.dll_memset
mov dword [0x40742c], esi
add esp, 0xc
mov esi, dword [esp + 0x10]
mov eax, dword [0x4073fc]
mov ecx, dword [esi + eax*4]
test ecx, ecx
je 0x4030aa
movzx edx, word [0x407434]
call fcn.004018b0
mov edi, eax
mov eax, dword [0x4073fc]
mov dword [esp + 0x20], edi
test edi, edi
je 0x4030c0
lea ecx, [edi + 0x1c0]
test ecx, ecx
je 0x4030c0
mov ebx, ecx
mov dword [esp + 0x18], ebx
jmp 0x4030c4
test ebx, ebx
je 0x4030ca
inc eax
mov dword [0x4073fc], eax
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp word [0x407418], 0
mov dword [eax], 0
je 0x403165
mov eax, dword [0x4073fc]
xor edx, edx
mov ecx, dword [esi + eax*4]
test ecx, ecx
je 0x403103
call fcn.00401b60
movzx edx, ax
test dx, dx
je 0x403601
mov eax, dword [esp + 0x1c]
mov ecx, ebx
movzx eax, ax
push eax
push dword [esp + 0x2c]
movzx edx, dx
call fcn.00401ee0
add esp, 8
mov dword [0x407058], eax
test eax, eax
jle 0x403613
call fcn.00402300
cmp word [0x407414], 1
mov esi, eax
jbe 0x403153
push dword [0x407458]
push dword [0x407438]
push str._sent__d__rcvd__d
call fcn.00401470
add esp, 0xc
cmp dword [esp + 0x30], 1
je 0x402c02
push esi
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
test ebx, ebx
je 0x40367a
mov eax, dword [0x4073fc]
cmp dword [esi + eax*4], 0
je 0x403670
cmp dword [esi + eax*4 + 4], 0
je 0x40318c
xor ecx, ecx
mov word [0x40705c], cx
mov ecx, dword [esp + 0x1c]
movzx ecx, cx
mov dword [esp + 0x24], ecx
mov ebx, dword [esp + 0x10]
xor esi, esi
push 0x2d
push dword [ebx + eax*4]
call dword [sym.imp.VCRUNTIME140.dll_strchr]
mov edi, eax
add esp, 8
test edi, edi
je 0x4031ca
mov byte [edi], 0
xor edx, edx
inc edi
mov ecx, edi
call fcn.00401b60
movzx esi, ax
test si, si
je 0x40361d
mov ecx, dword [0x4073fc]
xor edx, edx
mov ecx, dword [ebx + ecx*4]
call fcn.00401b60
movzx edi, ax
mov dword [esp + 0x34], edi
test di, di
je 0x40365e
cmp si, di
jbe 0x4032a3
xor eax, eax
movzx ebx, si
mov word [0x40705c], ax
cmp word [0x407450], ax
je 0x403298
mov ebx, dword [esp + 0x2c]
movzx edx, di
test ebx, ebx
je 0x403637
test si, si
je 0x403628
movzx ecx, si
nop word [eax + eax]
movzx eax, cx
add ecx, 0xffff
mov byte [eax + ebx], 1
cmp cx, dx
jae 0x403230
mov eax, dword [esp + 0x18]
mov esi, 0x11170
mov dword [esp + 0x18], eax
nop
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
movzx eax, ax
cmp byte [eax + ebx], 1
je 0x40327d
sub esi, 1
jne 0x403250
mov eax, 0xffff
nop dword [eax]
cmp byte [eax + ebx], 1
je 0x403289
sub eax, 1
jne 0x403270
jmp 0x40328d
mov byte [eax + ebx], 2
test eax, eax
je 0x403264
mov ebx, eax
jmp 0x403298
mov byte [eax + ebx], 2
test eax, eax
je 0x403296
movzx ebx, ax
jmp 0x403298
xor ebx, ebx
cmp di, bx
ja 0x40351b
jmp 0x4032a6
movzx ebx, di
cmp word [esp + 0x1c], 0
jne 0x4032d5
cmp word [0x407450], 0
je 0x4032d5
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
movzx eax, ax
mov ecx, 0x2000
mov dword [esp + 0x24], eax
cmp ax, cx
jae 0x4032d5
add eax, ecx
mov dword [esp + 0x24], eax
movzx edx, bx
xor ecx, ecx
call fcn.00401b60
mov ecx, dword [esp + 0x18]
movzx ebx, ax
mov eax, dword [esp + 0x24]
mov edi, ebx
movzx eax, ax
mov edx, edi
push eax
push dword [esp + 0x2c]
mov dword [esp + 0x1c], edi
call fcn.00401c90
mov esi, eax
add esp, 8
mov dword [0x407058], esi
test esi, esi
jle 0x403437
cmp word [0x40741c], 0
je 0x4033fa
cmp word [0x40740c], 0
je 0x4033fa
push 0
push 1
push dword [0x4074c0]
push esi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 1
je 0x403359
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
push str.udptest_first_write_failed___errno__d
call fcn.00401470
add esp, 8
mov eax, dword [0x407454]
test eax, eax
je 0x40336b
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4033bb
mov ecx, dword [esp + 0x18]
xor eax, eax
push eax
push eax
mov edx, 0x7a69
mov word [0x40740c], ax
mov dword [0x407454], 5
call fcn.00401c90
mov edi, eax
add esp, 8
test edi, edi
jle 0x40339f
push 2
push esi
call dword [sym.imp.WS2_32.dll_shutdown]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
inc word [0x40740c]
mov edi, dword [esp + 0x14]
mov dword [0x407454], 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push 0
push 1
push dword [0x4074c0]
mov dword [eax], 0
push esi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 1
je 0x4033f0
push 2
push esi
call dword [sym.imp.WS2_32.dll_shutdown]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
or esi, 0xffffffff
mov dword [0x407058], esi
test esi, esi
jle 0x403437
push dword [0x407448]
mov esi, dword [esp + 0x24]
push edi
mov dword [esp + 0x1c], 0
lea eax, [esi + 0x100]
push eax
push esi
push str._s___s___d___s__open
call fcn.00401470
add esp, 0x14
cmp word [0x40741c], 0
jne 0x403480
call fcn.00402300
mov dword [esp + 0x14], eax
jmp 0x403480
cmp word [0x40705c], 0
mov dword [esp + 0x14], 1
jne 0x403460
cmp word [0x407414], 1
ja 0x403460
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x274d
je 0x403480
push dword [0x407448]
mov ecx, dword [esp + 0x24]
push edi
lea eax, [ecx + 0x100]
push eax
push ecx
push str._s___s___d___s_
call fcn.00401470
add esp, 0x14
push 2
push dword [0x407058]
call dword [sym.imp.WS2_32.dll_shutdown]
push dword [0x407058]
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [0x407424]
test eax, eax
je 0x4034aa
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp word [0x407450], 0
je 0x40350a
mov esi, 0x11170
nop dword [eax]
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
mov ecx, dword [esp + 0x2c]
movzx eax, ax
cmp byte [eax + ecx], 1
je 0x4034ed
sub esi, 1
jne 0x4034c0
mov eax, 0xffff
nop dword [eax]
cmp byte [eax + ecx], 1
je 0x4034f9
sub eax, 1
jne 0x4034e0
jmp 0x4034fd
mov byte [eax + ecx], 2
test eax, eax
je 0x4034d8
mov ebx, eax
jmp 0x403510
mov byte [eax + ecx], 2
test eax, eax
je 0x403506
movzx ebx, ax
jmp 0x403510
xor ebx, ebx
jmp 0x403510
add ebx, 0xffff
cmp word [esp + 0x34], bx
jbe 0x4032a6
mov eax, dword [0x4073fc]
mov esi, dword [esp + 0x10]
inc eax
mov dword [0x4073fc], eax
cmp dword [esi + eax*4], 0
jne 0x403197
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp word [0x407414], 1
mov dword [eax], 0
jbe 0x403563
push dword [0x407458]
push dword [0x407438]
push str.sent__d__rcvd__d
call fcn.00401470
add esp, 0xc
call dword [sym.imp.WS2_32.dll_WSACleanup]
cmp dword [esp + 0x30], 1
jne 0x403641
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x18]
jmp 0x402c10
push str.wrong
call fcn.00401850
push 0x204
push str.Hmalloc__d_failed
call fcn.00401850
push str.too_many__g_hops
call fcn.00401850
push 0xc
push str.Hmalloc__d_failed
call fcn.00401850
push dword [0x407400]
push str.invalid_wait_time__s
call fcn.00401850
push str.all_A_records_NIY
call fcn.00401850
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], 0
call fcn.00403730
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push str.nc__h_for_help
mov dword [eax], 0
call fcn.00401850
push dword [0x40742c]
push str.cant_open__s
call fcn.00401850
mov eax, dword [0x4073fc]
push dword [esi + eax*4]
push str.invalid_port__s
call fcn.00401850
push str.no_connection
call fcn.00401850
push edi
push str.invalid_port__s
call fcn.00401850
movzx eax, si
push eax
push edx
push str.loadports:_bogus_values__d___d
call fcn.00401850
push str.loadports:_no_block__
call fcn.00401850
cmp word [0x40705c], 0
je 0x403656
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
mov eax, dword [0x4073fc]
push dword [ebx + eax*4]
push str.invalid_port__s
call fcn.00401850
push str.no_port_s__to_connect_to
call fcn.00401850
push str.no_destination
call fcn.00401850
push pe_nt_image_headers32
push str.Hmalloc__d_failed
call fcn.00401850
push 0x2004
push str.Hmalloc__d_failed
call fcn.00401850
push 0x14
push str.Hmalloc__d_failed
call fcn.00401850
nop
int3