Function at 0x406ac0
Capabilities:
Create thread
Encode data using xor
Hash data using crc32b

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40830d
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x40d004]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 0xc]
push str.v2.9.0__CMD_Tool_
push str.Version_:__s_r_n
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x2c], 0x1d
mov dword [ebp - 0x30], 1
call fcn.00401080
push str.stream_intermediate
push str.Branch__:__s_r_n
call fcn.00401080
push 0x40b828
push str.Build___:__s_r_n
call fcn.00401080
push str.152832ba86662e89a65422005ce72c6d46a12d07
push str.Commit__:__s_r_n
call fcn.00401080
push str.2024_03_21_01:56:30_MST
push str.Date____:__s_r_n
call fcn.00401080
mov esi, dword [ebp + 8]
add esp, 0x28
cmp esi, 2
je 0x406b61
push str.USAGE:_cmd_tool.exe_comportno_n
call fcn.00401080
add esp, 4
lea eax, [ebp - 0x2c]
push eax
push 0x40b8c0
push dword [edi + 4]
call fcn.004010b0
xor edx, edx
mov dword [ebp - 0x28], 0
add esp, 0xc
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], dl
mov dword [ebp - 4], edx
cmp esi, 2
jle 0x406cc5
mov esi, 2
mov dword [ebp - 0x38], esi
nop
mov ecx, dword [edi + esi*4]
mov edi, ecx
lea eax, [edi + 1]
mov dword [ebp - 0x3c], eax
nop dword [eax + eax]
mov al, byte [edi]
inc edi
test al, al
jne 0x406bb0
sub edi, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x14]
sub eax, edx
push edi
push ecx
cmp edi, eax
ja 0x406bea
cmp dword [ebp - 0x14], 0x10
lea esi, [ebp - 0x28]
lea eax, [edi + edx]
cmovae esi, dword [ebp - 0x28]
add esi, edx
mov dword [ebp - 0x18], eax
push esi
call sub.VCRUNTIME140.dll_memmove
mov byte [esi + edi], 0
add esp, 0xc
mov esi, dword [ebp - 0x38]
jmp 0x406bfa
mov byte [ebp - 0x44], 0
lea ecx, [ebp - 0x28]
push dword [ebp - 0x44]
push edi
call fcn.00405b50
mov edx, dword [ebp - 0x14]
mov eax, edx
mov ecx, dword [ebp - 0x18]
sub eax, ecx
cmp eax, 1
jb 0x406c21
lea eax, [ecx + 1]
cmp edx, 0x10
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
mov word [eax + ecx], 0x20
jmp 0x406c39
push 1
push 0x409db4
mov byte [ebp - 0x48], 0
lea ecx, [ebp - 0x28]
push dword [ebp - 0x48]
push 1
call fcn.00405b50
inc esi
mov dword [ebp - 0x38], esi
cmp esi, dword [ebp + 8]
jge 0x406c4d
mov edx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x40]
jmp 0x406ba0
mov edx, dword [ebp - 0x14]
mov eax, edx
mov ecx, dword [ebp - 0x18]
sub eax, ecx
cmp eax, 1
jb 0x406c74
lea eax, [ecx + 1]
cmp edx, 0x10
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
mov word [eax + ecx], 0xa
jmp 0x406c8c
push 1
push 0x409da8
mov byte [ebp - 0x40], 0
lea ecx, [ebp - 0x28]
push dword [ebp - 0x40]
push 1
call fcn.00405b50
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
mov ecx, dword [ebp - 0x18]
cmovae eax, dword [ebp - 0x28]
cmp ecx, 0x400
ja 0x406cfe
push ecx
push eax
push 0x40d510
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov dword [0x40e12c], 1
mov dword [0x40e138], 1
mov eax, dword [0x40e594]
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
cmp eax, dword [0x40e598]
je 0x406d5c
movups xmm0, xmmword [ebp - 0x58]
movups xmmword [eax], xmm0
add dword [0x40e594], 0x10
jmp 0x406d66
push str._nFail:_Invalid_Command_Parameters_n
call fcn.00401080
mov ecx, dword [ebp - 0x14]
add esp, 4
cmp ecx, 0x10
jb 0x406d3f
mov edx, dword [ebp - 0x28]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x406d35
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406e3f
push ecx
push edx
call fcn.004076b6
add esp, 8
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00407427
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x58]
push ecx
push eax
call fcn.004026d0
xor eax, eax
mov dword [0x40e150], 0x40d910
mov byte [0x40d50b], 0
mov edi, 0x40e5a0
mov dword [0x40e144], 0x40e160
mov dword [0x40e148], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x3c], pe_nt_image_headers32
nop word [eax + eax]
mov edx, eax
mov esi, 8
shl edx, 0x18
nop word [eax + eax]
lea ecx, [edx + edx]
mov eax, ecx
xor eax, 0x4c11db7
test edx, edx
cmovns eax, ecx
mov edx, eax
sub esi, 1
jne 0x406db0
mov eax, dword [ebp - 0x38]
mov dword [edi], edx
inc eax
add edi, 4
mov dword [ebp - 0x38], eax
sub dword [ebp - 0x3c], 1
jne 0x406da0
mov ecx, dword [ebp - 0x2c]
call fcn.00407220
test eax, eax
je 0x406dee
push str._nFailed_to_connect_device_port__exit_n
jmp 0x406d03
push 0xf
push dword [0x40e15c]
call dword [sym.imp.KERNEL32.dll_PurgeComm]
test eax, eax
jne 0x406e45
push str.Purge_Comm_for_hComm1_Failed._n
call fcn.00401080
mov ecx, dword [ebp - 0x14]
add esp, 4
cmp ecx, 0x10
jb 0x406d3f
mov edx, dword [ebp - 0x28]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x406d35
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x406d35
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
mov esi, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_signal]
push 0x406ee0
push 0x16
call esi
push 0x406ee0
push 2
call esi
mov edi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push 1
call edi
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
push eax
call esi
push 0
call edi
push eax
call esi
add esp, 0x20
call fcn.00403020
test eax, eax
jne 0x406ed0
lea eax, [ebp - 0x34]
push eax
push 0
lea eax, [ebp - 0x30]
push eax
push 0x403030
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x406eb6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateThread___failed__error:__d._n
call fcn.00401080
add esp, 8
jmp 0x406ed0
push dword [ebp - 0x34]
push str.The_thread_ID:__d._n
call fcn.00401080
push str.Thread_is_Created_successfully__n
call fcn.00401080
add esp, 0xc
xor ecx, ecx
call fcn.00406fe0
call fcn.00404570
int3