Function at 0xf01a4f1
Capabilities:
Create thread

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x454
mov eax, dword [0xf0ad034]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [eax*4 + 0xf0b030c]
cmp dword [ebx + 4], 1
push edi
mov dword [ebp - 0x410], eax
jne 0xf01a524
xor eax, eax
inc eax
jmp 0xf01a5a8
push esi
xor esi, esi
cmp dword [ebx + 0x1cc], esi
jne 0xf01a5a5
cmp dword [eax*4 + 0xf0be0c0], esi
jne 0xf01a5a5
cmp eax, 3
jg 0xf01a598
cmp eax, esi
jl 0xf01a598
add al, 0x54
lea ecx, [ebp - 0x40c]
push ecx
mov byte [ebp - 0x418], al
push eax
call fcn.0f0135ac
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 0xf01a5b6
cmp dword [ebx + 0x3c], esi
je 0xf01a598
push esi
push dword [ebp - 0x418]
call fcn.0f0135ac
push eax
push 0x3ec
call fcn.0f03d7fd
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.0f01dda0
leave
ret 4
push 0x4000
call fcn.0f009d40
cmp eax, esi
pop ecx
mov dword [ebx + 0x40], eax
jne 0xf01a5d2
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0xf01a5a2
push esi
push 0x8f
mov dword [ebx + 0x50], 0x100
mov dword [ebx + 0x54], esi
call fcn.0f0135ac
mov dword [ebx + 0x214], eax
lea eax, [ebx + 0x38]
push eax
lea eax, [ebx + 0x34]
push eax
push dword [ebp - 0x410]
call fcn.0f00c5ae
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 0xf01a65b
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.0f0135ac
movsx ecx, ax
cmp ecx, esi
lea eax, [ebx + 0x140]
mov dword [eax], ecx
mov edx, 0xc8
je 0xf01a6d5
cmp ecx, edx
jle 0xf01a6d7
mov dword [eax], edx
xor ecx, ecx
inc ecx
cmp dword [eax], ecx
jne 0xf01a6e4
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 0xf01a96e
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 0xf01a7d9
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 0xf01a804
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.0f0419f8
test eax, eax
je 0xf01a96e
lea eax, [ebp - 0x411]
push eax
lea eax, [ebp - 0x424]
push eax
push dword [ebp - 0x410]
call fcn.0f03085d
lea eax, [ebp - 0x440]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_SetCommState]
test eax, eax
je 0xf01a96e
push 0xff
push dword [ebx + 0x30]
push dword [ebx]
call fcn.0f0459a1
test eax, eax
je 0xf01a96e
push 0x64
push 0x2000
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_SetupComm]
test eax, eax
je 0xf01a96e
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 0xf01a93a
cmp byte [ebx + 0x200], 0
push dword [ebx]
je 0xf01a8d1
call dword [sym.imp.KERNEL32.dll_SetCommBreak]
jmp 0xf01a8d7
call dword [sym.imp.KERNEL32.dll_ClearCommBreak]
cmp byte [ebx + 0x201], 0
mov esi, dword [sym.imp.KERNEL32.dll_EscapeCommFunction]
je 0xf01a8ea
push 5
jmp 0xf01a8ec
push 6
push dword [ebx]
call esi
cmp byte [ebx + 0x202], 0
je 0xf01a8fd
push 3
jmp 0xf01a8ff
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.0f045a6d
push dword [ebx + 0x208]
push dword [ebx]
call fcn.0f0459f6
mov dword [ebx + 0x218], edi
jmp 0xf01a945
push dword [ebp - 0x410]
call fcn.0f0308c5
lea eax, [ebx + 0x1f8]
push eax
push edi
push dword [ebp - 0x410]
push 0xf03ef94
push 0x2000
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, edi
mov dword [ebx + 0x1fc], eax
jne 0xf01a988
push dword [ebp - 0x410]
call sym.ntvdm.exe_host_com_close
mov dword [ebx + 0x1cc], 0x24
jmp 0xf01a5a5
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 0xf01a5a7