Function at 0x406794
Capabilities:
Get geographical location
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdd4
push ebx
push esi
mov dword [ebp - 4], eax
push 0x105
lea eax, [ebp - 0x22a]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameW
mov word [ebp - 0x1c], 0
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x406a14
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
je 0x406837
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x406a14
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
je 0x406837
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x406a48
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
je 0x406837
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x406a7c
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
jne 0x4068cf
xor eax, eax
push ebp
push 0x4068c8
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x20], 0xa
lea eax, [ebp - 0x22a]
mov edx, 0x105
call fcn.00406598
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
push 0
push 0
lea eax, [ebp - 0x22a]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExW
test eax, eax
je 0x4068a0
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
push 0
push 0
push 0x406abc
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExW
test eax, eax
je 0x4068a0
mov word [ebp - 0x1c], 0
mov eax, dword [ebp - 0x20]
sar eax, 1
jns 0x4068aa
adc eax, 0
mov word [ebp + eax*2 - 0x1c], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4068cf
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegCloseKey
ret
push 0x105
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x22a]
push eax
call sub.kernel32.dll_lstrcpynW
push 5
lea eax, [ebp - 0x12]
push eax
push 3
call sub.kernel32.dll_GetThreadLocale
push eax
call sub.kernel32.dll_GetLocaleInfoW
xor esi, esi
cmp word [ebp - 0x22a], 0
je 0x406a0c
cmp word [ebp - 0x12], 0
jne 0x406919
cmp word [ebp - 0x1c], 0
je 0x406a0c
lea eax, [ebp - 0x22a]
push eax
call sub.kernel32.dll_lstrlenW
mov ebx, eax
add ebx, ebx
lea eax, [ebp - 0x22a]
add ebx, eax
jmp 0x406936
sub ebx, 2
cmp word [ebx], 0x2e
je 0x406946
lea eax, [ebp - 0x22a]
cmp ebx, eax
jne 0x406933
lea eax, [ebp - 0x22a]
cmp ebx, eax
je 0x406a0c
add ebx, 2
cmp word [ebp - 0x1c], 0
je 0x40698d
mov edx, ebx
sub edx, eax
sar edx, 1
jns 0x406969
adc edx, 0
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0x1c]
push eax
push ebx
call sub.kernel32.dll_lstrcpynW
push 2
push 0
lea eax, [ebp - 0x22a]
push eax
call sub.kernel32.dll_LoadLibraryExW
mov esi, eax
test esi, esi
jne 0x406a0c
cmp word [ebp - 0x12], 0
je 0x406a0c
lea eax, [ebp - 0x22a]
mov edx, ebx
sub edx, eax
sar edx, 1
jns 0x4069a9
adc edx, 0
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0x12]
push eax
push ebx
call sub.kernel32.dll_lstrcpynW
push 2
push 0
lea eax, [ebp - 0x22a]
push eax
call sub.kernel32.dll_LoadLibraryExW
mov esi, eax
test esi, esi
jne 0x406a0c
mov word [ebp - 0xe], 0
lea eax, [ebp - 0x22a]
mov edx, ebx
sub edx, eax
sar edx, 1
jns 0x4069e8
adc edx, 0
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0x12]
push eax
push ebx
call sub.kernel32.dll_lstrcpynW
push 2
push 0
lea eax, [ebp - 0x22a]
push eax
call sub.kernel32.dll_LoadLibraryExW
mov esi, eax
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret