Function at 0x415560
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4ff396
mov eax, dword fs:[0]
push eax
sub esp, 0x288
mov eax, dword [0x5365f0]
xor eax, esp
mov dword [esp + 0x280], eax
push ebx
push esi
push edi
mov eax, dword [0x5365f0]
xor eax, esp
push eax
lea eax, [esp + 0x298]
mov dword fs:[0], eax
mov ebx, ecx
lea eax, [ebx + 0x2d0]
push eax
mov dword [esp + 0x28], ebx
mov dword [esp + 0x20], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea edi, [ebx + 0x40]
call fcn.004473f0
mov ecx, edi
call fcn.00446790
test eax, eax
jne 0x4155f1
lea ecx, [eax + 1]
call fcn.004327a0
test eax, eax
je 0x4155e1
mov ecx, edi
call fcn.00446790
test eax, eax
jne 0x4155f1
call fcn.004471e0
test eax, eax
je 0x4155f1
mov ecx, edi
call fcn.00446790
call fcn.00448100
xor eax, eax
mov esi, edi
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
call fcn.00429fc0
test eax, eax
jne 0x41567c
lea ecx, [ebx + 0x520]
push str.CAEEngine::InitInstance__._Error:___Failed_to_load_AE_configuration.
call fcn.004015d0
add esp, 4
xor ecx, ecx
call fcn.004327a0
test eax, eax
je 0x415636
call fcn.00429fc0
test eax, eax
jne 0x415840
push str.CAEEngine::InitInstance__._Error:___Failed_to_load_AE_configuration_backup.
lea ecx, [ebx + 0x520]
call fcn.004015d0
add esp, 4
mov ecx, edi
call fcn.004414d0
test eax, eax
je 0x41565f
mov esi, edi
call fcn.00429fc0
test eax, eax
jne 0x415674
push str.CAEEngine::InitInstance__._Error:___Failed_to_load_AE_configuration_Default.
lea ecx, [ebx + 0x520]
call fcn.004015d0
add esp, 4
jmp 0x415683
mov dword [esp + 0x2c], 1
xor ecx, ecx
call fcn.00432650
push ebx
call fcn.004146a0
push edi
call fcn.00438620
add ebx, 0xe1c
mov ecx, edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], ebx
call fcn.0041f820
mov ecx, edi
call fcn.00447b40
mov esi, dword [esp + 0x24]
mov eax, dword [esi + 0x2c8]
mov dword [0x539c34], eax
test eax, eax
je 0x4156cb
lea eax, [esi + 0x53c]
mov ebx, edi
call fcn.0040df90
mov ecx, edi
call fcn.004405f0
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ebx, dword [esp + 0x20]
lea eax, [esi + 0x53c]
add esi, 0xd88
push eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x34], esi
call fcn.0041ae50
mov eax, dword [esp + 0x24]
mov ebx, dword [esp + 0x1c]
lea esi, [eax + 0xe00]
test edi, edi
je 0x41574c
test ebx, ebx
je 0x415742
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x415742
mov dword [esi + 4], edi
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ecx
mov dword [esi], 0xa
mov eax, dword [edi + 0x1e8]
call fcn.0044eb80
mov ecx, dword [esi + 4]
mov edx, dword [ecx + 0x1e8]
mov eax, dword [esp + 0x24]
mov dword [esi], edx
test edi, edi
je 0x41574c
mov dword [eax + 0x401f2c], edi
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x41575a
mov dword [eax + 0x40277c], ecx
mov ecx, dword [esp + 0x30]
test ecx, ecx
je 0x415768
mov dword [eax + fcn.004027c0], ecx
test esi, esi
je 0x415772
mov dword [eax + 0x4027c4], esi
cmp dword [esp + 0x18], 0
je 0x41577e
call fcn.00413ed0
lea eax, [esp + 0x18]
push eax
push 1
push 0x82158
lea edx, [esp + 0x20]
mov ecx, ebx
mov byte [esp + 0x20], 0
mov dword [esp + 0x24], 0
call fcn.0040a620
test eax, eax
je 0x4157b9
push str.ChangeMode_finished_n
lea ecx, [ebx + 0x82c]
call fcn.004015d0
add esp, 4
mov esi, dword [esp + 0x24]
add esi, 0x401f14
call fcn.00455960
test al, al
jne 0x41582a
mov ebx, dword [esp + 0x24]
add ebx, 0x520
push str.CAEEngine::InitInstance__._Error:___Failed_to_start_WMI_provider.
mov ecx, ebx
call fcn.004015d0
add esp, 4
push esi
call fcn.004559e0
call fcn.00455960
test al, al
jne 0x415826
push str.CAEEngine::InitInstance__._Error:___Failed_to_start_WMI_provider_2nd_time.
mov ecx, ebx
call fcn.004015d0
add esp, 4
call fcn.00413ed0
push esi
call fcn.004559e0
call fcn.00455960
test al, al
jne 0x415826
push str.CAEEngine::InitInstance__._Error:___Failed_to_start_WMI_provider_3Rd_time.
mov ecx, ebx
call fcn.004015d0
add esp, 4
mov ebx, dword [esp + 0x1c]
cmp dword [edi + 0x1ec], 2
jne 0x41584d
cmp dword [edi + 0x1f0], 1
jne 0x41584d
xor al, al
jmp 0x415853
mov dword [esp + 0x28], 1
jmp 0x415683
mov al, byte [edi + 0x200]
lea ecx, [esp + 0x18]
push ecx
push 1
push 0x82158
lea edx, [esp + 0x20]
mov ecx, ebx
mov byte [esp + 0x20], al
mov dword [esp + 0x24], 0
call fcn.0040a620
test eax, eax
je 0x41588d
push str.ChangeMode_finished_n
lea ecx, [ebx + 0x82c]
call fcn.004015d0
add esp, 4
mov ebx, dword [esp + 0x24]
lea eax, [ebx + 0x40284c]
test edi, edi
je 0x4158a9
test esi, esi
je 0x4158a9
mov dword [eax], edi
mov dword [eax + 4], esi
call fcn.00409a90
mov ecx, edi
call fcn.00433d70
xor esi, esi
test eax, eax
je 0x4158ea
cmp dword [ebx + 0x401ee0], esi
je 0x4158ea
call fcn.00422e10
cmp eax, esi
jne 0x4158ea
lea edx, [esp + 0x18]
push edx
push esi
push esi
push 0x414430
push esi
push esi
mov dword [esp + 0x30], esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, esi
je 0x4158ea
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.Trace:___Engine_is_started.
lea ecx, [ebx + 0x520]
call fcn.004015d0
add esp, 4
cmp dword [esp + 0x28], esi
je 0x415912
mov ecx, dword [esp + 0x20]
push 1
mov edx, edi
call fcn.00421410
jmp 0x41591c
mov eax, dword [esp + 0x20]
push eax
call fcn.004217b0
cmp dword [esp + 0x2c], esi
je 0x41592e
mov ecx, dword [esp + 0x20]
push esi
mov edx, edi
call fcn.00421410
push 1
lea ecx, [esp + 0x44]
push ecx
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x41596a
push esi
push esi
push 1
lea edx, [esp + 0x4c]
push edx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x41596a
lea eax, [esp + 0x40]
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], 0xc
mov dword [esp + 0x3c], esi
mov al, 1
jmp 0x41596c
xor al, al
movzx ecx, al
push str.GlobalAEENGINE_INIT_DONE_DA4EEDED_F8EA_4B00_A722_1FDF83AF9D2A
neg ecx
push esi
sbb ecx, ecx
lea edx, [esp + 0x3c]
push esi
and ecx, edx
push ecx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [ebx + 0x402864], eax
xor eax, eax
mov dword [esp + 0x80], esi
mov word [esp + 0x70], ax
push esi
mov eax, 0x517384
lea esi, [esp + 0x74]
mov dword [esp + 0x88], 7
call fcn.004027c0
xor ebx, ebx
mov dword [esp + 0x2a0], ebx
push 0x2b
mov eax, str.Global199FF41F_BEA3_483b_B720_24B3F798DE2C
call fcn.004027c0
xor edi, edi
lea esp, [esp]
push 0x1fe
lea edx, [esp + 0x92]
xor ecx, ecx
push ebx
push edx
mov word [esp + 0x98], cx
call fcn.004da450
add esp, 0xc
push edi
lea eax, [esp + 0x90]
push 0x50ff30
push eax
call fcn.004d7ee5
add esp, 0xc
xor ecx, ecx
push ebx
lea edx, [esp + 0x74]
mov word [esp + 0x58], cx
push edx
or eax, 0xffffffff
lea ecx, [esp + 0x5c]
mov dword [esp + 0x70], 7
mov dword [esp + 0x6c], ebx
call fcn.004022e0
mov byte [esp + 0x2a0], 1
lea eax, [esp + 0x8c]
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x415a40
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x90]
lea ecx, [esp + 0x58]
call fcn.004021b0
cmp dword [esp + 0x68], 8
mov eax, dword [esp + 0x54]
jae 0x415a6f
lea eax, [esp + 0x54]
push eax
push ebx
push 2
call dword [sym.imp.KERNEL32.dll_OpenEventW]
mov esi, eax
cmp esi, ebx
je 0x415a8d
push esi
call dword [sym.imp.KERNEL32.dll_SetEvent]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [esp + 0x2a0], 0
cmp dword [esp + 0x68], 8
jb 0x415aa9
mov eax, dword [esp + 0x54]
push eax
call fcn.004d5559
add esp, 4
xor ecx, ecx
inc edi
mov dword [esp + 0x68], 7
mov dword [esp + 0x64], ebx
mov word [esp + 0x54], cx
cmp edi, 0x14
jb 0x4159d0
mov dword [esp + 0x2a0], 0xffffffff
cmp dword [esp + 0x84], 8
jb 0x415ae8
mov edx, dword [esp + 0x70]
push edx
call fcn.004d5559
add esp, 4
xor eax, eax
mov dword [esp + 0x84], 7
mov dword [esp + 0x80], ebx
mov word [esp + 0x70], ax
mov ecx, dword [esp + 0x298]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x280]
xor ecx, esp
call fcn.004d5564
mov esp, ebp
pop ebp
ret