Function at 0x1004017
Capabilities:
Create thread

Disassembly:
mov edi, edi
push ebx
push esi
push edi
mov edi, ecx
mov eax, dword [0x1009008]
mov esi, 0x1009008
cmp eax, esi
je 0x1004044
test byte [eax + 0x1c], 1
je 0x1004044
push 0x1001704
push 0x71
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001e7b
xor ebx, ebx
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [edi + 0xc], eax
cmp eax, ebx
jne 0x10040a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004252
test byte [eax + 0x1c], 1
je 0x1004089
push 0x1001704
push 0x72
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001e7b
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004252
test byte [eax + 0x1c], 1
je 0x1004252
push edi
push 0x1001704
push 0x73
jmp 0x1004247
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [edi + 0x10], eax
cmp eax, ebx
jne 0x100410a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004252
test byte [eax + 0x1c], 1
je 0x10040eb
push 0x1001704
push 0x74
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001e7b
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004252
test byte [eax + 0x1c], 1
je 0x1004252
push edi
push 0x1001704
push 0x75
jmp 0x1004247
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [edi + 0x14], eax
cmp eax, ebx
jne 0x100416c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004252
test byte [eax + 0x1c], 1
je 0x100414d
push 0x1001704
push 0x76
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001e7b
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004252
test byte [eax + 0x1c], 1
je 0x1004252
push edi
push 0x1001704
push 0x77
jmp 0x1004247
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [edi + 0x18], eax
cmp eax, ebx
jne 0x10041cb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004252
test byte [eax + 0x1c], 1
je 0x10041af
push 0x1001704
push 0x78
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001e7b
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004252
test byte [eax + 0x1c], 1
je 0x1004252
push edi
push 0x1001704
push 0x79
jmp 0x1004247
lea eax, [edi + 8]
push eax
push ebx
push edi
push 0x1003fb2
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [edi + 4], eax
cmp eax, ebx
jne 0x1004227
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004252
test byte [eax + 0x1c], 1
je 0x1004213
push 0x1001704
push 0x7a
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001e7b
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004252
test byte [eax + 0x1c], 1
je 0x1004252
push edi
push 0x1001704
push 0x7b
jmp 0x1004247
mov ecx, edi
call fcn.01003580
mov edi, eax
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004252
test byte [eax + 0x1c], 1
je 0x1004252
push edi
push 0x1001704
push 0x7c
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001ea2
mov eax, edi
pop edi
pop esi
pop ebx
ret