Function at 0x5114e0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x564a2e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x14], edi
mov dword [ebp - 4], 0
lea ebx, [edi + 8]
mov dword [edi], vtable.ThreadUI.0
mov dword [ebx], 0
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x14], 0xf
mov byte [ebx], 0
lea eax, [edi + 0x28]
push 2
push eax
call fcn.0051eba5
lea esi, [edi + 0x58]
mov byte [ebp - 4], 2
push 8
mov dword [ebp - 0x18], esi
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
call fcn.00532272
add esp, 0xc
mov dword [eax + 4], 0
mov dword [esi], eax
mov dword [eax], esi
mov byte [ebp - 4], 3
mov eax, dword [ebp + 8]
mov dword [edi + 4], eax
lea eax, [ebp + 0x14]
mov dword [edi + 0x74], 0
mov byte [edi + 0x78], 0
cmp ebx, eax
je 0x5115a5
cmp dword [ebp + 0x28], 0x10
mov ecx, ebx
push dword [ebp + 0x24]
cmovae eax, dword [ebp + 0x14]
push eax
call fcn.00434aa0
mov eax, dword [ebp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [edi + 0x20], eax
lea eax, [ebp + 8]
push eax
push 0
push edi
push 0x515b20
push 0
push 0
mov dword [edi + 0x24], 0
call esi
mov dword [edi + 0x6c], eax
lea eax, [ebp + 8]
push eax
push 0
push edi
push 0x511940
push 0
push 0
call esi
sub esp, 0x18
mov dword [edi + 0x70], eax
mov ecx, esp
push 0xc
push str.ClosingEvent
mov dword [ecx], 0
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0
call fcn.00424490
lea ecx, [ebp + 8]
call fcn.00437680
add esp, 0x18
mov byte [ebp - 4], 4
mov edx, dword [eax]
mov ecx, edx
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x511632
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x30]
call fcn.00424490
mov byte [ebp - 4], 6
or esi, 0xffffffff
mov edx, dword [ebp + 8]
mov eax, esi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x51166c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
sub esp, 0x18
lea eax, [ebp - 0x30]
mov ecx, esp
push eax
call fcn.00424b70
lea ecx, [ebp + 0xc]
call fcn.00437900
add esp, 0x18
push dword [eax]
push 1
push 0x1f0003
call dword [sym.imp.KERNEL32.dll_OpenEventW]
mov edx, dword [ebp + 0xc]
mov dword [edi + 0x74], eax
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x5116af
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x1c]
cmp ecx, 8
jb 0x5116e5
mov edx, dword [ebp - 0x30]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x5116db
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x51172a
push ecx
push edx
call fcn.00532241
add esp, 8
mov ecx, dword [ebp + 0x28]
cmp ecx, 0x10
jb 0x511715
mov edx, dword [ebp + 0x14]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x51170b
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x51172a
push ecx
push edx
call fcn.00532241
add esp, 8
mov ecx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x24
call fcn.005370ef
int3