Function at 0x40ba70
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x454678
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x48
push ebx
push esi
mov esi, ecx
push edi
mov ecx, dword [esi + 0xc]
sub ecx, 0x10
mov dword [esp + 0xc], esi
call fcn.00402bb0
add eax, 0x10
mov dword [esp + 0x30], eax
push 0x10
push str.bfDesktopAPI.dll
lea ecx, [esp + 0x38]
mov dword [esp + 0x64], 0
call fcn.0040a080
xor eax, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov eax, dword [section..data]
xor ebx, ebx
mov ecx, section..data
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x18], ebx
mov dword [esp + 0x38], vtable.CDesktopInfo.0
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x4c], eax
lea ecx, [esp + 0x38]
mov byte [esp + 0x5c], 1
call fcn.0040e840
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x10], ebx
test ecx, ecx
je 0x40bb41
mov eax, dword [ecx]
lea edx, [esp + 0x10]
push edx
push 0x45e3f4
push ecx
call dword [eax]
mov ecx, dword [esp + 0x10]
xor edx, edx
test eax, eax
cmovs ecx, edx
mov dword [esp + 0x10], ecx
mov byte [esp + 0x5c], 2
or edi, 0xffffffff
cmp dword [esp + 0x10], 0
jne 0x40bb57
xor ebx, ebx
jmp 0x40be4e
mov ecx, dword [esp + 0x40]
mov edx, ecx
mov dword [esp + 0x28], edx
test ecx, ecx
je 0x40bcc1
mov dword [esp + 0x14], 0
lea edx, [esp + 0x14]
mov byte [esp + 0x5c], 3
mov eax, dword [ecx]
push edx
push ecx
call dword [eax + 0xc]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40bc91
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
mov esi, eax
mov eax, dword [esp + 0xc]
xor ecx, ecx
mov dword [eax], esi
mov eax, esi
mov edx, 0x140
mul edx
seto cl
mov dword [esp + 0x24], esi
neg ecx
or ecx, eax
push ecx
call fcn.0043c71a
add esp, 4
lea ecx, [esi + esi*4]
shl ecx, 6
push ecx
push 0
push eax
mov dword [esp + 0x2c], eax
call fcn.0043f760
add esp, 0xc
xor edi, edi
test esi, esi
jle 0x40bc89
mov ebx, dword [esp + 0x20]
mov edi, edi
mov eax, dword [section..data]
mov ecx, section..data
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [esp + 0x34], esi
mov dword [esp + 0x1c], 0
mov byte [esp + 0x5c], 5
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x1c]
mov ecx, dword [eax]
push edx
push edi
push eax
call dword [ecx + 0x10]
test eax, eax
js 0x40bc48
mov eax, dword [esp + 0x1c]
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
movq xmm0, qword [eax]
movq qword [ebx], xmm0
movq xmm0, qword [eax + 8]
mov eax, dword [esp + 0x1c]
movq qword [ebx + 8], xmm0
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
inc dword [esp + 0x18]
mov dword [ebx + 0x10], eax
add ebx, 0x140
mov byte [esp + 0x5c], 4
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40bc5b
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
add esi, 0xfffffff0
mov byte [esp + 0x5c], 3
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40bc7a
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
inc edi
cmp edi, dword [esp + 0x24]
jl 0x40bbe0
mov ebx, dword [esp + 0x18]
mov esi, dword [esp + 0xc]
mov eax, dword [esp + 0x14]
mov byte [esp + 0x5c], 2
test eax, eax
je 0x40bca0
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
test ebx, ebx
jle 0x40bcb9
push str.BFAppStore_EventName_NoApp
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esp + 0x2c], eax
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x40]
xor ebx, ebx
mov edi, 1
cmp dword [esp + 0x18], ebx
jle 0x40bd9e
mov eax, dword [esp + 0x20]
mov dword [esp + 0x1c], eax
lea ebx, [ebx]
push eax
push edx
push dword [esp + 0x18]
mov ecx, esi
call fcn.0040b530
mov edi, eax
cmp edi, 1
jne 0x40bdc8
mov esi, dword [esi + 0x4f0]
test esi, esi
je 0x40bd7a
mov eax, 0x64
cdq
idiv dword [esp + 0x24]
lea ecx, [ebx + 1]
imul ecx, eax
mov al, byte [esi + 0x2b]
mov dword [esi + 0xb8], ecx
test al, al
je 0x40bd38
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0x24]
cmp dword [eax + 0x1c], 0
mov edx, dword [ecx]
sete al
movzx eax, al
push 0
push eax
push esi
call dword [edx + 0x20]
mov eax, dword [0x472394]
mov ecx, 0x45e3d0
mov eax, dword [eax + 0x524]
test eax, eax
cmovne ecx, eax
push ecx
lea ecx, [esp + 0x38]
call fcn.00401560
call fcn.0040c480
mov edx, dword [esp + 0x34]
add edx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40bd7a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [esp + 0xc]
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x28]
inc ebx
add eax, 0x140
mov dword [esp + 0x1c], eax
cmp ebx, dword [esp + 0x18]
jl 0x40bce0
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40bdb3
push eax
call fcn.0043ca9f
mov ecx, dword [esp + 0x44]
add esp, 4
cmp edi, 2
je 0x40be49
cmp edi, 3
jne 0x40bdd4
mov ebx, edi
jmp 0x40be4b
cmp edi, 2
je 0x40bd9a
cmp edi, 3
je 0x40bd9a
jmp 0x40bd7e
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x40bdf3
push 0x493e0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x40be49
mov ecx, dword [esp + 0x40]
test ecx, ecx
je 0x40bea6
xor esi, esi
mov dword [esp + 0x28], esi
lea edx, [esp + 0x28]
mov byte [esp + 0x5c], 6
mov eax, dword [ecx]
push edx
push ecx
call dword [eax + 0xc]
mov eax, dword [esp + 0x28]
test eax, eax
je 0x40be25
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
mov esi, eax
mov eax, dword [esp + 0x28]
mov byte [esp + 0x5c], 2
test eax, eax
je 0x40be34
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
test esi, esi
jle 0x40bea6
push 0
push 0
push 0x45dd18
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
xor ebx, ebx
or edi, 0xffffffff
mov byte [esp + 0x5c], 1
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40be61
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
lea ecx, [esp + 0x38]
mov byte [esp + 0x5c], 0
call fcn.0040ea00
mov dword [esp + 0x5c], 0xffffffff
mov esi, dword [esp + 0x30]
add esi, 0xfffffff0
lea eax, [esi + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x40be92
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov ecx, dword [esp + 0x54]
pop edi
pop esi
mov eax, ebx
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, 1
jmp 0x40be4b