Function at 0x40ef70
Capabilities:
Identify system language via api
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4556a8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x128
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x10], edi
mov ecx, dword [ebp + 0x18]
lea eax, [ebp - 0x10]
push edi
push eax
push ecx
mov byte [ebp - 4], 1
call fcn.0040f380
mov esi, eax
add esp, 0xc
cmp esi, edi
jl 0x40efce
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x14]
push ecx
mov ecx, dword [ebp + 0x20]
mov edx, dword [eax]
push ecx
mov ecx, dword [ebp + 0x1c]
push ecx
push eax
call dword [edx + 0x48]
mov esi, eax
mov eax, dword [ebp - 0x10]
mov byte [ebp - 4], 0
cmp eax, edi
je 0x40efdf
mov edx, dword [eax]
push eax
call dword [edx + 8]
cmp esi, edi
jne 0x40f2cf
mov eax, dword [ebp - 0x14]
lea edx, [ebp - 0x18]
push edi
push edx
mov ecx, dword [eax]
push 1
push eax
mov byte [ebp + 0x1b], 0
call dword [ecx + 0xc]
test eax, eax
jne 0x40f2d9
mov dword [ebp + 0x20], edi
lea eax, [ebp - 0x134]
mov byte [ebp - 4], 2
push eax
xor esi, esi
mov dword [ebp - 0x134], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x40f1cb
cmp dword [ebp - 0x124], 2
je 0x40f0cb
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x24], 0x20
push ecx
push 0x20019
push edi
push str..DefaultControl_PaneldesktopResourceLocale
push 0x80000003
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, edi
jle 0x40f069
and eax, 0xffff
or eax, 0x80070000
cmp eax, edi
jl 0x40f1d1
mov ecx, dword [ebp - 0x10]
lea edx, [ebp - 0x24]
lea eax, [ebp - 0x60]
push edx
push eax
push edi
push edi
push 0x46c22c
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, edi
jle 0x40f096
and eax, 0xffff
or eax, 0x80070000
mov edx, dword [ebp - 0x10]
mov esi, eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, edi
jl 0x40f1d1
push 0x10
lea eax, [ebp - 0x60]
push edi
push eax
call fcn.00428ebd
add esp, 0xc
mov esi, eax
cmp si, di
je 0x40f1d1
mov eax, esi
jmp 0x40f1d7
mov ecx, dword [ebp - 0x130]
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x2c], ecx
fild qword [ebp - 0x2c]
fcomp qword [0x456500]
fnstsw ax
test ah, 1
jne 0x40f128
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
cmp ebx, edi
je 0x40f1cb
push str.GetUserDefaultUILanguage
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, edi
je 0x40f119
call eax
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x40f0bb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x40f0bb
lea edx, [ebp - 0x1c]
mov dword [ebp - 0x20], 0x40
push edx
push 0x20019
push edi
push str..DEFAULTControl_PanelInternational
push 0x80000003
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, edi
jle 0x40f159
and eax, 0xffff
or eax, 0x80070000
cmp eax, edi
jl 0x40f1d1
mov edx, dword [ebp - 0x1c]
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0xa0]
push eax
push ecx
push edi
push edi
push str.Locale
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, edi
jle 0x40f185
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, edi
jl 0x40f1d1
push 0x10
lea ecx, [ebp - 0xa0]
push edi
push ecx
call fcn.00428cff
mov esi, eax
add esp, 0xc
cmp si, 0x401
je 0x40f1c2
cmp si, 0x40d
je 0x40f1c2
cmp si, 0x41e
jne 0x40f0bb
mov esi, 0x409
mov eax, esi
jmp 0x40f1d7
call dword [sym.imp.KERNEL32.dll_GetLastError]
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
mov esi, dword [ebp - 0x18]
and eax, 0xffff
lea edx, [ebp - 0x40]
push eax
push edx
call fcn.0040f320
mov eax, dword [esi]
add esp, 8
lea ecx, [ebp + 0x20]
lea edx, [ebp - 0x40]
push ecx
push edx
push esi
call dword [eax + 0x18]
cmp eax, 0x8004503a
jne 0x40f20c
mov eax, dword [esi]
lea ecx, [ebp + 0x20]
push ecx
push edi
push esi
call dword [eax + 0x18]
cmp eax, edi
mov dword [ebp + 0x1c], eax
jl 0x40f29c
mov eax, dword [ebp + 0x20]
cmp eax, edi
mov ebx, eax
jne 0x40f224
xor esi, esi
jmp 0x40f253
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and al, 0xfc
call fcn.004290e0
mov esi, esp
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push ebx
push 0
push 0
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edx, dword [ebp + 8]
mov ebx, dword [ebp + 0x14]
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
push esi
push 0
push edx
push ebx
call edi
mov esi, eax
cmp esi, 0xffffffff
je 0x40f295
cmp esi, 0xfffffffe
je 0x40f295
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 0xc]
push eax
push esi
push ecx
push ebx
call edi
mov al, byte [ebp + 0x1b]
test al, al
jne 0x40f2a5
mov edx, dword [ebp + 0x10]
push 0
push esi
push edx
push ebx
call edi
mov byte [ebp + 0x1b], 1
jmp 0x40f2a5
mov dword [ebp + 0x1c], 0x8007000e
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov edx, dword [ebp + 0x20]
mov byte [ebp - 4], 0
push edx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, dword [ebp - 0x14]
xor edi, edi
lea edx, [ebp - 0x18]
push edi
mov ecx, dword [eax]
push edx
push 1
push eax
call dword [ecx + 0xc]
test eax, eax
je 0x40f003
jmp 0x40f2d6
mov dword [ebp + 0x1c], 0x80045039
mov esi, dword [ebp + 0x1c]
mov eax, dword [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
cmp eax, edi
je 0x40f2ed
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ecx, dword [ebp - 0xc]
lea esp, [ebp - 0x140]
mov eax, esi
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret