Function at 0x403a60
Capabilities:
Print debug messages

Disassembly:
sub esp, 0x88
mov al, byte [0x41be34]
push edi
mov byte [esp + 0xc], al
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0xd]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x100
push 0x40
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
test eax, eax
jne 0x403aad
push eax
push 0x41be34
push str.LocalAlloc
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
pop edi
add esp, 0x88
ret
mov eax, dword [esp + 0x98]
test eax, eax
je 0x403b15
mov edx, dword [esp + 0x90]
mov eax, dword [0x41be1c]
lea ecx, [esp + 8]
push 0
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x403b15
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 6
jne 0x403af7
push str.ERROR_INVALID_HANDLE__Likely_that_the_Service_Provider_has_closed_the_port._n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
pop edi
add esp, 0x88
ret
push 0
push 0x41be34
push str.Unexpected_GetOverlappedResult_for_WaitCommEvent
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
pop edi
add esp, 0x88
ret
mov ecx, dword [esp + 0x94]
test byte [ecx], 0x80
je 0x403d7f
mov eax, dword [0x41be1c]
lea edx, [esp + 4]
push 0
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ClearCommError]
test eax, eax
jne 0x403b7a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 6
jne 0x403b5c
push str.ERROR_INVALID_HANDLE__Likely_that_the_Service_Provider_has_closed_the_port._n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
pop edi
add esp, 0x88
ret
push 0
push 0x41be34
push str.ClearCommError
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
pop edi
add esp, 0x88
ret
mov edx, dword [esp + 4]
push ebx
push ebp
push esi
test edx, edx
jne 0x403bb3
mov edi, str.NULL_Error
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
test dl, 8
je 0x403c1c
mov al, byte [esp + 0x18]
test al, al
je 0x403bee
mov edi, str._and
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.CE_FRAME
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
test dl, 2
je 0x403c85
mov al, byte [esp + 0x18]
test al, al
je 0x403c57
mov edi, str._and
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.CE_OVERRUN
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
test dl, 4
je 0x403cee
mov al, byte [esp + 0x18]
test al, al
je 0x403cc0
mov edi, str._and
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.CE_RXPARITY
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
test edx, 0xfffffff1
je 0x403d5a
mov al, byte [esp + 0x18]
test al, al
je 0x403d2c
mov edi, str._and
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.EV_ERR_Unknown_EvtMask
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x41be18]
push 0
push 2
push 0x400
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
pop esi
pop ebp
pop ebx
mov eax, 1
pop edi
add esp, 0x88
ret
push str.Unexpected_comm_event
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
pop edi
add esp, 0x88
ret