Function at 0x483c70
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49b4d6
mov eax, dword fs:[0]
push eax
sub esp, 0xac
mov eax, dword [0x4d04c0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
cmp dword [esi + 0xc0], 0xf
lea edi, [esi + 0xac]
mov eax, edi
jbe 0x483cb2
mov eax, dword [edi]
push 0
push 0x40000000
push 3
push 0
push 0
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esi + 0xa8], eax
cmp eax, 0xffffffff
je 0x483ec6
lea ecx, [ebp - 0x40]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetCommState]
test eax, eax
je 0x483e9c
mov eax, dword [esi + 0xc4]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x38]
and eax, 0xffffdfdf
mov word [ebp - 0x2e], 8
or eax, 0x1013
mov byte [ebp - 0x2c], 0
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x40]
push eax
push dword [esi + 0xa8]
call dword [sym.imp.KERNEL32.dll_SetCommState]
test eax, eax
jne 0x483d51
lea eax, [ebp - 0x70]
mov ecx, esi
push eax
call fcn.00483ba0
push eax
lea eax, [ebp - 0x58]
mov dword [ebp - 4], 6
push str.Serial:_SetCommState_failed._Error:
push eax
call fcn.00415a40
add esp, 0xc
mov byte [ebp - 4], 7
jmp 0x483f18
lea eax, [ebp - 0x24]
push eax
push dword [esi + 0xa8]
call dword [sym.imp.KERNEL32.dll_GetCommTimeouts]
test eax, eax
je 0x483e72
lea eax, [ebp - 0x24]
mov dword [ebp - 0x24], 0x7d0
push eax
push dword [esi + 0xa8]
mov dword [ebp - 0x1c], 0x7d0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x14], 0x7d0
mov dword [ebp - 0x18], 0
call dword [sym.imp.KERNEL32.dll_SetCommTimeouts]
test eax, eax
jne 0x483dcd
lea eax, [ebp - 0x70]
mov ecx, esi
push eax
call fcn.00483ba0
push eax
lea eax, [ebp - 0x58]
mov dword [ebp - 4], 0xa
push str.Serial:_SetCommTimeouts_failed._Error:
push eax
call fcn.00415a40
add esp, 0xc
mov byte [ebp - 4], 0xb
jmp 0x483f18
push 0x10
mov byte [esi + 0x8c], 1
mov byte [esi + 0xd0], 0
call fcn.00489a19
add esp, 4
test eax, eax
je 0x483dfb
mov dword [eax], esi
mov dword [eax + 8], 0x483f50
mov dword [eax + 0xc], 0
jmp 0x483dfd
xor eax, eax
mov dword [ebp - 0xb0], eax
lea ecx, [ebp - 0xb4]
mov dword [ebp - 4], 0xc
push ecx
push 0
push eax
push 0x42b020
push 0
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov ecx, eax
add esp, 0x18
mov dword [ebp - 0xb8], ecx
test ecx, ecx
je 0x483f35
cmp dword [esi + 0xcc], 0
je 0x483e45
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_terminate]
mov eax, dword [ebp - 0xb4]
mov dword [esi + 0xc8], ecx
mov dword [esi + 0xcc], 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.00489ca8
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x70]
mov ecx, esi
push eax
call fcn.00483ba0
push eax
lea eax, [ebp - 0x58]
mov dword [ebp - 4], 8
push str.Serial:_GetCommTimeouts_failed._Error:
push eax
call fcn.00415a40
add esp, 0xc
mov byte [ebp - 4], 9
jmp 0x483f18
lea eax, [ebp - 0x70]
mov ecx, esi
push eax
call fcn.00483ba0
push eax
lea eax, [ebp - 0x58]
mov dword [ebp - 4], 4
push str.Serial:_GetCommState_failed._Error:
push eax
call fcn.00415a40
add esp, 0xc
mov byte [ebp - 4], 5
jmp 0x483f18
lea eax, [ebp - 0x88]
mov ecx, esi
push eax
call fcn.00483ba0
mov esi, eax
push edi
lea eax, [ebp - 0xa0]
mov dword [ebp - 4], 0
push str.Serial:_cannot_open_serial_port
push eax
call fcn.00415ab0
push str.._Error:
push eax
lea eax, [ebp - 0x58]
mov byte [ebp - 4], 1
push eax
call fcn.004159d0
push esi
push eax
lea eax, [ebp - 0x70]
mov byte [ebp - 4], 2
push eax
call fcn.0042ade0
add esp, 0x24
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0xac]
call fcn.004194f0
push 0x4abd04
lea eax, [ebp - 0xac]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
push 6
mov dword [ebp - 0xb4], 0
call sub.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_
int3