Function at 0x404179
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov dword [ebp - 0x58], ecx
mov eax, dword [ebp - 0x58]
mov ecx, dword [eax + 0x20]
mov dword [ebp - 4], ecx
push 0x14
push 0
mov edx, dword [ebp - 0x58]
add edx, 0x148
push edx
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x14
push 0
mov eax, dword [ebp - 0x58]
add eax, 0x15c
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x14
push 0
mov ecx, dword [ebp - 0x58]
add ecx, 0x180
push ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
mov edx, dword [ebp - 0x58]
mov dword [edx + 0x150], 0
mov eax, dword [ebp - 0x58]
mov dword [eax + 0x154], 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov ecx, dword [ebp - 0x58]
mov dword [ecx + 0x158], eax
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov edx, dword [ebp - 0x58]
mov dword [edx + 0x16c], eax
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov ecx, dword [ebp - 0x58]
mov dword [ecx + 0x190], eax
push 0x7f02
push 0
call dword [sym.imp.USER32.dll_LoadCursorA]
mov dword [ebp - 8], eax
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.USER32.dll_SetCursor]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp + 8]
xor ecx, ecx
mov cl, byte [eax + 5]
test ecx, ecx
jne 0x404292
push 0xa
lea edx, [ebp - 0x30]
push edx
push 0x68
mov ecx, dword [ebp - 0x58]
call fcn.00407416
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
mov eax, dword [ebp + 8]
xor ecx, ecx
mov cl, byte [eax]
push ecx
lea edx, [ebp - 0x30]
push edx
push 0x40a164
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov dword [ebp - 0x44], 0x40000080
jmp 0x4042db
mov ecx, dword [ebp + 8]
xor edx, edx
mov dl, byte [ecx + 5]
cmp edx, 1
jne 0x4042db
push 0xa
lea eax, [ebp - 0x30]
push eax
push 0x69
mov ecx, dword [ebp - 0x58]
call fcn.00407416
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
mov ecx, dword [ebp + 8]
xor edx, edx
mov dl, byte [ecx]
push edx
lea eax, [ebp - 0x30]
push eax
push 0x40a16c
lea ecx, [ebp - 0x54]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov dword [ebp - 0x44], 0x40000080
push 0
mov edx, dword [ebp - 0x44]
push edx
push 3
push 0
push 0
push 0xc0000000
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, dword [ebp - 0x58]
mov dword [ecx + 0x134], eax
mov edx, dword [ebp - 0x58]
cmp dword [edx + 0x134], 0xffffffff
jne 0x40431b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
xor eax, eax
jmp 0x404510
mov eax, dword [ebp + 8]
xor ecx, ecx
mov cl, byte [eax + 5]
test ecx, ecx
jne 0x404339
push 1
mov edx, dword [ebp - 0x58]
mov eax, dword [edx + 0x134]
push eax
call dword [sym.imp.KERNEL32.dll_SetCommMask]
mov ecx, dword [ebp + 8]
xor edx, edx
mov dl, byte [ecx + 5]
test edx, edx
jne 0x404362
push 0x800
push 0x1000
mov eax, dword [ebp - 0x58]
mov ecx, dword [eax + 0x134]
push ecx
call dword [sym.imp.KERNEL32.dll_SetupComm]
mov dword [ebp - 0x40], eax
mov edx, dword [ebp + 8]
xor eax, eax
mov al, byte [edx + 5]
test eax, eax
jne 0x404383
push 0xf
mov ecx, dword [ebp - 0x58]
mov edx, dword [ecx + 0x134]
push edx
call dword [sym.imp.KERNEL32.dll_PurgeComm]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x24], 0xffffffff
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0x3e8
mov eax, dword [ebp + 8]
xor ecx, ecx
mov cx, word [eax + 6]
mov eax, 0x4b00
cdq
idiv ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 0
mov edx, dword [ebp + 8]
xor eax, eax
mov al, byte [edx + 5]
test eax, eax
jne 0x4043d6
lea ecx, [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x58]
mov eax, dword [edx + 0x134]
push eax
call dword [sym.imp.KERNEL32.dll_SetCommTimeouts]
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp + 8]
xor edx, edx
mov dl, byte [ecx + 5]
test edx, edx
jne 0x4043f7
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 4]
push ecx
mov ecx, dword [ebp - 0x58]
call fcn.004045ae
mov dword [ebp - 0xc], eax
jmp 0x4043fe
mov dword [ebp - 0xc], 1
cmp dword [ebp - 0xc], 0
je 0x4044e6
mov edx, dword [ebp - 0x58]
mov dword [edx + 0x13c], 1
mov eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x58]
mov edx, dword [ecx + 0x134]
mov dword [eax + 0x170], edx
mov eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x58]
mov edx, dword [ecx + 0x13c]
mov dword [eax + 0x174], edx
mov eax, dword [ebp + 8]
xor ecx, ecx
mov cl, byte [eax + 5]
test ecx, ecx
jne 0x4044e4
lea edx, [ebp - 0x34]
push edx
push 0
mov eax, dword [ebp - 0x58]
add eax, 0x170
push eax
push 0x406d26
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x404496
mov ecx, dword [ebp - 0x58]
mov dword [ecx + 0x13c], 0
mov edx, dword [ebp - 0x58]
mov eax, dword [edx + 0x134]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0xc], 0
jmp 0x4044d2
mov ecx, dword [ebp - 0x58]
mov edx, dword [ebp - 0x34]
mov dword [ecx + 0x140], edx
mov eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x3c]
mov dword [eax + 0x144], ecx
mov edx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x58]
mov ecx, dword [eax + 0x140]
mov dword [edx + 0x178], ecx
mov edx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x58]
mov ecx, dword [eax + 0x144]
mov dword [edx + 0x17c], ecx
push 5
mov edx, dword [ebp - 0x58]
mov eax, dword [edx + 0x134]
push eax
call dword [sym.imp.KERNEL32.dll_EscapeCommFunction]
jmp 0x404503
mov ecx, dword [ebp - 0x58]
mov dword [ecx + 0x13c], 0
mov edx, dword [ebp - 0x58]
mov eax, dword [edx + 0x134]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x38]
push ecx
call dword [sym.imp.USER32.dll_SetCursor]
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret 4