Function at 0x1800108e0
Capabilities:
Write file on windows

Disassembly:
mov r11, rsp
sub rsp, 0x2d8
mov rax, qword [0x180045010]
xor rax, rsp
mov qword [rsp + 0x2a0], rax
mov r8, qword [0x180047050]
cmp dword [r8 + 0x12ca2f8], 1
je 0x180010f3a
cmp dword [r8 + 0x4174778], 1
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rbp
mov qword [r11 + 0x18], rsi
mov qword [r11 - 8], rdi
mov qword [r11 - 0x10], r12
mov qword [r11 - 0x18], r13
mov qword [r11 - 0x20], r14
mov qword [r11 - 0x28], r15
jne 0x180010a6a
mov ecx, 0xe00038
call fcn.180015380
xor edx, edx
mov qword [rsp + 0x38], rax
mov r8d, 0xe00038
mov rcx, rax
mov rbx, rax
call fcn.1800169c0
mov r8, qword [0x180047050]
lea r13, vtable.CLocalRs232.0
xor edi, edi
mov qword [rbx], r13
mov qword [rbx + 0xe00028], rdi
lea rdx, str.._s
mov qword [rbx + 0xe00030], rdi
lea rcx, [rsp + 0xa0]
mov qword [rbx + 0xc], rdi
mov dword [rbx + 8], 1
mov qword [rbx + 0xe0001c], rdi
mov dword [rbx + 0x14], edi
mov dword [rbx + 0xe00018], edi
mov qword [r8 + 0x4174770], rbx
add r8, 0x4174758
call fcn.180001120
mov rcx, qword [0x180047050]
lea rdx, [rsp + 0xa0]
mov r8d, dword [rcx + 0x4174768]
mov rcx, qword [rcx + 0x4174770]
call fcn.180014d50
mov rcx, qword [0x180047050]
cmp eax, 1
jne 0x1800109fc
mov dword [rcx + 0x12ca2f8], eax
lea rdx, str._s_opened
jmp 0x180010a29
mov r8, qword [rcx + 0x4174770]
test r8, r8
je 0x180010a1c
mov rax, qword [r8]
mov edx, 1
mov rcx, r8
call qword [rax]
mov rcx, qword [0x180047050]
mov dword [rcx + 0x12ca2f8], edi
lea rdx, str.Can_not_open__s
or dword [rcx + 0xbb0b44], 0x20
lea r8, [rcx + 0x4174758]
add rcx, 0xbb0a44
call fcn.180001120
mov r11, qword [0x180047050]
or dword [r11 + 0xbb0b44], 0x10
cmp dword [r11 + 0x12ca2f8], 1
jne 0x180010ec3
mov r15d, dword [rsp + 0x38]
jmp 0x180010dab
add r8, 0x4174758
lea rdx, str.._s
lea rcx, [rsp + 0x1a0]
call fcn.180001120
mov r9d, 0xa
lea rdx, str.V_0_0_0_c_c
lea rcx, [rsp + 0x60]
lea r8d, [r9 + 3]
call fcn.180001120
lea rax, [rsp + 0x60]
mov rbp, 0xffffffffffffffff
nop dword [rax]
inc rbp
cmp byte [rax + rbp], 0
jne 0x180010ab0
lea r12, [0x18003ed48]
xor edi, edi
lea r13, vtable.CLocalRs232.0
nop dword [rax]
mov ecx, 0xe00038
call fcn.180015380
xor edx, edx
mov qword [rsp + 0x30], rax
mov r8d, 0xe00038
mov rcx, rax
mov rbx, rax
call fcn.1800169c0
mov rax, qword [0x180047050]
lea rdx, [rsp + 0x1a0]
mov r15d, dword [r12]
mov rcx, rbx
mov qword [rbx], r13
mov r8d, r15d
mov qword [rbx + 0xe00028], rdi
mov qword [rbx + 0xe00030], rdi
mov qword [rbx + 0xc], rdi
mov dword [rbx + 8], 1
mov qword [rbx + 0xe0001c], rdi
mov dword [rbx + 0x14], edi
mov dword [rbx + 0xe00018], edi
mov qword [rax + 0x4174770], rbx
call fcn.180014d50
cmp eax, 1
jne 0x180010e9f
mov rcx, qword [0x180047050]
lea rdx, str.comm_speed_check__d_bps
mov r8d, r15d
mov dword [rcx + 0x12ca2f8], eax
add rcx, 0xbb0a44
call fcn.180001120
mov r11, qword [0x180047050]
or dword [r11 + 0xbb0b44], 0x10
cmp dword [r11 + 0x12ca2f8], 1
jne 0x180010cf7
mov rbx, qword [r11 + 0x4174770]
cmp dword [rbx + 8], 1
je 0x180010bc5
mov rcx, qword [rbx + 0xe00028]
lea r9, [rsp + 0x38]
mov r8d, ebp
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov r11, qword [0x180047050]
mov dword [rbx + 0xe00020], edi
cmp dword [r11 + 0x12ca2f8], 1
jne 0x180010cf7
mov rbx, qword [r11 + 0x4174770]
lea r14, [r11 + 0xbb12e0]
cmp dword [rbx + 8], 1
jne 0x180010bef
mov byte [r14], dil
jmp 0x180010cf7
call qword [sym.imp.WINMM.dll_timeGetTime]
mov esi, eax
call qword [sym.imp.WINMM.dll_timeGetTime]
movsxd rdx, dword [rbx + 0xe0001c]
cmp dword [rbx + 0xe00018], edx
jne 0x180010c26
sub eax, esi
cmp eax, 0x1f4
ja 0x180010cf0
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x180010bf7
sub eax, dword [rbx + 0xe00024]
cmp eax, 0x14
jae 0x180010c3e
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x180010bf7
mov esi, edi
mov r8, rdx
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [r8 + rbx + 0x700018]
lea ecx, [rdx + 1]
mov byte [r14], al
lea r14, [r14 + 1]
inc esi
lea rax, [r8 + 1]
cmp ecx, 0x700000
mov edx, edi
mov r8, rdi
cmovb edx, ecx
cmovb r8, rax
cmp edx, dword [rbx + 0xe00018]
jne 0x180010c50
test esi, esi
jle 0x180010cf0
mov r9, qword [0x180047050]
mov edx, edi
mov rcx, qword [r9 + 0x4174770]
mov r8d, dword [rcx + 0xe00018]
nop
mov eax, dword [rcx + 0xe0001c]
cmp r8d, eax
je 0x180010cc6
inc eax
mov dword [rcx + 0xe0001c], eax
cmp eax, 0x700000
jb 0x180010cc0
mov dword [rcx + 0xe0001c], edi
inc edx
cmp edx, esi
jl 0x180010ca0
lea rcx, [r9 + 0xbb12e0]
mov r8d, 4
lea rdx, str.B290
call fcn.18001d2a0
test eax, eax
je 0x180010d8e
mov r11, qword [0x180047050]
jmp 0x180010cfe
mov r11, qword [0x180047050]
mov dword [r11 + 0x12ca2f8], edi
mov rbx, qword [r11 + 0x4174770]
mov rax, qword [rbx + 0xe00028]
test rax, rax
je 0x180010d58
cmp rax, 0xffffffffffffffff
je 0x180010d58
mov dword [rbx + 0x10], 1
mov edx, 0xffffffff
mov rcx, qword [rbx + 0xe00030]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rbx + 0xe00030]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx + 0xe00028]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r11, qword [0x180047050]
mov qword [rbx + 0xe00028], rdi
mov rcx, qword [r11 + 0x4174770]
test rcx, rcx
je 0x180010d75
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov r11, qword [0x180047050]
add r12, 4
lea rax, [0x18003ed68]
cmp r12, rax
jl 0x180010ad0
jmp 0x180010ec3
mov rdx, qword [0x180047050]
mov r8d, esi
add rdx, 0xbb12e0
call fcn.18000e160
mov r11, qword [0x180047050]
mov dword [r11 + 0x12ca2f8], 1
mov dword [r11 + 0x4174768], r15d
or dword [r11 + 0xbb0b44], 0x20
cmp dword [r11 + 0x12ca36c], 1
jne 0x180010e47
mov ebx, dword [r11 + 0x4174698]
call fcn.18000d210
call fcn.18000d4d0
call fcn.18000dab0
mov r11, qword [0x180047050]
or dword [r11 + 0xbb0b44], 0x200
call fcn.18000e210
cmp ebx, dword [r11 + 0x4174698]
je 0x180010e23
movabs rax, 0x4053033333333333
mov dword [r11 + 0x14], 0x384
mov qword [r11 + 0x12ca330], rax
mov edi, 1
cmp dword [r11 + 0x12ca3cc], 0
jne 0x180010e3a
mov dword [r11 + 0x12ca664], 1
jmp 0x180010e3f
cmp edi, 1
jne 0x180010e47
or dword [r11 + 0xbb0b44], 8
cmp dword [r11 + 0x12ca3cc], 1
lea rcx, [rsp + 0x40]
jne 0x180010e64
lea rdx, str.USB_CDC_12M
call fcn.180001120
jmp 0x180010e77
mov r8d, dword [r11 + 0x4174768]
lea rdx, str.RS485_UART__d
call fcn.180001120
mov rcx, qword [0x180047050]
lea r9, [rsp + 0x40]
lea rdx, str._s_opened___sbps
lea r8, [rcx + 0x4174758]
add rcx, 0xbb0a44
call fcn.180001120
jmp 0x180010eec
mov r11, qword [0x180047050]
mov rcx, qword [r11 + 0x4174770]
test rcx, rcx
je 0x180010ec3
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov r11, qword [0x180047050]
mov dword [r11 + 0x12ca2f8], edi
lea r8, [r11 + 0x4174758]
or dword [r11 + 0xbb0b44], 0x20
lea rcx, [r11 + 0xbb0a44]
lea rdx, str.Can_not_open__s
call fcn.180001120
mov rax, qword [0x180047050]
mov r14, qword [rsp + 0x2b8]
mov r13, qword [rsp + 0x2c0]
mov r12, qword [rsp + 0x2c8]
or dword [rax + 0xbb0b44], 0x10
mov rdi, qword [rsp + 0x2d0]
mov rsi, qword [rsp + 0x2f0]
mov rbp, qword [rsp + 0x2e8]
mov rbx, qword [rsp + 0x2e0]
mov r15, qword [rsp + 0x2b0]
mov rcx, qword [rsp + 0x2a0]
xor rcx, rsp
call fcn.180014fd0
add rsp, 0x2d8
ret