Function at 0x552bc0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x414
mov eax, dword [0x5b00cc]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
mov dword [ebp - 0x40c], ebx
jne 0x552c39
push ebx
push 0x584224
push 0x2f2
push str.........CommonWin32win32serial.cpp
lea eax, [ebx + 4]
call fcn.004f1f50
push eax
push 4
push str.Runtime_Error__d:__s_nPress_OK_to_Continue_nPress_Cancel_to_Quit._n_nPlease_report_what_caused_this_error_nalong_with_the_information_below._n_n_s:__d_nFailure_Condition:__s_n_s
lea eax, [ebp - 0x404]
push 0x400
push eax
call fcn.00567446
add esp, 0x24
push 0x111
push str.Runtime_Error
lea ecx, [ebp - 0x404]
push ecx
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 2
jne 0x552c39
push ebx
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
cmp byte [ebx + 0x29], 0
je 0x552f24
cmp dword [ebx + 0x44], 0
push esi
jne 0x552c66
xor esi, esi
push 0x2f6
push str.........CommonWin32win32serial.cpp
mov edx, str.ctl__hCom
lea ecx, [esi + 4]
call fcn.004f1fc0
add esp, 8
cmp dword [ebx + 0x48], 0
jne 0x552c88
xor esi, esi
push 0x2f7
push str.........CommonWin32win32serial.cpp
mov edx, str.ctl__mOverlappedWriter
lea ecx, [esi + 4]
call fcn.004f1fc0
add esp, 8
mov eax, dword [ebx + 0x54]
test eax, eax
push edi
lea edi, [ebx + 0x54]
je 0x552f22
cmp dword [eax + 0xc], 0
jle 0x552f22
jmp 0x552ca9
mov ebx, dword [ebp - 0x40c]
mov eax, dword [ebx + 0x48]
mov ecx, dword [ebx + 0x44]
push 1
lea edx, [ebp - 0x408]
push edx
push eax
push ecx
mov dword [ebp - 0x408], 0
call dword [sym.imp.KERNEL32.DLL_GetOverlappedResult]
test eax, eax
je 0x552edd
mov edx, dword [ebx + 0x48]
mov byte [ebx + 0x34], 0
mov eax, dword [edx + 0x10]
push eax
call dword [sym.imp.KERNEL32.DLL_ResetEvent]
mov eax, dword [ebp - 0x408]
push edi
lea ebx, [ebp - 0x410]
call fcn.004ac370
add esp, 4
cmp byte [0x5f49d5], 0
mov ebx, eax
jne 0x552d15
push 0x5f3a18
call dword [sym.imp.KERNEL32.DLL_InitializeCriticalSection]
mov byte [0x5f49d5], 1
push 0x5f3a18
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
cmp edi, ebx
je 0x552d78
mov esi, dword [edi]
test esi, esi
je 0x552d6d
cmp byte [0x5f49d5], 0
jne 0x552d45
push 0x5f3a18
call dword [sym.imp.KERNEL32.DLL_InitializeCriticalSection]
mov byte [0x5f49d5], 1
push 0x5f3a18
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
test esi, esi
je 0x552d62
add dword [esi], 0xffffffff
jne 0x552d62
push esi
call fcn.0056646e
add esp, 4
push 0x5f3a18
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, dword [ebx]
test eax, eax
mov dword [edi], eax
je 0x552d78
add dword [eax], 1
push 0x5f3a18
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov esi, dword [ebp - 0x410]
test esi, esi
je 0x552dd0
cmp byte [0x5f49d5], 0
jne 0x552da8
push 0x5f3a18
call dword [sym.imp.KERNEL32.DLL_InitializeCriticalSection]
mov byte [0x5f49d5], 1
push 0x5f3a18
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
test esi, esi
je 0x552dc5
add dword [esi], 0xffffffff
jne 0x552dc5
push esi
call fcn.0056646e
add esp, 4
push 0x5f3a18
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, dword [edi]
test eax, eax
je 0x552ebc
cmp dword [eax + 0xc], 0
je 0x552ebc
test eax, eax
je 0x552ded
mov ecx, dword [eax + 0xc]
jmp 0x552def
xor ecx, ecx
test eax, eax
je 0x552dfb
mov eax, dword [eax + 4]
add eax, 1
jmp 0x552e00
mov eax, 0x57e81c
mov esi, dword [ebp - 0x40c]
push ecx
push eax
call fcn.00552220
mov eax, dword [ebp - 0x408]
push edi
lea ebx, [ebp - 0x414]
call fcn.004ac370
add esp, 4
cmp byte [0x5f49d5], 0
mov ebx, eax
jne 0x552e3f
push 0x5f3a18
call dword [sym.imp.KERNEL32.DLL_InitializeCriticalSection]
mov byte [0x5f49d5], 1
push 0x5f3a18
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
cmp edi, ebx
je 0x552e64
mov esi, dword [edi]
test esi, esi
je 0x552e59
call fcn.004ab850
mov eax, dword [ebx]
test eax, eax
mov dword [edi], eax
je 0x552e64
add dword [eax], 1
push 0x5f3a18
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov esi, dword [ebp - 0x414]
test esi, esi
je 0x552ebc
cmp byte [0x5f49d5], 0
jne 0x552e94
push 0x5f3a18
call dword [sym.imp.KERNEL32.DLL_InitializeCriticalSection]
mov byte [0x5f49d5], 1
push 0x5f3a18
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
test esi, esi
je 0x552eb1
add dword [esi], 0xffffffff
jne 0x552eb1
push esi
call fcn.0056646e
add esp, 4
push 0x5f3a18
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, dword [edi]
test eax, eax
je 0x552f22
cmp dword [eax + 0xc], 0
jg 0x552ca3
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00566120
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 6
je 0x552ef4
cmp eax, 0x57
jne 0x552ef9
mov eax, 0x66
jmp 0x552ef9
mov eax, 0x64
mov dword [ebx + 0x30], eax
mov eax, dword [ebx + 8]
test eax, eax
je 0x552f22
mov ecx, dword [ebx + 4]
cmp dword [ecx + 0x28], 0
jle 0x552f22
mov edx, dword [0x5b47d8]
mov ecx, dword [edx + 0x20]
mov eax, dword [eax + ecx*8]
test eax, eax
je 0x552f22
push ebx
call eax
add esp, 4
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00566120
mov esp, ebp
pop ebp
ret