Function at 0x406940
Capabilities:
Access peb ldr_data
Get geographical location
Get number of processors
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x47787e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x218
mov eax, dword [0x4bb344]
push ebx
push esi
mov esi, ecx
push edi
mov dword [esp + 0x21c], eax
mov dword [esp + 0xc], esi
mov dword [esi], 0x496c28
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
push 0x10
mov dword [esi + 4], eax
call dword [sym.imp.KERNEL32.dll_GetUserGeoID]
mov dword [esi + 8], eax
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
mov word [esi + 0xc], ax
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultLangID]
mov word [esi + 0xe], ax
xor ebx, ebx
mov eax, 7
mov dword [esi + 0x28], eax
mov dword [esi + 0x24], ebx
mov word [esi + 0x14], bx
mov dword [esi + 0x44], eax
mov dword [esi + 0x40], ebx
mov dword [esp + 0x22c], ebx
mov word [esi + 0x30], bx
mov dword [esi + 0x60], eax
mov dword [esi + 0x5c], ebx
mov word [esi + 0x4c], bx
mov dword [esi + 0x7c], eax
mov dword [esi + 0x78], ebx
mov word [esi + 0x68], bx
mov dword [esi + 0x98], eax
mov dword [esi + 0x94], ebx
mov word [esi + 0x84], bx
mov dword [esi + 0xb4], eax
mov dword [esi + 0xb0], ebx
mov word [esi + 0xa0], bx
mov dword [esi + 0xd0], eax
mov dword [esi + 0xcc], ebx
mov word [esi + 0xbc], bx
mov dword [esi + 0xec], eax
mov dword [esi + 0xe8], ebx
mov word [esi + 0xd8], bx
mov dword [esi + 0x108], eax
mov dword [esi + 0x104], ebx
mov word [esi + 0xf4], bx
lea edi, [esi + 0x114]
mov ecx, edi
mov byte [esp + 0x22c], 8
mov dword [esi + 0x10c], ebx
mov dword [esi + 0x110], ebx
call fcn.004044b0
mov dword [edi + 4], eax
mov byte [eax + 0x45], 1
mov eax, dword [edi + 4]
mov dword [eax + 4], eax
mov eax, dword [edi + 4]
mov dword [eax], eax
mov eax, dword [edi + 4]
mov dword [eax + 8], eax
mov dword [edi + 8], ebx
mov word [esp + 0x10], bx
xor eax, eax
mov ecx, 0x81
lea edi, [esp + 0x12]
rep stosd dword es:[edi], eax
mov ecx, esi
mov byte [esp + 0x22c], 9
stosw word es:[edi], ax
call fcn.004040f0
mov eax, dword [esi + 0x10c]
cmp eax, ebx
je 0x406abd
xor ecx, ecx
mov cx, word [esi + 0xc]
lea edx, [esp + 0x10]
push ecx
mov ecx, dword [esi + 8]
push 0x103
push edx
push 6
push ecx
call eax
jmp 0x406ae5
push str.en_us
call fcn.0044e2fd
add esp, 4
cmp eax, 0x103
jge 0x406ae5
push str.en_us
push 0x103
lea edx, [esp + 0x18]
push edx
call fcn.00404280
lea eax, [esp + 0x10]
push eax
call fcn.0044e7b4
lea ecx, [esp + 0x14]
push ecx
call fcn.0044e2fd
add esp, 8
push eax
lea edx, [esp + 0x14]
push edx
lea ecx, [esi + 0x64]
call fcn.00404cf0
mov eax, dword [esi + 0x10c]
cmp eax, ebx
mov word [esp + 0x10], bx
je 0x406b34
xor ecx, ecx
mov cx, word [esi + 0xe]
lea edx, [esp + 0x10]
push ecx
mov ecx, dword [esi + 8]
push 0x103
push edx
push 6
push ecx
call eax
jmp 0x406b5c
push str.en_us
call fcn.0044e2fd
add esp, 4
cmp eax, 0x103
jge 0x406b5c
push str.en_us
push 0x103
lea edx, [esp + 0x18]
push edx
call fcn.00404280
lea eax, [esp + 0x10]
push eax
call fcn.0044e7b4
lea ecx, [esp + 0x14]
push ecx
call fcn.0044e2fd
add esp, 8
push eax
lea edx, [esp + 0x14]
push edx
lea ecx, [esi + 0x80]
call fcn.00404cf0
mov eax, dword [esi + 0x10c]
cmp eax, ebx
mov word [esp + 0x10], bx
je 0x406bae
xor ecx, ecx
mov cx, word [esi + 0xc]
lea edx, [esp + 0x10]
push ecx
mov ecx, dword [esi + 8]
push 0x103
push edx
push 9
push ecx
call eax
jmp 0x406bd6
push str._indeterminate_
call fcn.0044e2fd
add esp, 4
cmp eax, 0x103
jge 0x406bd6
push str._indeterminate_
push 0x103
lea edx, [esp + 0x18]
push edx
call fcn.00404280
lea eax, [esp + 0x10]
push eax
call fcn.0044e2fd
add esp, 4
push eax
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esi + 0x9c]
call fcn.00404cf0
mov eax, dword [esi + 0x10c]
cmp eax, ebx
mov word [esp + 0x10], bx
je 0x406c1e
xor edx, edx
mov dx, word [esi + 0xc]
lea ecx, [esp + 0x10]
push edx
mov edx, dword [esi + 8]
push 0x103
push ecx
push 4
push edx
call eax
jmp 0x406c45
push 0x496b64
call fcn.0044e2fd
add esp, 4
cmp eax, 0x103
jge 0x406c45
push 0x496b64
mov edx, 0x103
lea ecx, [esp + 0x14]
call fcn.00404490
lea eax, [esp + 0x10]
push eax
call fcn.0044e2fd
add esp, 4
push eax
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esi + 0xb8]
call fcn.00404cf0
mov eax, dword [esi + 4]
mov edi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
push 0x103
lea edx, [esp + 0x14]
push edx
push 0x1f
push eax
mov word [esp + 0x20], bx
call edi
lea ecx, [esp + 0x10]
push ecx
call fcn.0044e2fd
add esp, 4
push eax
lea edx, [esp + 0x14]
push edx
lea ecx, [esi + 0xd4]
call fcn.00404cf0
mov ecx, dword [esi + 4]
push 0x103
lea eax, [esp + 0x14]
push eax
push 0x20
push ecx
mov word [esp + 0x20], bx
call edi
lea edx, [esp + 0x10]
push edx
call fcn.0044e2fd
add esp, 4
push eax
lea eax, [esp + 0x14]
push eax
lea ecx, [esi + 0xf0]
call fcn.00404cf0
mov ecx, dword [esp + 0x224]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x21c]
mov eax, esi
call fcn.0044de14
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret