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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffedc
push ebx
mov dword [ebp - 4], eax
push 0x105
lea eax, [ebp - 0x121]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov byte [ebp - 0x12], 0
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x51005ab4
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x510058f2
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x51005ab4
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x510058f2
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x51005ad0
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x5100597b
xor eax, eax
push ebp
push 0x51005974
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 5
lea eax, [ebp - 0x121]
mov edx, 0x105
call fcn.51005698
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
lea eax, [ebp - 0x121]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x51005959
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
push 0x51005af0
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x51005959
mov byte [ebp - 0x12], 0
mov byte [ebp - 0xe], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5100597b
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 - 0x121]
push eax
call sub.kernel32.dll_lstrcpynA
push 5
lea eax, [ebp - 0xd]
push eax
push 3
call sub.kernel32.dll_GetThreadLocale
push eax
call sub.kernel32.dll_GetLocaleInfoA
xor ebx, ebx
cmp byte [ebp - 0x121], 0
je 0x51005aab
cmp byte [ebp - 0xd], 0
jne 0x510059c2
cmp byte [ebp - 0x12], 0
je 0x51005aab
lea eax, [ebp - 0x121]
push eax
call sub.kernel32.dll_lstrlenA
lea edx, [ebp - 0x121]
add eax, edx
mov dword [ebp - 0x1c], eax
jmp 0x510059de
dec dword [ebp - 0x1c]
mov eax, dword [ebp - 0x1c]
cmp byte [eax], 0x2e
je 0x510059f1
lea eax, [ebp - 0x121]
cmp eax, dword [ebp - 0x1c]
jne 0x510059db
lea eax, [ebp - 0x121]
cmp eax, dword [ebp - 0x1c]
je 0x51005aab
inc dword [ebp - 0x1c]
cmp byte [ebp - 0x12], 0
je 0x51005a35
mov edx, dword [ebp - 0x1c]
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0x12]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x121]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov ebx, eax
test ebx, ebx
jne 0x51005aab
cmp byte [ebp - 0xd], 0
je 0x51005aab
lea eax, [ebp - 0x121]
mov edx, dword [ebp - 0x1c]
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x121]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov ebx, eax
test ebx, ebx
jne 0x51005aab
mov byte [ebp - 0xb], 0
lea eax, [ebp - 0x121]
mov edx, dword [ebp - 0x1c]
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x121]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov ebx, eax
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret