Function at 0x47ba80
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov edx, ecx
xor eax, eax
push ebx
push esi
push edi
mov edi, dword [edx + 8]
mov ecx, 0x20
mov esi, dword [edx + 0x14]
mov dword [ebp - 8], eax
mov dword [edx + 0x38], eax
lea eax, [edx + 0x70]
mov dword [ebp - 4], edx
mov dword [ebp - 0x10], edi
nop word [eax + eax]
mov dword [eax + 0x100], 0
lea eax, [eax + 8]
mov dword [eax + 0xfc], 0
mov dword [eax - 8], 0
mov dword [eax - 4], 0
sub ecx, 1
jne 0x47bab0
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edx + 0x48], ecx
mov dword [edx + 0x4c], ecx
mov dword [edx + 0x40], ecx
mov dword [edx + 0x44], ecx
mov dword [edx + 0x50], esi
mov dword [edx + 0x54], ecx
mov dword [ebp - 0xc], ecx
test edi, edi
je 0x47bbf3
lea esi, [edx + 0x27c]
mov edx, dword [esi]
test edx, edx
je 0x47bb13
mov ecx, dword [esi - 0xc]
mov eax, dword [esi + 4]
cmp eax, dword [ecx]
je 0x47bb3e
mov eax, dword [esi - 0xc]
push edx
mov eax, dword [eax + 0x18]
push eax
mov eax, dword [eax + 4]
call eax
mov eax, dword [esi - 0xc]
mov ecx, dword [eax]
mov dword [esi + 4], ecx
mov eax, dword [eax + 0x18]
push ecx
push eax
mov eax, dword [eax]
call eax
add esp, 0x10
mov dword [esi], eax
test eax, eax
je 0x47bd92
mov edx, dword [esi - 8]
test edx, edx
je 0x47bb50
mov ecx, dword [esi - 0xc]
mov eax, dword [esi - 4]
cmp eax, dword [ecx + 4]
je 0x47bb7d
mov eax, dword [esi - 0xc]
push edx
mov eax, dword [eax + 0x18]
push eax
mov eax, dword [eax + 4]
call eax
mov eax, dword [esi - 0xc]
mov ecx, dword [eax + 4]
mov dword [esi - 4], ecx
mov eax, dword [eax + 0x18]
push ecx
push eax
mov eax, dword [eax]
call eax
add esp, 0x10
mov dword [esi - 8], eax
test eax, eax
je 0x47bd92
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventW]
push 0
push 0
push 0
push 0
mov dword [esi + 0x28], 0
mov dword [esi + 0x2c], 0
call edi
mov dword [esi + 0x30], eax
test eax, eax
jne 0x47bbb6
call ebx
test eax, eax
mov ecx, 1
cmovne ecx, eax
test ecx, ecx
jne 0x47bd86
push 0
push 0
push 0
push 0
call edi
mov dword [esi + 0x34], eax
test eax, eax
jne 0x47bbdb
call ebx
test eax, eax
mov ecx, 1
cmovne ecx, eax
test ecx, ecx
jne 0x47bd86
mov eax, dword [ebp - 0xc]
add esi, 0x44
mov edi, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0xc], eax
cmp eax, edi
jb 0x47bb03
mov edx, dword [ebp - 4]
mov dword [ebp - 0xc], 0
test edi, edi
je 0x47bcc7
lea esi, [edx + 0x29c]
nop dword [eax + eax]
cmp dword [esi - 0x14], 0
jne 0x47bcb5
push 0
push 0
push 0
lea eax, [esi - 0x2c]
mov dword [esi - 4], 0x47b860
push 0
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 0x47bc56
call ebx
test eax, eax
mov ecx, 1
cmovne ecx, eax
test ecx, ecx
jne 0x47bd9e
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esi - 0xc], eax
test eax, eax
jne 0x47bc7f
call ebx
test eax, eax
mov ecx, 1
cmovne ecx, eax
test ecx, ecx
jne 0x47bd9e
lea eax, [ebp - 0x14]
push eax
push 0
lea eax, [esi - 0x14]
push eax
push 0x47b5e0
push 0
push 0
call fcn.004b3b90
add esp, 0x18
mov dword [esi - 0x14], eax
test eax, eax
jne 0x47bcb5
call ebx
test eax, eax
mov ecx, 1
cmovne ecx, eax
test ecx, ecx
jne 0x47bd9e
mov eax, dword [ebp - 0xc]
add esi, 0x44
inc eax
mov dword [ebp - 0xc], eax
cmp eax, edi
jb 0x47bc10
mov ecx, dword [sym.imp.KERNEL32.dll_SetEvent]
xor esi, esi
mov eax, dword [ebp - 4]
test edi, edi
je 0x47bd13
add eax, 0x28c
mov dword [ebp - 0xc], eax
nop
push dword [eax]
call ecx
test eax, eax
jne 0x47bcfc
call ebx
test eax, eax
mov ecx, 1
cmovne ecx, eax
test ecx, ecx
jne 0x47bda7
mov eax, dword [ebp - 0xc]
inc esi
mov ecx, dword [sym.imp.KERNEL32.dll_SetEvent]
add eax, 0x44
mov dword [ebp - 0xc], eax
cmp esi, edi
jb 0x47bce0
mov eax, dword [ebp - 4]
push dword [eax + 0x2b0]
call ecx
test eax, eax
jne 0x47bd21
call ebx
mov eax, dword [ebp - 4]
push dword [eax + 0x2ac]
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x47bd36
call ebx
test esi, esi
je 0x47bd58
mov edi, dword [ebp - 4]
add edi, 0x290
push 0xffffffffffffffff
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea edi, [edi + 0x44]
sub esi, 1
jne 0x47bd43
mov edi, dword [ebp - 0x10]
test edi, edi
je 0x47bdf0
mov esi, dword [ebp - 4]
add esi, 0x2b0
nop dword [eax]
mov eax, dword [esi - 4]
test eax, eax
je 0x47bdc6
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x47bdc6
call ebx
jmp 0x47bdcd
pop edi
pop esi
mov eax, 0xc
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 2
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 8], 0xc
jmp 0x47bd58
mov eax, dword [ebp - 4]
mov ecx, dword [sym.imp.KERNEL32.dll_SetEvent]
mov dword [ebp - 8], 0xc
mov dword [eax + 0x2a4], 1
jmp 0x47bd13
mov dword [esi - 4], 0
mov eax, dword [esi]
test eax, eax
je 0x47bde2
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x47bde2
call ebx
jmp 0x47bde8
mov dword [esi], 0
add esi, 0x44
sub edi, 1
jne 0x47bd70
mov eax, dword [ebp - 8]
test eax, eax
jne 0x47bdfd
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x38]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret