Function at 0x14017f470
Capabilities:
Create thread
Read file on windows
Resume thread
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rdi
push rbp
lea rbp, [rsp - 0x70]
sub rsp, 0x170
mov rax, qword [0x1404af540]
xor rax, rsp
mov qword [rbp + 0x68], rax
mov rdi, rcx
xorps xmm0, xmm0
movups xmmword [rbp + 0x28], xmm0
movups xmmword [rbp + 0x38], xmm0
mov r9d, dword [0x1404c573c]
lea r8, str.COM_d
mov rdx, 0xffffffffffffffff
lea rcx, [rbp + 0x28]
call fcn.1400d0a80
xor ebx, ebx
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc0000000
lea rcx, [rbp + 0x28]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [0x1404af5e0], rax
cmp rax, 0xffffffffffffffff
je 0x14017fd25
mov edx, 0x400
mov r8d, 0x200
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetupComm]
mov eax, 0x4b00
cdq
idiv dword [0x1404c5740]
mov dword [rbp - 0x10], eax
mov dword [rbp - 0xc], ebx
mov dword [rbp - 8], 0x3e8
mov dword [rbp - 4], eax
mov dword [rbp], 0x64
lea rdx, [rbp - 0x10]
mov rcx, qword [0x1404af5e0]
call qword [sym.imp.KERNEL32.dll_SetCommTimeouts]
test eax, eax
je 0x14017fb17
xorps xmm0, xmm0
movdqu xmmword [rbp + 0xc], xmm0
mov qword [rbp + 0x1c], rbx
mov dword [rbp + 8], Ordinal_32
lea rdx, [rbp + 8]
mov rcx, qword [0x1404af5e0]
call qword [sym.imp.KERNEL32.dll_GetCommState]
mov eax, dword [0x1404c5740]
mov dword [rbp + 0xc], eax
movzx eax, byte [0x1404c5744]
mov byte [rbp + 0x1a], al
movzx eax, byte [0x1404c5748]
mov byte [rbp + 0x1c], al
movzx eax, byte [0x1404c574c]
mov byte [rbp + 0x1b], al
mov ecx, dword [0x1404c5754]
and ecx, 3
shl ecx, 8
mov eax, dword [0x1404c5750]
and eax, 3
or ecx, eax
shl ecx, 4
mov eax, dword [rbp + 0x10]
and eax, 0xffffcfcf
or ecx, eax
or ecx, 0x303
mov dword [rbp + 0x10], ecx
lea rdx, [rbp + 8]
mov rcx, qword [0x1404af5e0]
call qword [sym.imp.KERNEL32.dll_SetCommState]
test eax, eax
je 0x14017f909
mov dword [rbp - 0x1c], ebx
mov dword [rbp - 0x20], ebx
xorps xmm0, xmm0
movups xmmword [rbp + 0x48], xmm0
movups xmmword [rbp + 0x58], xmm0
mov edx, reloc.SinoSPE.dll_Ordinal_15
mov rcx, qword [0x1404af5e0]
call qword [sym.imp.KERNEL32.dll_PurgeComm]
mov qword [rsp + 0x20], rbx
lea r9, [rbp - 0x20]
mov r8d, 2
lea rdx, [0x14043c758]
mov rcx, qword [0x1404af5e0]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14017f64b
cmp dword [rbp - 0x20], 2
jne 0x14017f64b
mov qword [rsp + 0x20], rbx
lea r9, [rbp - 0x1c]
mov r8d, Ordinal_32
lea rdx, [rbp + 0x48]
mov rcx, qword [0x1404af5e0]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [reloc.SinoSPE.dll_Ordinal_1], 1
mov dword [rbp - 8], ebx
lea rdx, [rbp - 0x10]
mov rcx, qword [0x1404af5e0]
call qword [sym.imp.KERNEL32.dll_SetCommTimeouts]
mov dword [rbp - 0x18], ebx
lea rax, [rbp - 0x18]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 4
xor r9d, r9d
lea r8, [0x140184750]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov qword [0x1404bac70], rax
test rax, rax
je 0x14017f6d4
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov dword [reloc.SinoSPE.dll_Ordinal_1], ebx
mov dword [0x1404c1ca4], 1
mov dword [0x1404c1ca0], 0x14
mov rcx, qword [0x1404bac70]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
jmp 0x14017ff14
mov dword [reloc.SinoSPE.dll_Ordinal_1], 1
mov rcx, qword [0x1404af5e0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x1404af5e0], 0xffffffffffffffff
mov dword [rsp + 0x28], 1
xor r9d, r9d
lea r8, str.Create_thread_failed.
lea rdx, [0x1404397d8]
lea rcx, str.AutoExtn
call fcn.14016ca80
xorps xmm0, xmm0
movups xmmword [rbp - 0x40], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x30], xmm1
xor r8d, r8d
lea rdx, [0x140419d94]
lea rcx, [rbp - 0x40]
call fcn.140006340
nop
xorps xmm0, xmm0
movups xmmword [rbp - 0x60], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x50], xmm1
mov r8d, 9
lea rdx, str.MSGBOX_OK
lea rcx, [rbp - 0x60]
call fcn.140006340
nop
xorps xmm0, xmm0
movups xmmword [rbp - 0x80], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x70], xmm1
xor r8d, r8d
lea rdx, [0x140419d94]
lea rcx, [rbp - 0x80]
call fcn.140006340
nop
xorps xmm0, xmm0
movups xmmword [rsp + 0x60], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x70], xmm1
mov r8d, Ordinal_23
lea rdx, str.AUTO_EXTN_RUN_FAILED
lea rcx, [rsp + 0x60]
call fcn.140006340
nop
mov dword [rsp + 0x50], reloc.SinoSPE.dll_Ordinal_48
mov byte [rsp + 0x48], 1
lea rax, [rbp - 0x40]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x60]
mov qword [rsp + 0x30], rax
mov byte [rsp + 0x28], 1
lea rax, [rbp - 0x80]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8b, 1
lea rdx, [rsp + 0x60]
mov rcx, rdi
call fcn.140120d20
nop
mov rdx, qword [rsp + 0x78]
cmp rdx, 7
jbe 0x14017f837
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14017f831
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14017f831
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1403ca488
nop
mov rdx, qword [rbp - 0x68]
cmp rdx, 7
jbe 0x14017f87b
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x80]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14017f875
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14017f875
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1403ca488
nop
mov rdx, qword [rbp - 0x48]
cmp rdx, 7
jbe 0x14017f8bf
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14017f8b9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14017f8b9
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1403ca488
nop
mov rdx, qword [rbp - 0x28]
cmp rdx, 7
jbe 0x14017ff14
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14017ff0f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14017ff0f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [0x1404af5e0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x1404af5e0], 0xffffffffffffffff
xorps xmm0, xmm0
movups xmmword [rsp + 0x60], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x70], xmm1
xor r8d, r8d
lea rdx, [0x140419d94]
lea rcx, [rsp + 0x60]
call fcn.140006340
nop
xorps xmm0, xmm0
movups xmmword [rbp - 0x80], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x70], xmm1
mov r8d, 9
lea rdx, str.MSGBOX_OK
lea rcx, [rbp - 0x80]
call fcn.140006340
nop
xorps xmm0, xmm0
movups xmmword [rbp - 0x60], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x50], xmm1
xor r8d, r8d
lea rdx, [0x140419d94]
lea rcx, [rbp - 0x60]
call fcn.140006340
nop
xorps xmm0, xmm0
movups xmmword [rbp - 0x40], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x30], xmm1
mov r8d, reloc.OLEAUT32.dll_SafeArrayCopy
lea rdx, str.AUTO_EXTN_SET_PARAM_FAILED
lea rcx, [rbp - 0x40]
call fcn.140006340
nop
mov dword [rsp + 0x50], reloc.SinoSPE.dll_Ordinal_48
mov byte [rsp + 0x48], 1
lea rax, [rsp + 0x60]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x80]
mov qword [rsp + 0x30], rax
mov byte [rsp + 0x28], 1
lea rax, [rbp - 0x60]
mov qword [rsp + 0x20], rax
mov r9d, ebx
mov r8b, 1
lea rdx, [rbp - 0x40]
mov rcx, rdi
call fcn.140120d20
nop
mov rdx, qword [rbp - 0x28]
cmp rdx, 7
jbe 0x14017fa43
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14017fa3d
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14017fa3d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1403ca488
nop
mov rdx, qword [rbp - 0x48]
cmp rdx, 7
jbe 0x14017fa87
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14017fa81
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14017fa81
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1403ca488
nop
mov rdx, qword [rbp - 0x68]
cmp rdx, 7
jbe 0x14017facb
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x80]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14017fac5
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14017fac5
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1403ca488
nop
mov rdx, qword [rsp + 0x78]
cmp rdx, 7
jbe 0x14017ff14
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14017ff0f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14017ff0f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [0x1404af5e0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x1404af5e0], 0xffffffffffffffff
xorps xmm0, xmm0
movups xmmword [rsp + 0x60], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x70], xmm1
xor r8d, r8d
lea rdx, [0x140419d94]
lea rcx, [rsp + 0x60]
call fcn.140006340
nop
xorps xmm0, xmm0
movups xmmword [rbp - 0x80], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x70], xmm1
mov r8d, 9
lea rdx, str.MSGBOX_OK
lea rcx, [rbp - 0x80]
call fcn.140006340
nop
xorps xmm0, xmm0
movups xmmword [rbp - 0x60], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x50], xmm1
xor r8d, r8d
lea rdx, [0x140419d94]
lea rcx, [rbp - 0x60]
call fcn.140006340
nop
xorps xmm0, xmm0
movups xmmword [rbp - 0x40], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x30], xmm1
mov r8d, reloc.OLEAUT32.dll_SafeArrayCopy
lea rdx, str.AUTO_EXTN_PORT_OPEN_FAILED
lea rcx, [rbp - 0x40]
call fcn.140006340
nop
mov dword [rsp + 0x50], reloc.SinoSPE.dll_Ordinal_48
mov byte [rsp + 0x48], 1
lea rax, [rsp + 0x60]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x80]
mov qword [rsp + 0x30], rax
mov byte [rsp + 0x28], 1
lea rax, [rbp - 0x60]
mov qword [rsp + 0x20], rax
mov r9d, ebx
mov r8b, 1
lea rdx, [rbp - 0x40]
mov rcx, rdi
call fcn.140120d20
nop
mov rdx, qword [rbp - 0x28]
cmp rdx, 7
jbe 0x14017fc51
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14017fc4b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14017fc4b
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1403ca488
nop
mov rdx, qword [rbp - 0x48]
cmp rdx, 7
jbe 0x14017fc95
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14017fc8f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14017fc8f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1403ca488
nop
mov rdx, qword [rbp - 0x68]
cmp rdx, 7
jbe 0x14017fcd9
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x80]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14017fcd3
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14017fcd3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1403ca488
nop
mov rdx, qword [rsp + 0x78]
cmp rdx, 7
jbe 0x14017ff14
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14017ff0f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14017ff0f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
xorps xmm0, xmm0
movups xmmword [rsp + 0x60], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x70], xmm1
xor r8d, r8d
lea rdx, [0x140419d94]
lea rcx, [rsp + 0x60]
call fcn.140006340
nop
xorps xmm0, xmm0
movups xmmword [rbp - 0x80], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x70], xmm1
mov r8d, 9
lea rdx, str.MSGBOX_OK
lea rcx, [rbp - 0x80]
call fcn.140006340
nop
xorps xmm0, xmm0
movups xmmword [rbp - 0x60], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x50], xmm1
xor r8d, r8d
lea rdx, [0x140419d94]
lea rcx, [rbp - 0x60]
call fcn.140006340
nop
xorps xmm0, xmm0
movups xmmword [rbp - 0x40], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x30], xmm1
mov r8d, reloc.OLEAUT32.dll_SafeArrayCopy
lea rdx, str.AUTO_EXTN_PORT_OPEN_FAILED
lea rcx, [rbp - 0x40]
call fcn.140006340
nop
mov dword [rsp + 0x50], reloc.SinoSPE.dll_Ordinal_48
mov byte [rsp + 0x48], 1
lea rax, [rsp + 0x60]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x80]
mov qword [rsp + 0x30], rax
mov byte [rsp + 0x28], 1
lea rax, [rbp - 0x60]
mov qword [rsp + 0x20], rax
mov r9d, ebx
mov r8b, 1
lea rdx, [rbp - 0x40]
mov rcx, rdi
call fcn.140120d20
nop
mov rdx, qword [rbp - 0x28]
cmp rdx, 7
jbe 0x14017fe47
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14017fe41
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14017fe41
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1403ca488
nop
mov rdx, qword [rbp - 0x48]
cmp rdx, 7
jbe 0x14017fe8b
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14017fe85
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14017fe85
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1403ca488
nop
mov rdx, qword [rbp - 0x68]
cmp rdx, 7
jbe 0x14017fecf
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x80]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14017fec9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14017fec9
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1403ca488
nop
mov rdx, qword [rsp + 0x78]
cmp rdx, 7
jbe 0x14017ff14
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14017ff0f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14017ff0f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1403ca488
mov rcx, qword [rbp + 0x68]
xor rcx, rsp
call fcn.1403ca460
lea r11, [rsp + 0x170]
mov rbx, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret