Function at 0x4136e0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, dword [ebp + 8]
mov edx, dword [ebx + 0x14]
push esi
mov esi, dword [ebx + 8]
push edi
xor edi, edi
mov dword [ebp - 4], esi
mov dword [ebp - 8], edi
mov dword [ebx + 0x38], edi
lea eax, [ebx + 0x70]
lea ecx, [edi + 0x20]
jmp 0x413710
mov dword [eax + 0x100], edi
mov dword [eax + 0x104], edi
mov dword [eax], edi
mov dword [eax + 4], edi
add eax, 8
dec ecx
jne 0x413710
mov dword [ebx + 0x48], edi
mov dword [ebx + 0x4c], edi
mov dword [ebx + 0x40], edi
mov dword [ebx + 0x44], edi
mov dword [ebx + 0x50], edx
mov dword [ebx + 0x54], edi
cmp esi, edi
jbe 0x41375e
lea esi, [ebx + 0x270]
call fcn.004131d0
test eax, eax
jne 0x413918
inc edi
add esi, 0x44
cmp edi, dword [ebp - 4]
jb 0x413743
mov esi, dword [ebp - 4]
xor edi, edi
mov dword [ebp - 0xc], edi
cmp esi, edi
jbe 0x41381d
lea esi, [ebx + 0x29c]
nop
cmp dword [esi - 0x14], 0
lea edi, [esi - 0x14]
jne 0x413803
push 0
push 0
push 0
lea eax, [esi - 0x2c]
push 0
mov dword [esi - 4], 0x413480
mov dword [esi], eax
mov dword [esi - 8], 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esi - 0x10], eax
test eax, eax
jne 0x4137ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4138bb
mov eax, 1
jmp 0x4137fb
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esi - 0xc], eax
test eax, eax
je 0x4137a5
lea ecx, [ebp - 0x10]
push ecx
push 0
push edi
push 0x412da0
push 0
push 0
call fcn.004bee06
add esp, 0x18
mov dword [edi], eax
test eax, eax
jne 0x413803
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4138bb
test eax, eax
jne 0x4138bb
mov eax, dword [ebp - 0xc]
inc eax
add esi, 0x44
mov dword [ebp - 0xc], eax
cmp eax, dword [ebp - 4]
jb 0x413770
mov esi, dword [ebp - 4]
xor edi, edi
cmp esi, edi
mov ebx, dword [sym.imp.KERNEL32.dll_SetEvent]
jbe 0x413846
mov esi, dword [ebp + 8]
add esi, 0x28c
mov edi, edi
mov edx, dword [esi]
push edx
call ebx
test eax, eax
je 0x4138c4
inc edi
add esi, 0x44
cmp edi, dword [ebp - 4]
jb 0x413830
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x2b0]
push eax
call ebx
test eax, eax
jne 0x41385c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 0x2ac]
push ecx
call ebx
test eax, eax
jne 0x41386f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test edi, edi
je 0x41388f
mov esi, dword [ebp + 8]
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
add esi, 0x290
mov edx, dword [esi]
push 0xffffffffffffffff
push edx
call ebx
add esi, 0x44
dec edi
jne 0x413882
mov ebx, dword [ebp + 8]
mov edi, dword [ebp - 4]
test edi, edi
je 0x41390e
lea esi, [ebx + 0x2b0]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi - 4]
test eax, eax
je 0x4138e3
push eax
call ebx
test eax, eax
jne 0x4138e3
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4138ea
mov dword [ebp - 8], 0xc
jmp 0x413892
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [ebp + 8]
mov dword [ebp - 8], 0xc
mov dword [esi + 0x2a4], 1
jmp 0x413849
mov dword [esi - 4], 0
mov eax, dword [esi]
test eax, eax
je 0x4138ff
push eax
call ebx
test eax, eax
jne 0x4138ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x413905
mov dword [esi], 0
add esi, 0x44
dec edi
jne 0x4138a5
mov ebx, dword [ebp + 8]
mov eax, dword [ebp - 8]
test eax, eax
jne 0x413918
mov eax, dword [ebx + 0x38]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret