Function at 0x54db80
Capabilities:
Create thread
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x57dad0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x60
xor eax, eax
push ebx
mov dword [esp + 0x10], eax
push ebp
mov dword [esp + 0x18], eax
mov ebp, ecx
push esi
mov dword [esp + 0x20], eax
push edi
mov dword [ebp + 0x130], 0xffffffff
mov dword [esp + 0x28], eax
mov edi, 1
lea ebx, [esp + 0x1c]
lea ecx, [esp + 0x14]
mov dword [ebp + 0x130], edi
call sub.MFC42.DLL_CString::CString_3
push edi
lea ecx, [esp + 0x18]
push str.COM_d
push ecx
mov dword [esp + 0x84], 0
call sub.MFC42.DLL_CString::Format
add esp, 8
lea edx, [esp + 0x18]
mov ecx, esp
mov dword [esp + 0x1c], esp
push edx
call sub.MFC42.DLL_CString::CString_2
call fcn.0054c300
mov eax, dword [esp + 0x18]
add esp, 4
push 0
push 0x40000080
push 3
push 0
push 0
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebx], esi
jne 0x54dcd0
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_3
mov byte [esp + 0x78], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
add eax, 0xc
cmp eax, 0xb
ja case.0x54dc4e.9
jmp dword [eax*4 + 0x54e024]
push 0x5bf454
jmp 0x54dc92
push 0x5bf444
jmp 0x54dc92
push 0x5bf430
jmp 0x54dc92
push 0x5bf420
jmp 0x54dc92
push 0x5bf414
jmp 0x54dc92
push 0x5bf3fc
jmp 0x54dc92
push 0x5bf3ec
jmp 0x54dc92
push 0x5bf3d4
jmp 0x54dc92
push 0x5bf3c4
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::operator_1
push ecx
lea edx, [esp + 0x14]
mov ecx, esp
mov dword [esp + 0x1c], esp
push edx
call sub.MFC42.DLL_CString::CString_2
mov ecx, ebp
call fcn.0054c620
push 0x3e8
call fcn.0054c200
add esp, 4
lea ecx, [esp + 0x10]
mov byte [esp + 0x78], 0
call sub.MFC42.DLL_CString::CString
jmp 0x54dd44
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push 0x5bf3b8
call fcn.0055734e
mov ecx, ebp
call fcn.0054c620
push 0x3e8
call fcn.0054c200
add esp, 4
push 0x5c05b0
push esi
call dword [sym.imp.KERNEL32.dll_GetCommModemStatus]
mov al, byte [0x5c05b0]
test al, 0x20
je 0x54dd12
test al, 0x10
jne 0x54dd9e
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push 0x5bf3a0
call fcn.0055734e
mov ecx, ebp
call fcn.0054c620
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x3e8
mov dword [ebx], 0
call fcn.0054c200
add esp, 4
lea ecx, [esp + 0x14]
mov dword [esp + 0x78], 0xffffffff
call sub.MFC42.DLL_CString::CString
inc edi
add ebx, 4
cmp edi, 4
jle 0x54dbc3
push ecx
mov ecx, esp
mov dword [esp + 0x84], esp
push 0x5bf3a0
call fcn.0055734e
mov ecx, ebp
call fcn.0054c620
lea esi, [esp + 0x1c]
mov edi, 4
mov eax, dword [esi]
test eax, eax
je 0x54dd93
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add esi, 4
dec edi
jne 0x54dd86
jmp 0x54dffd
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push 0x5bf38c
call fcn.0055734e
mov ecx, ebp
call fcn.0054c620
push 0x3e8
call fcn.0054c200
add esp, 4
lea ecx, [esp + 0x14]
mov dword [ebp + 0x130], edi
mov dword [ebp + 0xa0], 1
mov dword [esp + 0x78], 0xffffffff
call sub.MFC42.DLL_CString::CString
push 2
push esi
mov dword [0x5c0628], esi
call dword [sym.imp.KERNEL32.dll_SetCommMask]
mov esi, eax
mov eax, dword [0x5c0628]
push 0x1000
push 0x1000
push eax
call dword [sym.imp.KERNEL32.dll_SetupComm]
mov edx, dword [0x5c0628]
lea ecx, [esp + 0x2c]
push ecx
push edx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetCommState]
mov ecx, dword [0x5c0628]
lea eax, [esp + 0x2c]
push eax
push ecx
mov dword [esp + 0x38], 0x4b00
mov byte [esp + 0x46], 8
mov byte [esp + 0x47], 0
mov byte [esp + 0x48], 0
call dword [sym.imp.KERNEL32.dll_SetCommState]
test esi, esi
je 0x54dfe2
test edi, edi
je 0x54dfe2
test eax, eax
je 0x54dfe2
mov eax, dword [esp + 0x80]
lea edx, [esp + 0x48]
test eax, eax
mov edi, str.ATE0V1Q0W0_r
jne 0x54de79
mov edi, str.ATE0V1Q0S01_r
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0
mov eax, ecx
mov esi, edi
mov edi, edx
mov edx, dword [0x5c0628]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push 0x5c05ec
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x50]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [esp + 0x54]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x54ded6
push ecx
mov ecx, esp
mov dword [esp + 0x84], esp
push 0x5bf360
jmp 0x54dff1
mov eax, dword [0x5c0628]
mov esi, dword [sym.imp.KERNEL32.dll_PurgeComm]
push 4
push eax
call esi
mov ecx, dword [0x5c0628]
push 8
push ecx
call esi
mov edx, dword [ebp + 0x20]
push 0
push 0x1f4
push 0x14
push edx
call dword [sym.imp.USER32.dll_SetTimer]
test eax, eax
mov dword [0x5c060c], eax
jne 0x54df21
push ecx
mov ecx, esp
mov dword [esp + 0x84], esp
push 0x5bf350
jmp 0x54dff1
xor eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [0x5c0630], eax
mov dword [0x5c0634], eax
mov dword [0x5c0638], eax
mov dword [0x5c063c], eax
push eax
push 1
push 1
push eax
mov dword [0x5c0640], eax
call esi
push 0
push 0
push 1
push 0
mov dword [0x5c0650], eax
call esi
mov dword [0x5c0640], eax
mov ecx, dword [ebp + 0x20]
mov dword [0x5c0648], ecx
mov eax, dword [ebp + 0xd8]
test eax, eax
jne 0x54dfdb
lea edx, [ebp + 0xd4]
push edx
push 0
push 0
push 0x54c230
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
mov dword [ebp + 0xd8], eax
jne 0x54dfdb
mov eax, dword [0x5c0628]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov ecx, dword [0x5c0650]
push ecx
call esi
mov edx, dword [0x5c0640]
push edx
call esi
mov eax, dword [0x5c060c]
test eax, eax
je 0x54dfca
mov eax, dword [ebp + 0x20]
push 0x14
push eax
call dword [sym.imp.USER32.dll_KillTimer]
push ecx
mov ecx, esp
mov dword [esp + 0x84], esp
push 0x5bf340
jmp 0x54dff1
mov eax, 1
jmp 0x54e00c
push ecx
mov ecx, esp
mov dword [esp + 0x84], esp
push 0x5bf3c4
call fcn.0055734e
mov ecx, ebp
call fcn.0054c620
push 0x3e8
call fcn.0054c200
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x70]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x6c
ret 4