Function at 0x10016708
Capabilities:
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
xor esi, esi
push str.GetThreadPreferredUILanguages
push str.Kernel32.dll
mov dword [ebp - 4], esi
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x14], eax
test ecx, ecx
je 0x1001678e
cmp word [ecx], si
je 0x1001678e
lea eax, [ebp - 4]
push eax
push ecx
push edi
call fcn.10016b67
mov esi, eax
test esi, esi
js 0x10016a6d
lea eax, [ebp - 4]
push eax
push ebx
push dword [ebp - 4]
call fcn.10016b67
mov esi, eax
test esi, esi
js 0x10016a6d
push 0
push dword [ebp - 4]
call fcn.1001c7b3
test eax, eax
jne 0x10016a5a
mov eax, dword [ebp - 0x14]
xor esi, esi
cmp dword [ebp + 0x18], 0
je 0x100168e1
test eax, eax
je 0x100168d9
lea ecx, [ebp + 0xc]
mov dword [ebp + 0xc], esi
push ecx
push esi
lea ecx, [ebp + 0x10]
push ecx
push 0x34
call eax
test eax, eax
jne 0x100167e4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x100167cb
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x100167d2
mov esi, 0x80004005
push esi
push 0x5f
push str.locutil.cpp
call fcn.100098f0
jmp 0x10016a5a
push dword [ebp + 0xc]
lea eax, [ebp - 0x10]
push eax
call fcn.1001762e
mov esi, eax
test esi, esi
js 0x10016a6d
and dword [ebp + 0x10], 0
lea eax, [ebp + 0xc]
push eax
push dword [ebp - 0x10]
lea eax, [ebp + 0x10]
push eax
push 0x34
call dword [ebp - 0x14]
test eax, eax
jne 0x10016835
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x10016829
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x10016830
mov esi, 0x80004005
push esi
push 0x69
jmp 0x100167d5
and dword [ebp + 8], 0
cmp dword [ebp + 0x10], 0
mov ecx, dword [ebp - 0x10]
mov dword [ebp + 0x18], ecx
jbe 0x100168d9
push 2
lea eax, [ebp - 8]
push eax
push ecx
call fcn.100179b8
mov esi, eax
test esi, esi
js 0x10016a6d
mov ecx, dword [ebp - 8]
mov eax, ecx
shr eax, 8
movzx edx, al
movzx eax, cl
shl ax, 8
or dx, ax
movzx eax, dx
push ebx
push eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push str._u_ls
push eax
call fcn.10017659
mov esi, eax
add esp, 0x10
test esi, esi
js 0x10016a6d
lea eax, [ebp - 4]
push eax
push dword [ebp - 0xc]
push edi
call fcn.10016b67
mov esi, eax
test esi, esi
js 0x10016a6d
push 0
push dword [ebp - 4]
call fcn.1001c7b3
test eax, eax
jne 0x10016a5a
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x18]
inc eax
add ecx, 0xa
mov dword [ebp + 8], eax
mov dword [ebp + 0x18], ecx
cmp eax, dword [ebp + 0x10]
jb 0x10016849
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
jmp 0x100168e7
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
movzx eax, ax
mov dword [ebp - 8], eax
push ebx
movzx eax, ax
push eax
lea eax, [ebp - 0xc]
push str._u_ls
push eax
call fcn.10017659
mov esi, eax
add esp, 0x10
test esi, esi
js 0x10016a6d
lea eax, [ebp - 4]
push eax
push dword [ebp - 0xc]
push edi
call fcn.10016b67
mov esi, eax
test esi, esi
js 0x10016a6d
push 0
push dword [ebp - 4]
call fcn.1001c7b3
test eax, eax
jne 0x10016a5a
mov eax, dword [ebp - 8]
and eax, 0x3ff
or eax, 0x400
cmp ax, word [ebp - 8]
je 0x10016995
movzx eax, ax
push ebx
push eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push str._u_ls
push eax
call fcn.10017659
mov esi, eax
add esp, 0x10
test esi, esi
js 0x10016a6d
lea eax, [ebp - 4]
push eax
push dword [ebp - 0xc]
push edi
call fcn.10016b67
mov esi, eax
test esi, esi
js 0x10016a6d
push 0
push dword [ebp - 4]
call fcn.1001c7b3
test eax, eax
jne 0x10016a5a
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultUILanguage]
movzx eax, ax
push ebx
push eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push str._u_ls
push eax
call fcn.10017659
mov esi, eax
add esp, 0x10
test esi, esi
js 0x10016a6d
lea eax, [ebp - 4]
push eax
push dword [ebp - 0xc]
push edi
call fcn.10016b67
mov esi, eax
test esi, esi
js 0x10016a6d
push 0
push dword [ebp - 4]
call fcn.1001c7b3
test eax, eax
jne 0x10016a5a
mov eax, dword [ebp - 8]
and eax, 0x3ff
or eax, 0x400
cmp ax, word [ebp - 8]
je 0x10016a36
movzx eax, ax
push ebx
push eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push str._u_ls
push eax
call fcn.10017659
mov esi, eax
add esp, 0x10
test esi, esi
js 0x10016a6d
lea eax, [ebp - 4]
push eax
push dword [ebp - 0xc]
push edi
call fcn.10016b67
mov esi, eax
test esi, esi
js 0x10016a6d
push 0
push dword [ebp - 4]
call fcn.1001c7b3
test eax, eax
jne 0x10016a5a
lea eax, [ebp - 4]
push eax
push ebx
push edi
call fcn.10016b67
mov esi, eax
test esi, esi
js 0x10016a6d
push 0
push dword [ebp - 4]
call fcn.1001c7b3
test eax, eax
jne 0x10016a5a
mov esi, 0x80070002
test esi, esi
js 0x10016a6d
push 0
push dword [ebp - 4]
push dword [ebp + 0x14]
call fcn.1001772a
mov esi, eax
cmp dword [ebp - 0xc], 0
je 0x10016a7b
push dword [ebp - 0xc]
call fcn.100179af
cmp dword [ebp - 4], 0
je 0x10016a89
push dword [ebp - 4]
call fcn.100179af
cmp dword [ebp - 0x10], 0
je 0x10016a97
push dword [ebp - 0x10]
call fcn.100179af
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14