Function at 0x40a840
Capabilities:
Access peb ldr_data
Get kernel32 base address
Get number of processors
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x43b28b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc0
mov eax, dword [0x47f070]
xor eax, ebp
mov dword [esp + 0xb8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov dword [esp + 0x10], ecx
mov ecx, dword [ebp + 0xc]
mov dword [esp + 0x18], eax
mov eax, dword [eax + 8]
push edi
mov dword [esp + 0x54], ecx
mov ecx, dword [ebp + 0x10]
lea esi, [eax + eax*8]
mov eax, dword [ecx + 0x20]
lea edx, [esp + 0x58]
push edx
lea esi, [esi*4 + 4]
push eax
mov dword [esp + 0x20], esi
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [esp + 0x60]
sub eax, esi
mov dword [esp + 0x20], eax
add eax, esi
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 0x24], eax
add eax, 0x28
push 0x47f360
lea ecx, [esp + 0x38]
mov dword [esp + 0x30], eax
call fcn.0040a3c0
fld qword [0x441710]
mov ebx, dword [esp + 0x38]
fstp qword [esp + 0x68]
xor esi, esi
mov dword [esp + 0xd4], esi
mov dword [esp + 0x30], 0xffffffff
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], ebx
jmp 0x40a900
test ebx, ebx
mov ecx, dword [esp + 0x3c]
jne 0x40a90c
xor eax, eax
jmp 0x40a921
mov edx, ecx
sub edx, ebx
mov eax, 0x38e38e39
imul edx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jge 0x40a9c0
test ebx, ebx
je 0x40a9a2
sub ecx, ebx
mov eax, 0x38e38e39
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, esi
jbe 0x40a9a2
mov esi, dword [esp + 0xc]
sub esp, 0x10
mov ecx, 0x12
lea edi, [esp + 0x88]
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x84], esp
mov eax, esp
lea ecx, [esp + 0x8c]
push ecx
push eax
call dword [sym.imp.USER32.dll_CopyRect]
mov ecx, dword [esp + 0x74]
mov eax, dword [esp + 0x70]
push ecx
push eax
call fcn.004380e0
add esp, 0x18
test eax, eax
jne 0x40a9ab
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0xc]
inc ecx
add eax, 0x48
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], eax
mov esi, ecx
jmp 0x40a900
lea ecx, [esp + 0x34]
call fcn.004086b0
mov eax, dword [esp + 0x10]
cmp eax, 0xffffffff
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x30], eax
jne 0x40aad0
xor esi, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], ebx
lea ebx, [ebx]
test ebx, ebx
jne 0x40a9d8
xor eax, eax
jmp 0x40a9ed
mov edx, ecx
sub edx, ebx
mov eax, 0x38e38e39
imul edx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jge 0x40aac5
test ebx, ebx
je 0x40aabc
sub ecx, ebx
mov eax, 0x38e38e39
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, esi
jbe 0x40aabc
mov esi, dword [esp + 0xc]
lea edx, [esp + 0x7c]
push edx
lea eax, [esp + 0x48]
mov ecx, 0x12
lea edi, [esp + 0x7c]
push eax
rep movsd dword es:[edi], dword [esi]
call dword [sym.imp.USER32.dll_CopyRect]
mov edi, dword [esp + 0x64]
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x4c]
mov esi, dword [esp + 0x50]
push edi
mov edi, dword [esp + 0x64]
push edi
inc eax
sub esp, 0x10
inc ecx
mov edi, esp
mov dword [edi], eax
dec edx
mov dword [edi + 4], ecx
dec esi
mov dword [edi + 8], edx
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], ecx
mov dword [esp + 0x64], edx
mov dword [esp + 0x68], esi
mov dword [edi + 0xc], esi
call fcn.004082a0
fcom qword [esp + 0x80]
add esp, 0x18
fnstsw ax
test ah, 5
jp 0x40aa99
mov ecx, dword [esp + 0x10]
fstp qword [esp + 0x68]
mov dword [esp + 0x30], ecx
jmp 0x40aa9b
fstp st(0)
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0xc]
inc ecx
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x3c]
mov esi, dword [esp + 0x10]
add eax, 0x48
mov dword [esp + 0xc], eax
jmp 0x40a9d0
lea ecx, [esp + 0x34]
call fcn.004086b0
cmp dword [esp + 0x30], 0xffffffff
je 0x40ab72
test ebx, ebx
je 0x40aaef
sub ecx, ebx
mov eax, 0x38e38e39
imul ecx
mov ecx, dword [esp + 0x30]
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, ecx
ja 0x40aaf8
lea ecx, [esp + 0x34]
call fcn.004086b0
lea edx, [ecx + ecx*8]
lea esi, [ebx + edx*8]
mov ecx, 0x12
lea edi, [esp + 0x78]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x7c]
cmp dword [esp + 0x20], eax
jge 0x40ab23
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x20], eax
add eax, ecx
mov dword [esp + 0x28], eax
jmp 0x40ab3f
mov eax, dword [esp + 0x84]
cmp dword [esp + 0x28], eax
jle 0x40ab3f
mov ecx, dword [esp + 0x18]
dec eax
mov dword [esp + 0x28], eax
sub eax, ecx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x80]
cmp dword [esp + 0x24], eax
jge 0x40ab59
mov dword [esp + 0x24], eax
add eax, 0x28
mov dword [esp + 0x2c], eax
jmp 0x40ab72
mov eax, dword [esp + 0x88]
cmp dword [esp + 0x2c], eax
jle 0x40ab72
dec eax
mov dword [esp + 0x2c], eax
add eax, 0xffffffd8
mov dword [esp + 0x24], eax
push 0
push 0
push 0
push 0xb
call sub.MFC71.DLL_AfxRegisterWndClass
mov esi, dword [esp + 0x54]
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx]
push 0
push 0
push esi
lea esi, [esp + 0x2c]
push esi
push 0x96800000
push str.ToolBarPulldownMenu
push eax
push 0x80
call dword [edx + 0x60]
test eax, eax
jne 0x40abe1
push 0x441718
push 0x64
push eax
push 0x7c
push 0x408
push str..DarwinToolBar.cpp
push eax
push 0x47f138
call dword [sym.imp.LogEx.dll_public_virtual:_void___cdecl_LOG::Logger::PrintLog_enum_LOG::MsgKind__char_const___unsigned_long_int__unsigned_short_int__char_const___int__char_const__]
add esp, 0x20
test ebx, ebx
je 0x40abda
push ebx
call sub.MFC71.DLL_operator_delete
add esp, 4
xor al, al
jmp 0x40ad16
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx + 8]
xor ebx, ebx
test eax, eax
jle 0x40ac7b
mov edi, dword [esp + 0x14]
mov dword [esp + 0xc], ebx
mov esi, 1
add edi, 0x5c
cmp esi, 1
jl 0x40ad3b
cmp ebx, eax
jge 0x40ad3b
mov eax, dword [ecx + 4]
add eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x14]
push eax
mov eax, dword [eax + 0x40]
push eax
push ecx
push edi
call fcn.00407f90
add esp, 0x10
push 1
lea eax, [esi + 0x24]
push 0x24
mov dword [esp + 0x30], eax
sub eax, esi
push eax
push 1
push esi
mov ecx, edi
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], 1
mov dword [esp + 0x40], 0x25
call sub.MFC71.DLL_CWnd::MoveWindow
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + 8]
add ecx, 0x44
inc ebx
add esi, 0x24
add edi, 0x1a4
cmp ebx, eax
mov dword [esp + 0xc], ecx
mov ecx, edx
jl 0x40ac02
mov edi, dword [esp + 0x14]
lea ebx, [edi + 0x5264]
cmp ebx, ecx
je 0x40acd5
mov eax, dword [ecx + 8]
push 0xffffffffffffffff
push eax
mov ecx, ebx
call fcn.00409210
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx + 8]
test eax, eax
mov esi, dword [ecx + 4]
mov ebx, dword [ebx + 4]
je 0x40acd5
mov dword [esp + 0x18], eax
jmp 0x40acb0
mov edi, ebx
push esi
mov ecx, edi
add ebx, 0x44
call fcn.00403880
mov ecx, dword [esi + 0x40]
mov eax, dword [esp + 0x18]
add esi, 0x44
dec eax
mov dword [edi + 0x40], ecx
mov dword [esp + 0x18], eax
jne 0x40acb0
mov edi, dword [esp + 0x14]
mov ecx, edi
call fcn.00409be0
lea edx, [edi + 0x54]
push edx
call fcn.0041e3d0
mov ecx, eax
call fcn.0041e400
mov eax, dword [sym.imp.MFC71.DLL_CWnd::wndTopMost]
push 3
push 0
push 0
push 0
push 0
push eax
mov ecx, edi
call sub.MFC71.DLL_CWnd::SetWindowPos
mov eax, dword [esp + 0x38]
test eax, eax
je 0x40ad14
push eax
call sub.MFC71.DLL_operator_delete
add esp, 4
mov al, 1
mov ecx, dword [esp + 0xcc]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0xc4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043a16b
mov esp, ebp
pop ebp
ret 0xc
call fcn.00439dbc
int3