Function at 0x1016bda
Capabilities:
Create thread

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
mov eax, dword [0x10a60d8]
cmp eax, 0x10a60d8
je 0x1016c2f
test byte [eax + 0x1c], 1
je 0x1016c2f
cmp byte [eax + 0x19], 5
jb 0x1016c2f
push dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
push dword [ecx]
mov ecx, dword [ebp + 0xc]
push dword [ecx]
mov ecx, dword [ebp + 8]
push dword [ecx]
mov edi, 0x1002bc4
push edi
push 0xa4
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010163ed
mov eax, dword [0x10a60d8]
jmp 0x1016c34
mov edi, 0x1002bc4
mov ecx, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 4], ebx
mov esi, 0x80070006
cmp dword [ecx], ebx
je 0x1016c72
mov dword [ebp - 4], esi
cmp eax, 0x10a60d8
je 0x1016c72
test byte [eax + 0x1c], 1
je 0x1016c72
cmp byte [eax + 0x19], 2
jb 0x1016c72
push esi
push edi
push 0xa5
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010160ad
mov eax, dword [0x10a60d8]
mov ecx, dword [ebp + 0xc]
cmp dword [ecx], ebx
je 0x1016ca6
mov dword [ebp - 4], esi
cmp eax, 0x10a60d8
je 0x1016ca6
test byte [eax + 0x1c], 1
je 0x1016ca6
cmp byte [eax + 0x19], 2
jb 0x1016ca6
push esi
push edi
push 0xa6
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010160ad
mov eax, dword [0x10a60d8]
mov ecx, dword [ebp + 0x10]
cmp dword [ecx], ebx
je 0x1016cda
mov dword [ebp - 4], esi
cmp eax, 0x10a60d8
je 0x1016cda
test byte [eax + 0x1c], 1
je 0x1016cda
cmp byte [eax + 0x19], 2
jb 0x1016cda
push esi
push edi
push 0xa7
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010160ad
mov eax, dword [0x10a60d8]
cmp dword [ebp + 0x14], ebx
jne 0x1016d11
mov ecx, 0x80070057
mov dword [ebp - 4], ecx
cmp eax, 0x10a60d8
je 0x1016d11
test byte [eax + 0x1c], 1
je 0x1016d11
cmp byte [eax + 0x19], 2
jb 0x1016d11
push ecx
push edi
push 0xa8
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010160ad
mov eax, dword [0x10a60d8]
xor edi, edi
cmp dword [ebp - 4], ebx
jl 0x1016fa3
push 0xc
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp - 8], eax
cmp eax, ebx
je 0x1016d38
mov ecx, dword [ebp - 0xc]
mov dword [eax], ecx
mov dword [eax + 8], ebx
mov dword [eax + 4], ebx
jmp 0x1016d3f
mov dword [ebp - 4], 0x8007000e
cmp dword [ebp - 4], ebx
jl 0x1016f9b
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov edi, dword [ebp + 0xc]
mov dword [edi], eax
cmp eax, ebx
je 0x1016d60
mov dword [ebp - 4], ebx
jmp 0x1016d77
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x1016d74
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 4], eax
mov eax, dword [0x10a60d8]
cmp eax, 0x10a60d8
je 0x1016dae
test byte [eax + 0x1c], 1
je 0x1016dae
cmp byte [eax + 0x19], 5
jb 0x1016dae
push dword [edi]
push dword [ebp - 4]
push 0x1002bc4
push 0xa9
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010163bb
mov eax, dword [0x10a60d8]
cmp dword [ebp - 4], ebx
jl 0x1016fa0
mov eax, dword [ebp - 8]
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 2
push ebx
push ebx
add eax, 8
push eax
call esi
push eax
push dword [edi]
call esi
mov edi, dword [sym.imp.KERNEL32.dll_DuplicateHandle]
push eax
call edi
cmp eax, 1
jne 0x1016de2
mov dword [ebp - 4], ebx
jmp 0x1016df9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x1016df6
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 4], eax
mov eax, dword [0x10a60d8]
cmp eax, 0x10a60d8
je 0x1016e33
test byte [eax + 0x1c], 1
je 0x1016e33
cmp byte [eax + 0x19], 5
jb 0x1016e33
push dword [ebp - 4]
mov ecx, dword [ebp + 0xc]
push dword [ecx]
push 0x1002bc4
push 0xaa
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010163bb
mov eax, dword [0x10a60d8]
cmp dword [ebp - 4], ebx
jl 0x1016fa0
push ebx
push 1
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
cmp eax, ebx
je 0x1016e56
mov dword [ebp - 4], ebx
jmp 0x1016e6d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x1016e6a
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 4], eax
mov eax, dword [0x10a60d8]
cmp eax, 0x10a60d8
je 0x1016ea7
test byte [eax + 0x1c], 1
je 0x1016ea7
cmp byte [eax + 0x19], 5
jb 0x1016ea7
mov ecx, dword [ebp + 0x10]
push dword [ecx]
push dword [ebp - 4]
push 0x1002bc4
push 0xab
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010163bb
mov eax, dword [0x10a60d8]
cmp dword [ebp - 4], ebx
jl 0x1016fa0
mov eax, dword [ebp - 8]
push 2
push ebx
push ebx
add eax, 4
push eax
call esi
push eax
mov eax, dword [ebp + 0x10]
push dword [eax]
call esi
push eax
call edi
cmp eax, 1
jne 0x1016ed2
mov dword [ebp - 4], ebx
jmp 0x1016ee9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x1016ee6
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 4], eax
mov eax, dword [0x10a60d8]
cmp eax, 0x10a60d8
je 0x1016f23
test byte [eax + 0x1c], 1
je 0x1016f23
cmp byte [eax + 0x19], 5
jb 0x1016f23
push dword [ebp - 4]
mov ecx, dword [ebp + 0x10]
push dword [ecx]
push 0x1002bc4
push 0xac
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010163bb
mov eax, dword [0x10a60d8]
cmp dword [ebp - 4], ebx
jl 0x1016fa0
push ebx
push ebx
push dword [ebp - 8]
push dword [ebp + 0x14]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, dword [ebp + 8]
mov dword [esi], eax
cmp eax, ebx
je 0x1016f46
mov dword [ebp - 4], ebx
jmp 0x1016f5d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x1016f5a
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 4], eax
mov eax, dword [0x10a60d8]
cmp eax, 0x10a60d8
je 0x1016f94
test byte [eax + 0x1c], 1
je 0x1016f94
cmp byte [eax + 0x19], 5
jb 0x1016f94
push dword [esi]
push dword [ebp - 4]
push 0x1002bc4
push 0xad
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010163bb
mov eax, dword [0x10a60d8]
cmp dword [ebp - 4], ebx
jge 0x1017015
jmp 0x1016fa0
mov eax, dword [0x10a60d8]
mov edi, dword [ebp - 8]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ecx, ebx
je 0x1016fbf
push ecx
call esi
mov eax, dword [ebp + 8]
mov dword [eax], ebx
mov eax, dword [0x10a60d8]
mov ecx, dword [ebp + 0xc]
mov ecx, dword [ecx]
cmp ecx, ebx
je 0x1016fd5
push ecx
call esi
mov eax, dword [ebp + 0xc]
mov dword [eax], ebx
mov eax, dword [0x10a60d8]
mov ecx, dword [ebp + 0x10]
mov ecx, dword [ecx]
cmp ecx, ebx
je 0x1016feb
push ecx
call esi
mov eax, dword [ebp + 0x10]
mov dword [eax], ebx
mov eax, dword [0x10a60d8]
cmp edi, ebx
je 0x1017015
mov eax, dword [edi + 8]
cmp eax, ebx
je 0x1016ffc
push eax
call esi
mov dword [edi + 8], ebx
mov eax, dword [edi + 4]
cmp eax, ebx
je 0x1017009
push eax
call esi
mov dword [edi + 4], ebx
push edi
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
mov eax, dword [0x10a60d8]
pop ecx
pop edi
pop esi
pop ebx
cmp eax, 0x10a60d8
je 0x1017043
test byte [eax + 0x1c], 1
je 0x1017043
cmp byte [eax + 0x19], 5
jb 0x1017043
push dword [ebp - 4]
push 0x1002bc4
push 0xae
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010160ad
mov eax, dword [ebp - 4]
leave
ret 0x10