Function at 0x502690
Capabilities:
Access peb ldr_data
Check for peb ntglobalflag flag
Get number of processors
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x100
mov esi, esp
mov dword [esi + 0xe8], ebp
mov ebx, ecx
lea edi, [esi + 0xf0]
mov dword [edi - 4], esp
xor eax, eax
dec eax
mov dword [edi + 8], eax
mov dword [edi + 4], 0x506240
mov eax, dword fs:[0]
mov dword [edi], eax
mov dword fs:[0], edi
call fcn.004ed9b0
mov dword [esi + 0xc], ebx
lea ecx, [ebx + 0x18]
mov dword [edi + 8], 0
mov dword [esi + 0x4c], ecx
xor eax, eax
dec eax
push eax
push 0x6fa356
call fcn.004aea40
xor edx, edx
mov ecx, dword [esi + 0xc]
mov dword [ecx + 0x2c], edx
lea eax, [ecx + 0x30]
mov dword [esi + 0x24], eax
lea eax, [ecx + 0x34]
mov dword [ecx + 0x34], edx
mov dword [ecx + 0x38], edx
mov dword [esi + 0x48], eax
mov dword [ecx + 0x30], eax
add ecx, 0x3c
mov dword [esi + 0xf8], 1
mov dword [esi + 0xac], ecx
call fcn.004ed9b0
mov ecx, dword [esi + 0xc]
lea eax, [ecx + 0x58]
xor edx, edx
mov dword [ecx + 0x58], edx
mov dword [ecx + 0x5c], edx
mov dword [ecx + 0x54], eax
lea eax, [ecx + 0x64]
mov dword [ecx + 0x64], edx
mov dword [ecx + 0x68], edx
mov dword [ecx + 0x60], eax
lea eax, [ecx + 0x70]
mov dword [ecx + 0x70], edx
mov dword [ecx + 0x74], edx
mov dword [ecx + 0x6c], eax
lea eax, [ecx + 0x7c]
mov dword [ecx + 0x7c], edx
mov dword [ecx + 0x80], edx
mov dword [ecx + 0x78], eax
mov eax, 2
mov dword [esi + 0xf8], eax
sub esp, 0x78
movdqu xmm0, xmmword [0x7a9568]
movdqu xmmword [esp + 0x68], xmm0
movdqu xmmword [esp + 0x58], xmm0
movdqu xmmword [esp + 0x48], xmm0
movdqu xmmword [esp + 0x38], xmm0
movdqu xmmword [esp + 0x28], xmm0
movdqu xmmword [esp + 0x18], xmm0
mov dword [esp], eax
mov dword [esp + 0x14], str.CommandMgr_construct_start
mov dword [esp + 0x10], str.XPluginCommandMgr
mov dword [esp + 0xc], str.CommandMgr
mov dword [esp + 8], 0xeb
mov dword [esp + 4], str..._.._applet_third_party_xplugin_src_CommandMgr.cpp
call fcn.004ee380
add esp, 0x78
lea ecx, [esi + 0xd4]
xor eax, eax
dec eax
mov dword [ecx], eax
mov dword [ecx + 4], eax
push dword [esi + 0xc]
call fcn.004ed9ce
mov dword [esi + 0xf8], 4
mov ecx, dword [esi + 0x4c]
push 0x6fa356
call fcn.004af198
xor edi, edi
mov ebx, dword [esi + 0xc]
mov dword [ebx + 0x2c], edi
mov ecx, dword [esi + 0x24]
push dword [ebx + 0x34]
call fcn.004a7d38
mov dword [ebx + 0x38], edi
mov eax, dword [esi + 0x48]
mov dword [ebx + 0x30], eax
mov dword [ebx + 0x34], edi
lea ecx, [esi + 0x50]
push str.plugin_command_info
call fcn.004037b8
mov dword [esi + 0xf8], 5
lea eax, [esi + 0x50]
push eax
call fcn.004f27a0
add esp, 4
mov dword [esi + 0x28], eax
cmp byte [esi + 0x5b], 0
jns 0x50284e
push dword [esi + 0x50]
call fcn.006c90e6
add esp, 4
cmp dword [esi + 0x28], 0
je 0x502e29
lea ecx, [esi + 0xc4]
xor eax, eax
dec eax
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov dword [esi + 0xf8], 4
push 0x6facd8
call fcn.004037b8
lea ecx, [esi + 0x50]
xor eax, eax
dec eax
mov dword [ecx + 0x10], eax
pcmpeqd xmm0, xmm0
movdqa xmmword [ecx], xmm0
mov dword [esi + 0xf8], 6
push eax
push str.cStrTAGConfigVer
call fcn.004aea40
mov dword [esi + 0xf8], 7
lea eax, [esi + 0x90]
lea ecx, [esi + 0x50]
push eax
call fcn.004af9f0
mov dword [esi + 0xf8], 0x14
mov ecx, dword [esi + 0x28]
lea eax, [esi + 0xc4]
push eax
lea eax, [esi + 0x90]
push eax
call fcn.004fcf50
cmp byte [esi + 0x9b], 0
jns 0x5028f3
push dword [esi + 0x90]
call fcn.006c90e6
add esp, 4
mov dword [esi + 0xf8], 7
lea ecx, [esi + 0x90]
push 0
lea eax, [esi + 0xc4]
push eax
call fcn.004aece0
mov dword [esi + 0xf8], 0x13
mov ecx, dword [esi + 0x4c]
lea eax, [esi + 0x90]
push eax
call fcn.004af61c
lea edi, [esi + 0x90]
mov ecx, edi
call fcn.004aeec0
xor eax, eax
dec eax
mov dword [edi + 0x10], eax
pcmpeqd xmm0, xmm0
movdqa xmmword [edi], xmm0
mov dword [esi + 0xf8], 7
lea ecx, [esi + 0x90]
push eax
push str.cStrTAGConfigSdkVer
call fcn.004aea40
mov dword [esi + 0xf8], 8
lea eax, [esi + 0x10]
lea ecx, [esi + 0x90]
push eax
call fcn.004af9f0
mov dword [esi + 0xf8], 0x12
xor eax, eax
mov ecx, dword [esi + 0x28]
push eax
push eax
lea eax, [esi + 0x10]
push eax
call fcn.004fd480
mov ecx, dword [esi + 0xc]
mov dword [ecx + 0x2c], eax
cmp byte [esi + 0x1b], 0
jns 0x5029aa
push dword [esi + 0x10]
call fcn.006c90e6
add esp, 4
lea eax, [esi + 0xdc]
xor ecx, ecx
dec ecx
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [esi + 0xf8], 8
mov ecx, dword [esi + 0x28]
push eax
call fcn.004fdaa0
mov ebx, dword [esi + 0xdc]
mov eax, dword [esi + 0xe0]
mov dword [esi + 0xd0], eax
mov edi, dword [esi + 0xc]
cmp ebx, dword [esi + 0xd0]
je 0x502d30
xor eax, eax
dec eax
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], eax
mov dword [esi + 0x38], eax
cmp byte [ebx + 0xb], 0
mov dword [esi + 0x40], ebx
js 0x502a15
mov eax, dword [ebx + 8]
mov dword [esi + 0x38], eax
movq xmm0, qword [ebx]
movq qword [esi + 0x30], xmm0
jmp 0x502a31
mov eax, dword [ebx]
mov edx, dword [ebx + 4]
mov dword [esi + 0xf8], 9
lea ecx, [esi + 0x30]
push edx
push eax
call fcn.00454baa
mov ebx, dword [esi + 0x40]
movzx eax, byte [esi + 0x3b]
test al, al
jns 0x502a3c
mov eax, dword [esi + 0x34]
test eax, eax
je 0x502d17
mov dword [esi + 0xf8], 0xa
lea ecx, [esi + 0x10]
push 0
lea eax, [esi + 0x30]
push eax
call fcn.004aece0
mov dword [esi + 0xf8], 0x10
lea ecx, [esi + 0x50]
lea eax, [esi + 0x10]
push eax
call fcn.004af262
test al, al
je 0x502a86
lea ecx, [esi + 0x10]
call fcn.004aeec0
mov ebx, dword [esi + 0x40]
jmp 0x502d17
lea ecx, [esi + 0x7c]
push 0
lea eax, [esi + 0x30]
push eax
call fcn.004aece0
mov dword [esi + 0xf8], 0x11
lea ecx, [esi + 0x90]
lea eax, [esi + 0x7c]
push eax
call fcn.004af262
mov ebx, eax
lea ecx, [esi + 0x7c]
call fcn.004aeec0
lea ecx, [esi + 0x10]
call fcn.004aeec0
test bl, bl
mov ebx, dword [esi + 0x40]
jne 0x502d17
xor eax, eax
dec eax
mov dword [esi + 0x7c], eax
mov dword [esi + 0x80], eax
mov dword [esi + 0x84], eax
mov dword [esi + 0xf8], 0xa
lea ecx, [esi + 0x7c]
push 0x6facd8
call fcn.004037b8
mov dword [esi + 0xf8], 0xb
mov ecx, dword [esi + 0x28]
lea eax, [esi + 0x7c]
push eax
lea eax, [esi + 0x30]
push eax
call fcn.004fcf50
xor eax, eax
mov dword [esi + 0x70], eax
mov dword [esi + 0x74], eax
mov dword [esi + 0x78], eax
xor eax, eax
dec eax
mov dword [esi + 0xb0], eax
mov dword [esi + 0xb4], eax
mov dword [esi + 0xb8], eax
mov dword [esi + 0xf8], 0xc
lea ecx, [esi + 0xb0]
push 0x731fe0
call fcn.004037b8
mov dword [esi + 0xf8], 0xd
lea eax, [esi + 0x70]
push eax
lea eax, [esi + 0xb0]
push eax
lea eax, [esi + 0x30]
push eax
call fcn.004f02e8
add esp, 0xc
mov ecx, dword [esi + 0x70]
mov eax, dword [esi + 0x74]
sub eax, ecx
cmp eax, 0x28
jne 0x502ce1
push 1
call fcn.004aef38
test al, al
jne 0x502ce1
mov ecx, dword [esi + 0x70]
add ecx, 0x14
push 1
call fcn.004aef38
test al, al
jne 0x502ce1
mov eax, dword [esi + 0x70]
mov ecx, dword [esi + 0x24]
mov dword [esi + 0x44], eax
push eax
lea eax, [esi + 0x10]
push eax
call fcn.00407ce2
mov eax, dword [esi + 0x48]
cmp dword [esi + 0x10], eax
lea edi, [esi + 0x7c]
jne 0x502c59
xor eax, eax
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
lea eax, [esi + 0x14]
mov dword [esi + 0x10], eax
mov edx, dword [esi + 0x44]
mov dword [esi + 0x2c], edx
mov dword [esi + 0xf8], 0xe
mov ecx, dword [esi + 0x24]
lea eax, [esi + 8]
push eax
lea eax, [esi + 0x2c]
push eax
push 0x743f60
push edx
lea eax, [esi + 0xbc]
push eax
call fcn.00505e90
mov ebx, dword [esi + 0xbc]
lea edi, [ebx + 0x24]
lea eax, [ebx + 0x28]
mov dword [esi + 0xa8], eax
mov ecx, edi
push dword [ebx + 0x28]
call fcn.00406bb2
mov eax, dword [esi + 0x10]
mov dword [ebx + 0x24], eax
mov eax, dword [esi + 0x14]
mov dword [ebx + 0x28], eax
mov ecx, dword [esi + 0x18]
mov dword [ebx + 0x2c], ecx
test ecx, ecx
je 0x502c45
mov ecx, dword [esi + 0xa8]
mov dword [eax + 8], ecx
lea eax, [esi + 0x14]
mov dword [esi + 0x10], eax
xor eax, eax
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
jmp 0x502c4d
mov ecx, dword [esi + 0xa8]
mov dword [edi], ecx
lea ecx, [esi + 0x10]
lea edi, [esi + 0x7c]
push eax
call fcn.00406bb2
mov dword [esi + 0xf8], 0xd
lea ecx, [esi + 0x10]
push 0
push edi
call fcn.004aece0
mov edx, dword [esi + 0x44]
mov dword [esi + 0x2c], edx
mov dword [esi + 0xf8], 0xf
mov ecx, dword [esi + 0x24]
lea eax, [esi + 8]
push eax
lea eax, [esi + 0x2c]
push eax
push 0x743f60
push edx
lea eax, [esi + 0xbc]
push eax
call fcn.00505e90
mov edx, dword [esi + 0x44]
add edx, 0x14
mov ecx, dword [esi + 0xbc]
add ecx, 0x24
mov dword [esi + 0x2c], edx
lea eax, [esi + 8]
push eax
lea eax, [esi + 0x2c]
push eax
push 0x743f60
push edx
lea eax, [esi + 0xbc]
push eax
call fcn.00506014
mov ecx, dword [esi + 0xbc]
add ecx, 0x24
lea eax, [esi + 0x10]
push eax
call fcn.004af61c
lea ecx, [esi + 0x10]
call fcn.004aeec0
cmp byte [esi + 0xbb], 0
jns 0x502cf8
push dword [esi + 0xb0]
call fcn.006c90e6
add esp, 4
lea ecx, [esi + 0x70]
call fcn.004a80fe
cmp byte [esi + 0x87], 0
mov ebx, dword [esi + 0x40]
jns 0x502d17
push dword [esi + 0x7c]
call fcn.006c90e6
add esp, 4
cmp byte [esi + 0x3b], 0
jns 0x502d28
push dword [esi + 0x30]
call fcn.006c90e6
add esp, 4
add ebx, 0xc
jmp 0x5029e0
lea ecx, [esi + 0xdc]
call fcn.0040db98
lea ecx, [esi + 0x90]
call fcn.004aeec0
lea ebx, [esi + 0x50]
mov ecx, ebx
call fcn.004aeec0
cmp byte [esi + 0xcf], 0
jns 0x502d71
push dword [esi + 0xc4]
call fcn.006c90e6
add esp, 4
mov dword [esi + 0xf8], 2
lea ecx, [esi + 0xd4]
call fcn.004ed9ee
xor eax, eax
dec eax
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], eax
mov dword [esi + 0x58], eax
mov dword [esi + 0xf8], 2
mov ecx, edi
push ebx
call fcn.005031b0
mov dword [esi + 0xf8], 3
mov ecx, dword [esi + 0xac]
lea eax, [esi + 0x50]
push eax
call fcn.00501d30
sub esp, 0x78
movdqu xmm0, xmmword [0x7a9568]
movdqu xmmword [esp + 0x68], xmm0
movdqu xmmword [esp + 0x58], xmm0
movdqu xmmword [esp + 0x48], xmm0
movdqu xmmword [esp + 0x38], xmm0
movdqu xmmword [esp + 0x28], xmm0
movdqu xmmword [esp + 0x18], xmm0
mov dword [esp + 0x14], str.CommandMgr_construct_finish
mov dword [esp + 0x10], str.XPluginCommandMgr
mov dword [esp + 0xc], str.CommandMgr
mov dword [esp + 8], 0x122
mov dword [esp + 4], str..._.._applet_third_party_xplugin_src_CommandMgr.cpp
mov dword [esp], 2
call fcn.004ee380
add esp, 0x78
lea ecx, [esi + 0x50]
push dword [ecx + 4]
call fcn.004a7d38
jmp 0x502eb2
mov eax, 4
mov dword [esi + 0xf8], eax
sub esp, 0x78
movdqu xmm0, xmmword [0x7a9568]
movdqu xmmword [esp + 0x68], xmm0
movdqu xmmword [esp + 0x58], xmm0
movdqu xmmword [esp + 0x48], xmm0
movdqu xmmword [esp + 0x38], xmm0
movdqu xmmword [esp + 0x28], xmm0
movdqu xmmword [esp + 0x18], xmm0
mov dword [esp], eax
mov dword [esp + 0x14], str.CommandMgr_construct_failed__mmkv_is_null
mov dword [esp + 0x10], str.XPluginCommandMgr
mov dword [esp + 0xc], str.CommandMgr
mov dword [esp + 8], 0xf4
mov dword [esp + 4], str..._.._applet_third_party_xplugin_src_CommandMgr.cpp
call fcn.004ee380
add esp, 0x78
push 1
push 2
push 0x69a
call fcn.00506400
add esp, 0xc
lea ecx, [esi + 0xd4]
call fcn.004ed9ee
mov eax, dword [esi + 0xf0]
mov dword fs:[0], eax
mov eax, dword [esi + 0xc]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret