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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x444b08
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.004093a0
mov esi, eax
add esp, 0xc
cmp esi, edi
jl 0x40cf8e
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 0x40cf9f
mov edx, dword [eax]
push eax
call dword [edx + 8]
cmp esi, edi
jne 0x40d297
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 0x40d2a1
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 0x40d193
cmp dword [ebp - 0x124], 2
je 0x40d08f
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x24], 0x20
push ecx
push 0x20019
push edi
push str..DefaultControl_PaneldesktopResourceLocale
push SysStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, edi
je 0x40d02f
and eax, 0xffff
or eax, 0x80070000
cmp eax, edi
jl 0x40d199
mov ecx, dword [ebp - 0x10]
lea edx, [ebp - 0x24]
lea eax, [ebp - 0x60]
push edx
push eax
push edi
push edi
push 0x45ede0
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, edi
je 0x40d05a
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
jmp 0x40d05c
xor esi, esi
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, edi
jl 0x40d199
push 0x10
lea eax, [ebp - 0x60]
push edi
push eax
call fcn.0041650b
add esp, 0xc
mov esi, eax
cmp si, di
je 0x40d199
mov eax, esi
jmp 0x40d19f
mov ecx, dword [ebp - 0x130]
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x2c], ecx
fild qword [ebp - 0x2c]
fcomp qword [0x449030]
fnstsw ax
test ah, 1
jne 0x40d0ec
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
cmp ebx, edi
je 0x40d193
push str.GetUserDefaultUILanguage
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, edi
je 0x40d0dd
call eax
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x40d07f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x40d07f
lea edx, [ebp - 0x1c]
mov dword [ebp - 0x20], 0x40
push edx
push 0x20019
push edi
push str..DEFAULTControl_PanelInternational
push SysStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, edi
je 0x40d11f
and eax, 0xffff
or eax, 0x80070000
cmp eax, edi
jl 0x40d199
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
je 0x40d14d
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
jmp 0x40d14f
xor esi, esi
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, edi
jl 0x40d199
push 0x10
lea ecx, [ebp - 0xa0]
push edi
push ecx
call fcn.0041634d
mov esi, eax
add esp, 0xc
cmp si, 0x401
je 0x40d18a
cmp si, 0x40d
je 0x40d18a
cmp si, 0x41e
jne 0x40d07f
mov esi, 0x409
mov eax, esi
jmp 0x40d19f
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.0040d2e0
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 0x40d1d4
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 0x40d264
mov eax, dword [ebp + 0x20]
cmp eax, edi
mov ebx, eax
jne 0x40d1ec
xor esi, esi
jmp 0x40d21b
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.00416210
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 0x40d25d
cmp esi, 0xfffffffe
je 0x40d25d
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 0x40d26d
mov edx, dword [ebp + 0x10]
push 0
push esi
push edx
push ebx
call edi
mov byte [ebp + 0x1b], 1
jmp 0x40d26d
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 0x40cfc3
jmp 0x40d29e
mov dword [ebp + 0x1c], 0x80045039
mov esi, dword [ebp + 0x1c]
mov eax, dword [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
cmp eax, edi
je 0x40d2b5
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