Function at 0x504465
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58d3a9
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x90
push ebx
push esi
push edi
push ecx
lea edi, [ebp - 0x9c]
mov ecx, 0x24
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
pop ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x34], 0
mov ecx, dword [ebp - 0x10]
mov dx, word [ebp + 0x10]
mov word [ecx + 0x154], dx
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x54], 0
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x58], 0
mov esi, esp
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
cmp esi, esp
call sub.MSVCRTD.dll__chkesp
mov edx, dword [ebp - 0x10]
mov dword [edx + 0x5c], eax
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x5c], 0
jne 0x50437f
mov dword [ebp - 0x48], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call sub.MFC42D.DLL_Ordinal_684
mov eax, dword [ebp - 0x48]
jmp 0x5045cd
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0xcc], 0
mov edx, dword [ebp - 0x10]
mov dword [edx + 0xd0], 0
mov esi, esp
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
cmp esi, esp
call sub.MSVCRTD.dll__chkesp
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0xd4], eax
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0xd4], 0
jne 0x5043e3
mov dword [ebp - 0x4c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call sub.MFC42D.DLL_Ordinal_684
mov eax, dword [ebp - 0x4c]
jmp 0x5045cd
lea eax, [ebp + 8]
push eax
mov ecx, dword [ebp - 0x10]
add ecx, 0x1c
call sub.MFC42D.DLL_Ordinal_734
mov esi, esp
push 0
push 0x40000080
push 3
push 0
push 0
push 0xc0000000
lea ecx, [ebp + 8]
call sub.MFC42D.DLL_Ordinal_880
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp esi, esp
call sub.MSVCRTD.dll__chkesp
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 0x10]
cmp dword [edx + 4], 0xffffffff
jne 0x504449
mov dword [ebp - 0x50], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call sub.MFC42D.DLL_Ordinal_684
mov eax, dword [ebp - 0x50]
jmp 0x5045cd
mov esi, esp
push 1
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCommMask]
cmp esi, esp
call sub.MSVCRTD.dll__chkesp
mov esi, esp
push 0x1000
push 0x1000
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_SetupComm]
cmp esi, esp
call sub.MSVCRTD.dll__chkesp
mov dword [ebp - 0x24], 0xa
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov eax, 0x38400
xor edx, edx
div dword [ebp + 0xc]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 0
mov esi, esp
lea ecx, [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_SetCommTimeouts]
cmp esi, esp
call sub.MSVCRTD.dll__chkesp
mov dword [ebp - 0x40], 0x1c
mov esi, esp
lea ecx, [ebp - 0x40]
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetCommState]
cmp esi, esp
call sub.MSVCRTD.dll__chkesp
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x3c], ecx
mov byte [ebp - 0x2e], 8
mov byte [ebp - 0x2d], 0
mov byte [ebp - 0x2c], 0
mov edx, dword [ebp - 0x38]
and dh, 0xfe
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 0x38]
and ah, 0xfd
mov dword [ebp - 0x38], eax
mov byte [ebp - 0x2b], 0x11
mov byte [ebp - 0x2a], 0x13
mov word [ebp - 0x32], 0x64
mov esi, esp
lea ecx, [ebp - 0x40]
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_SetCommState]
cmp esi, esp
call sub.MSVCRTD.dll__chkesp
test eax, eax
jne 0x504550
mov dword [ebp - 0x54], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call sub.MFC42D.DLL_Ordinal_684
mov eax, dword [ebp - 0x54]
jmp 0x5045cd
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x34], 1
mov esi, esp
lea edx, [ebp - 0x44]
push edx
push 0
mov eax, dword [ebp - 0x10]
push eax
push 0x4025db
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp esi, esp
call sub.MSVCRTD.dll__chkesp
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x13c], eax
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x13c], 0
jne 0x5045b4
mov ecx, dword [ebp - 0x10]
call fcn.004034d1
mov dword [ebp - 0x58], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call sub.MFC42D.DLL_Ordinal_684
mov eax, dword [ebp - 0x58]
jmp 0x5045cd
mov dword [ebp - 0x5c], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call sub.MFC42D.DLL_Ordinal_684
mov eax, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
add esp, 0x9c
cmp ebp, esp
call sub.MSVCRTD.dll__chkesp
mov esp, ebp
pop ebp
ret 0xc