Function at 0x51b3c0
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x25c
mov eax, dword [0x816078]
xor eax, esp
mov dword [esp + 0x258], eax
push ebx
push esi
push edi
push ecx
mov edi, ecx
mov byte [esp + 0x18], 0
xor esi, esi
lea ecx, [esp + 0x48]
push 0x82a604
mov dword [esp + 0x28], esi
call fcn.00422bbb
test byte [edi + 0x20], 2
jne 0x51b71c
cmp dword [edi + 0x14], esi
je 0x51b418
push dword [edi + 0x14]
call fcn.0064e37d
and dword [edi + 0x14], esi
pop ecx
mov byte [edi + 0x1d], 0
push 0x100
lea eax, [esp + 0x64]
push eax
push 0x6c
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
push 4
pop ebx
cmp eax, ebx
jle 0x51b5b0
xor ebx, ebx
test eax, eax
push 5
cmovns ebx, eax
xor edx, edx
pop ecx
mov eax, ebx
mov dword [esp + 0x24], ebx
div ecx
xor ecx, ecx
push 4
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.006707e1
mov dword [edi + 0x14], eax
pop ecx
test eax, eax
jne 0x51b472
mov esi, 0x8007000e
jmp 0x51b71c
push 4
xor al, al
pop ecx
mov byte [esp + 0x13], al
cmp ebx, ecx
jbe 0x51b558
mov dword [esp + 0x1c], ecx
lea ebx, [esp + 0x60]
push 8
mov edx, ebx
pop ecx
sub ecx, edx
mov edx, dword [esp + 0x24]
mov dword [esp + 0x18], ecx
push 0x3b
pop eax
cmp ax, word [ebx + 8]
mov eax, dword [esp + 0x1c]
jne 0x51b542
lea eax, [ecx + ebx]
cmp eax, 0x200
jae 0x51b73c
xor eax, eax
lea edx, [esp + 0x28]
mov ecx, ebx
mov word [ebx + 8], ax
call fcn.0051cef1
mov esi, eax
mov dword [esp + 0x20], esi
test esi, esi
js 0x51b52e
cmp byte [edi + 0x1d], 0
jbe 0x51b51b
cmp byte [esp + 0x13], 1
jae 0x51b51b
push ebx
push 0x76880c
call fcn.0067239c
pop ecx
pop ecx
test eax, eax
je 0x51b514
push ebx
push str.Hant
call fcn.0067239c
pop ecx
pop ecx
test eax, eax
je 0x51b514
push ebx
push str.Jpan
call fcn.0067239c
pop ecx
pop ecx
test eax, eax
jne 0x51b51b
mov al, byte [edi + 0x1d]
mov byte [esp + 0x13], al
movzx ecx, byte [edi + 0x1d]
mov edx, dword [edi + 0x14]
mov eax, dword [esp + 0x28]
mov dword [edx + ecx*4], eax
inc byte [edi + 0x1d]
jmp 0x51b536
cmp esi, 0x8007000e
je 0x51b57e
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
add eax, 5
add ebx, 0xa
mov dword [esp + 0x1c], eax
cmp eax, edx
jb 0x51b49a
mov al, byte [esp + 0x13]
cmp byte [edi + 0x1d], 0
jbe 0x51b59a
test al, al
je 0x51b6fc
mov esi, dword [edi + 0x14]
movzx ecx, al
mov eax, dword [esi]
mov edx, dword [esi + ecx*4]
mov dword [esi + ecx*4], eax
mov eax, dword [edi + 0x14]
mov dword [eax], edx
jmp 0x51b6fc
cmp dword [edi + 0x14], 0
je 0x51b58d
push dword [edi + 0x14]
call fcn.0064e37d
pop ecx
and dword [edi + 0x14], 0
mov byte [edi + 0x1d], 0
jmp 0x51b71c
cmp dword [edi + 0x14], 0
je 0x51b5a9
push dword [edi + 0x14]
call fcn.0064e37d
pop ecx
and dword [edi + 0x14], 0
push 4
pop ebx
push 8
lea eax, [esp + 0x54]
push eax
push 0x1004
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
test eax, eax
je 0x51b697
lea eax, [esp + 0x2c]
mov edx, str.CpgScript
push eax
push 0
lea eax, [esp + 0x58]
xor ecx, ecx
push eax
call fcn.0051a1d6
mov esi, eax
mov dword [esp + 0x20], esi
test esi, esi
js 0x51b697
mov eax, dword [esp + 0x30]
xor ecx, ecx
mul ebx
mov dword [esp + 0x14], 1
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.006707e1
mov dword [edi + 0x14], eax
pop ecx
test eax, eax
jne 0x51b622
mov esi, 0x8007000e
jmp 0x51b713
xor ebx, ebx
cmp dword [esp + 0x30], ebx
jbe 0x51b662
mov ecx, dword [esp + 0x2c]
lea edx, [esp + 0x28]
mov ecx, dword [ecx + ebx*4]
call fcn.0051cef1
mov esi, eax
test esi, esi
js 0x51b653
movzx ecx, byte [edi + 0x1d]
mov edx, dword [edi + 0x14]
mov eax, dword [esp + 0x28]
mov dword [edx + ecx*4], eax
inc byte [edi + 0x1d]
jmp 0x51b65b
cmp esi, 0x8007000e
je 0x51b67e
inc ebx
cmp ebx, dword [esp + 0x30]
jb 0x51b62a
cmp byte [edi + 0x1d], 0
mov ecx, dword [esp + 0x14]
jne 0x51b700
mov eax, dword [edi + 0x14]
mov byte [edi + 0x1d], cl
and dword [eax], 0
jmp 0x51b700
cmp dword [edi + 0x14], 0
je 0x51b68d
push dword [edi + 0x14]
call fcn.0064e37d
pop ecx
and dword [edi + 0x14], 0
mov byte [edi + 0x1d], 0
jmp 0x51b713
push ebx
call fcn.006707e1
mov dword [edi + 0x14], eax
pop ecx
test eax, eax
je 0x51b468
mov byte [edi + 0x1d], 1
and dword [eax], 0
lea eax, [esp + 0x60]
push 0x100
push eax
push ebx
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
test eax, eax
je 0x51b6fc
and dword [esp + 0x18], 0
lea edx, [esp + 0x18]
lea ecx, [esp + 0x60]
call fcn.0051ea29
test eax, eax
je 0x51b6f4
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x20]
mov esi, dword [edi + 0x14]
call fcn.0051ece2
mov dword [esi], eax
mov esi, dword [esp + 0x20]
cmp esi, 0x8007000e
je 0x51b71c
mov ecx, dword [esp + 0x14]
cmp dword [edi + 8], 0xc00
je 0x51b70d
or dword [edi + 0x20], 2
xor esi, esi
test cl, cl
je 0x51b71c
lea ecx, [esp + 0x2c]
call fcn.0051a365
lea ecx, [esp + 0x44]
call fcn.00422b96
mov ecx, dword [esp + 0x264]
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0064c681
mov esp, ebp
pop ebp
ret
call fcn.0064cdd9
int3