Function at 0x51c266
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x15c
mov eax, dword [0x816078]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
or eax, 0xffffffff
mov dword [ebp - 0x15c], edx
push edi
push 0xaa
mov dword [ebp - 0x150], eax
xor ebx, ebx
mov dword [ebp - 0x154], eax
mov esi, ecx
mov dword [ebp - 0x158], eax
lea eax, [ebp - 0x148]
push ebx
push eax
call fcn.0064f890
add esp, 0xc
test esi, esi
jne 0x51c2be
mov eax, 0x8ff00003
jmp 0x51c5c7
mov ecx, 0xc00
cmp dword [esi + 8], ecx
jne 0x51c2e1
push ebx
push 0x55
lea eax, [ebp - 0x148]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_LCIDToLocaleName]
lea edi, [ebp - 0x148]
jmp 0x51c2e4
mov edi, dword [esi + 4]
xor eax, eax
lea edx, [ebp - 0x18]
push ecx
mov word [ebp - 0x64], ax
mov word [ebp - 0x84], ax
mov word [ebp - 0x98], ax
mov word [ebp - 0x2c], ax
mov word [ebp - 0x40], ax
mov word [ebp - 0x18], ax
lea eax, [ebp - 0x98]
push eax
push ecx
lea eax, [ebp - 0x2c]
push eax
push ecx
lea eax, [ebp - 0x40]
push eax
push ecx
mov ecx, edi
call fcn.0051d35c
mov byte [ebp - 0x14c], al
xor eax, eax
cmp ax, word [ebp - 0x18]
jne 0x51c35d
push 9
lea eax, [ebp - 0x18]
push eax
push 0x59
push edi
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
test eax, eax
je 0x51c35d
mov eax, dword [ebp - 0x14c]
xor ecx, ecx
cmp cx, word [ebp - 0x18]
push 1
movzx eax, al
pop ecx
cmovne eax, ecx
mov dword [ebp - 0x14c], eax
xor eax, eax
cmp ax, word [ebp - 0x2c]
jne 0x51c38f
push 9
lea eax, [ebp - 0x2c]
push eax
push 0x5a
push edi
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
test eax, eax
mov eax, dword [ebp - 0x14c]
je 0x51c395
xor ecx, ecx
movzx eax, al
cmp cx, word [ebp - 0x2c]
push 1
pop edi
cmovne eax, edi
jmp 0x51c398
mov eax, dword [ebp - 0x14c]
xor edi, edi
inc edi
test al, al
je 0x51c598
lea ecx, [ebp - 0x18]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x51c3a6
sub ecx, edx
sar ecx, 1
je 0x51c3c8
push ebx
push ebx
push edi
lea edx, [ebp - 0x150]
lea ecx, [ebp - 0x18]
call fcn.0051d5ac
mov eax, dword [ebp - 0x150]
lea edx, [ebp - 0x18]
cmp eax, dword [esi]
push 0xffffffffffffffff
pop ecx
cmove eax, ecx
lea ecx, [edx + 2]
mov dword [ebp - 0x150], eax
mov ax, word [edx]
add edx, 2
cmp ax, bx
jne 0x51c3e2
sub edx, ecx
sar edx, 1
je 0x51c45b
lea ecx, [ebp - 0x40]
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x51c3f9
sub ecx, edi
sar ecx, 1
je 0x51c45b
push edx
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x64]
push 0x12
push eax
call fcn.006708b9
xor edi, edi
lea eax, [ebp - 0x64]
inc edi
push edi
push 0x768808
push 0x12
push eax
call fcn.0067b2c2
lea ecx, [ebp - 0x40]
add esp, 0x20
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x51c437
sub ecx, edx
lea eax, [ebp - 0x40]
sar ecx, 1
push ecx
push eax
lea eax, [ebp - 0x64]
push 0x12
push eax
call fcn.0067b2c2
add esp, 0x10
jmp 0x51c45e
xor edi, edi
inc edi
lea ecx, [ebp - 0x64]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x51c464
sub ecx, edx
sar ecx, 1
je 0x51c486
push ebx
push ebx
push edi
lea edx, [ebp - 0x154]
lea ecx, [ebp - 0x64]
call fcn.0051d5ac
mov edx, dword [ebp - 0x154]
lea ecx, [ebp - 0x2c]
mov edi, dword [esi]
cmp edx, edi
push 0xffffffffffffffff
pop eax
cmove edx, eax
lea eax, [ecx + 2]
mov dword [ebp - 0x154], edx
mov dword [ebp - 0x14c], eax
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x51c4a8
sub ecx, dword [ebp - 0x14c]
sar ecx, 1
je 0x51c51c
push 7
push str.x_none_
lea eax, [ebp - 0x84]
push 0x10
push eax
call fcn.006708b9
lea ecx, [ebp - 0x2c]
add esp, 0x10
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x51c4db
sub ecx, edx
lea eax, [ebp - 0x2c]
sar ecx, 1
push ecx
push eax
lea eax, [ebp - 0x84]
push 0x10
push eax
call fcn.0067b2c2
add esp, 0x10
lea edx, [ebp - 0x158]
lea ecx, [ebp - 0x84]
push ebx
push ebx
push ebx
call fcn.0051d5ac
mov edi, dword [esi]
mov edx, dword [ebp - 0x154]
mov eax, dword [ebp - 0x158]
cmp eax, edi
push 0xffffffffffffffff
pop edi
cmove eax, edi
mov dword [ebp - 0x158], eax
cmp dword [ebp - 0x150], edi
jne 0x51c540
cmp eax, edi
jne 0x51c540
cmp edx, edi
je 0x51c58f
mov eax, dword [esi + 0x10]
cmp edx, edi
mov ecx, dword [ebp - 0x150]
cmovne ecx, edx
mov dword [eax + 0x10], ecx
mov ecx, dword [esi + 0x10]
mov eax, dword [ebp - 0x158]
mov dword [ecx + 0x14], eax
mov ecx, edi
cmp dword [ebp - 0x154], edi
mov eax, dword [ebp - 0x150]
cmovne eax, dword [ebp - 0x154]
cmp dword [esi + 4], ebx
cmovne ecx, eax
mov eax, dword [esi + 0x10]
mov dword [eax], ecx
mov eax, dword [esi + 0x10]
mov dword [eax + 4], edi
mov eax, dword [esi + 0x10]
mov dword [eax + 8], edi
mov eax, dword [esi + 0x10]
mov dword [eax + 0xc], edi
or dword [esi + 0x20], 0x1f8
jmp 0x51c59b
or edi, 0xffffffff
mov eax, dword [esi + 0x10]
mov ecx, dword [ebp - 0x15c]
mov eax, dword [eax + ecx*4]
cmp eax, edi
je 0x51c5b6
test eax, eax
je 0x51c5b6
xor ecx, ecx
inc ecx
cmp eax, ecx
jne 0x51c5bb
xor eax, eax
lea ebx, [eax + 1]
xor ecx, ecx
mov eax, 0x80004005
test bl, bl
cmove eax, ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0064c681
mov esp, ebp
pop ebp
ret