Function at 0xf017b61
Capabilities:
Create thread

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x454
mov eax, dword [0xf062038]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [eax*4 + 0xf064a74]
cmp dword [ebx + 4], 1
push edi
mov dword [ebp - 0x410], eax
jne 0xf017b94
xor eax, eax
inc eax
jmp 0xf017c18
push esi
xor esi, esi
cmp dword [ebx + 0x1cc], esi
jne 0xf017c15
cmp dword [eax*4 + 0xf06d3c8], esi
jne 0xf017c15
cmp eax, 3
jg 0xf017c08
cmp eax, esi
jl 0xf017c08
add al, 0x54
lea ecx, [ebp - 0x40c]
push ecx
mov byte [ebp - 0x418], al
push eax
call fcn.0f010e25
push esi
push 0x40000080
push 3
push esi
push esi
push 0xc0000000
lea eax, [ebp - 0x40c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebx], eax
jne 0xf017c26
cmp dword [ebx + 0x3c], esi
je 0xf017c08
push esi
push dword [ebp - 0x418]
call fcn.0f010e25
push eax
push 0x3ec
call fcn.0f03462a
mov dword [ebx + 0x3c], esi
mov dword [ebx + 0x1cc], 0x24
mov dword [ebx + 4], esi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
pop edi
pop ebx
call fcn.0f01b9b9
leave
ret 4
push 0x4000
call fcn.0f0070c9
cmp eax, esi
pop ecx
mov dword [ebx + 0x40], eax
jne 0xf017c42
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0xf017c12
push esi
push 0x8f
mov dword [ebx + 0x50], 0x100
mov dword [ebx + 0x54], esi
call fcn.0f010e25
mov dword [ebx + 0x214], eax
lea edi, [ebx + 0x38]
push edi
lea eax, [ebx + 0x34]
push eax
push dword [ebp - 0x410]
call fcn.0f009b58
push 1
push dword [edi]
push dword [ebx + 0x34]
call fcn.0f01e5c5
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventA]
push esi
push esi
push 1
push esi
call edi
push esi
push esi
push esi
push esi
mov dword [ebx + 0x30], eax
call edi
push esi
push esi
push 1
push esi
mov dword [ebx + 0x68], eax
call edi
push esi
push esi
push 1
push esi
mov dword [ebx + 0x1e4], eax
call edi
mov dword [ebx + 0x1f4], eax
lea eax, [ebx + 0x164]
mov dword [ebp - 0x41c], eax
lea eax, [ebx + 0x1e8]
mov dword [ebx + 0x190], esi
mov dword [ebp - 0x420], eax
mov dword [ebp - 0x418], 3
push esi
push 1
push 1
push esi
call edi
mov ecx, dword [ebp - 0x420]
add dword [ebp - 0x420], 4
mov dword [ecx], eax
mov eax, dword [ebp - 0x41c]
add dword [ebp - 0x41c], 0x14
dec dword [ebp - 0x418]
mov dword [eax], esi
jne 0xf017cd7
push esi
push 0x90
mov dword [ebx + 0x48], esi
mov dword [ebx + 0x44], esi
mov dword [ebx + 0x138], esi
mov dword [ebx + 0x4c], esi
mov dword [ebx + 0x58], esi
mov dword [ebx + 0x60], esi
mov dword [ebx + 0x64], 0x24
mov dword [ebx + 0x1d0], 1
mov dword [ebx + 0x6c], esi
call fcn.0f010e25
movsx ecx, ax
cmp ecx, esi
lea eax, [ebx + 0x140]
mov dword [eax], ecx
mov edx, 0xc8
je 0xf017d51
cmp ecx, edx
jle 0xf017d53
mov dword [eax], edx
xor ecx, ecx
inc ecx
cmp dword [eax], ecx
jne 0xf017d60
mov dword [ebx + 0x13c], esi
push esi
push esi
push ecx
push esi
mov dword [ebx + 0x144], esi
mov dword [ebx + 4], ecx
mov dword [ebx + 0x1c8], esi
mov dword [ebx + 0x1d8], esi
call edi
mov edi, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [ebx + 0x1d4], eax
lea eax, [ebx + 0x194]
push eax
mov dword [ebx + 0x1e0], esi
mov dword [ebx + 0x1dc], esi
call edi
lea eax, [ebx + 0x1ac]
push eax
call edi
mov dword [ebx + 0x1c4], esi
mov dword [ebx + 0x1fc], esi
mov dword [ebx + 0xc], esi
lea esi, [ebx + 0x10]
push esi
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_GetCommState]
test eax, eax
je 0xf017fea
mov dword [ebx + 0xc], 1
push 7
pop ecx
lea edi, [ebp - 0x440]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x438]
and esi, 0xffffccc3
or esi, 1
and esi, 0xfffffbff
xor edi, edi
mov byte [ebp - 0x42b], 0x11
mov byte [ebp - 0x42a], 0x13
mov dword [ebp - 0x438], esi
cmp dword [ebx + 0x218], edi
je 0xf017e55
mov eax, dword [ebx + 0x208]
mov dword [ebp - 0x43c], eax
mov al, byte [ebx + 0x203]
mov byte [ebp - 0x42d], al
mov cl, byte [ebx + 0x204]
mov byte [ebp - 0x42c], cl
mov cl, byte [ebx + 0x205]
mov byte [ebp - 0x42e], cl
xor ecx, ecx
test al, al
sete cl
shl ecx, 1
xor ecx, esi
and ecx, 2
xor esi, ecx
mov dword [ebp - 0x438], esi
jmp 0xf017e80
mov eax, dword [ebx + 0x14]
mov dword [ebx + 0x208], eax
mov al, byte [ebx + 0x23]
mov byte [ebx + 0x203], al
mov al, byte [ebx + 0x24]
mov byte [ebx + 0x204], al
mov al, byte [ebx + 0x22]
mov byte [ebx + 0x205], al
mov byte [ebx + 0x200], 0
lea eax, [ebp - 0x411]
push eax
lea eax, [ebp - 0x424]
push eax
lea eax, [ebp - 0x440]
push eax
push edi
call fcn.0f039811
test eax, eax
je 0xf017fea
lea eax, [ebp - 0x411]
push eax
lea eax, [ebp - 0x424]
push eax
push dword [ebp - 0x410]
call fcn.0f028be2
lea eax, [ebp - 0x440]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_SetCommState]
test eax, eax
je 0xf017fea
push 0xff
push dword [ebx + 0x30]
push dword [ebx]
call fcn.0f03e757
test eax, eax
je 0xf017fea
push 0x64
push 0x2000
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_SetupComm]
test eax, eax
je 0xf017fea
lea eax, [ebp - 0x454]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_GetCommTimeouts]
or dword [ebp - 0x454], 0xffffffff
lea eax, [ebp - 0x454]
push eax
mov dword [ebp - 0x450], edi
mov dword [ebp - 0x44c], edi
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_SetCommTimeouts]
cmp dword [ebx + 0x218], edi
je 0xf017fb6
cmp byte [ebx + 0x200], 0
push dword [ebx]
je 0xf017f4d
call dword [sym.imp.KERNEL32.dll_SetCommBreak]
jmp 0xf017f53
call dword [sym.imp.KERNEL32.dll_ClearCommBreak]
cmp byte [ebx + 0x201], 0
mov esi, dword [sym.imp.KERNEL32.dll_EscapeCommFunction]
je 0xf017f66
push 5
jmp 0xf017f68
push 6
push dword [ebx]
call esi
cmp byte [ebx + 0x202], 0
je 0xf017f79
push 3
jmp 0xf017f7b
push 4
push dword [ebx]
call esi
xor eax, eax
mov al, byte [ebx + 0x205]
push eax
xor eax, eax
mov al, byte [ebx + 0x203]
push eax
xor eax, eax
mov al, byte [ebx + 0x204]
push eax
push dword [ebx]
call fcn.0f03e823
push dword [ebx + 0x208]
push dword [ebx]
call fcn.0f03e7ac
mov dword [ebx + 0x218], edi
jmp 0xf017fc1
push dword [ebp - 0x410]
call fcn.0f028c4a
lea eax, [ebx + 0x1f8]
push eax
push edi
push dword [ebp - 0x410]
push 0xf035a2d
push 0x2000
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, edi
mov dword [ebx + 0x1fc], eax
jne 0xf018004
push dword [ebp - 0x410]
call sym.ntvdm.exe_host_com_close
mov dword [ebx + 0x1cc], 0x24
jmp 0xf017c15
movsx eax, word [ebp - 0xc]
imul eax, eax, 0x3e8
mov dword [ebx + 0x20c], eax
mov dword [ebx + 0x210], eax
xor eax, eax
mov dword [ebx + 0x220], edi
inc eax
jmp 0xf017c17