Function at 0x522150
Capabilities:
Get geographical location

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x584a09
push eax
mov dword fs:[0], esp
sub esp, 0x134
push ebx
push ebp
push esi
mov esi, dword [esp + 0x154]
push edi
mov edi, dword [esp + 0x154]
push esi
push edi
call dword [sym.imp.USER32.dll_GetSubMenu]
mov ebp, eax
xor ebx, ebx
cmp ebp, ebx
je 0x52280c
push 0x403
push esi
push edi
call dword [sym.imp.USER32.dll_EnableMenuItem]
mov eax, dword [0x5ed920]
mov ecx, 0x5ed920
mov dword [esp + 0x20], ecx
call dword [eax + 4]
mov eax, dword [0x5e5cb8]
mov dword [esp + 0x14c], ebx
cmp eax, ebx
jne 0x52221c
cmp dword [0x5e5cb4], ebx
jne 0x52221c
push 0x380
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esp + 0x34], eax
cmp eax, ebx
mov byte [esp + 0x14c], 1
je 0x5221ee
push ebx
mov ecx, eax
call fcn.00414650
jmp 0x5221f0
xor eax, eax
mov ecx, dword [0x5cebb0]
mov byte [esp + 0x14c], bl
push ecx
push 0x406a50
mov ecx, 0x5eafa0
mov dword [0x5e5cb4], eax
call fcn.00406600
mov dword [0x5e5cb8], 1
mov edx, dword [0x5ed920]
mov edi, dword [0x5e5cb4]
mov ecx, 0x5ed920
mov dword [esp + 0x14c], 0xffffffff
call dword [edx + 8]
mov eax, dword [edi]
lea ecx, [esp + 0x3c]
push ecx
push edi
call dword [eax + 0xac]
test eax, eax
jl 0x52280c
mov eax, dword [esp + 0x3c]
cmp eax, 4
je 0x522263
cmp eax, 5
jne 0x52280c
mov dword [esp + 0x30], ebx
mov edx, dword [0x5ed920]
mov ecx, 0x5ed920
mov dword [esp + 0x14c], 2
mov dword [esp + 0x34], ecx
call dword [edx + 4]
mov eax, dword [0x5e5cb8]
mov byte [esp + 0x14c], 3
cmp eax, ebx
jne 0x5222f2
cmp dword [0x5e5cb4], ebx
jne 0x5222f2
push 0x380
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esp + 0x20], eax
cmp eax, ebx
mov byte [esp + 0x14c], 4
je 0x5222c4
push ebx
mov ecx, eax
call fcn.00414650
jmp 0x5222c6
xor eax, eax
mov dword [0x5e5cb4], eax
mov eax, dword [0x5cebb0]
push eax
push 0x406a50
mov ecx, 0x5eafa0
mov byte [esp + 0x154], 3
call fcn.00406600
mov dword [0x5e5cb8], 1
mov edx, dword [0x5ed920]
mov edi, dword [0x5e5cb4]
mov ecx, 0x5ed920
mov byte [esp + 0x14c], 2
call dword [edx + 8]
lea eax, [esp + 0x30]
mov ecx, edi
push eax
call fcn.0047a2a0
test eax, eax
jl 0x5227f3
mov eax, dword [esp + 0x30]
cmp eax, ebx
je 0x5227f7
mov dword [esp + 0x28], ebx
mov ecx, dword [eax]
lea edx, [esp + 0x28]
push edx
push 0x5d7388
push eax
mov byte [esp + 0x158], 5
call dword [ecx + 0xc]
test eax, eax
jl 0x5227dd
mov eax, dword [esp + 0x28]
cmp eax, ebx
je 0x5227e1
mov dword [esp + 0x24], ebx
mov ecx, dword [eax]
lea edx, [esp + 0x24]
push edx
xor edi, edi
push 0x5dff78
push eax
mov byte [esp + 0x158], 6
mov dword [esp + 0x28], edi
call dword [ecx]
test eax, eax
jl 0x52262f
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x52262f
mov ecx, dword [eax]
push ebx
push eax
call dword [ecx + 0xc]
cmp eax, ebx
mov dword [esp + 0x1c], eax
jle 0x52262b
mov eax, dword [esp + 0x24]
push ebx
push eax
mov edx, dword [eax]
call dword [edx + 0x10]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x154]
push 0x400
push esi
push eax
call dword [sym.imp.USER32.dll_EnableMenuItem]
mov esi, dword [sym.imp.USER32.dll_DeleteMenu]
push 0x400
push ebx
push ebp
call esi
test eax, eax
je 0x5223e9
push 0x400
push ebx
push ebp
call esi
test eax, eax
jne 0x5223dc
mov eax, dword [esp + 0x1c]
xor esi, esi
cmp eax, ebx
jle 0x522471
mov edi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_3
mov dword [esp + 0x14], ebx
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x14]
push edx
push esi
mov ecx, dword [eax]
push ebx
push eax
mov byte [esp + 0x15c], 8
call dword [ecx + 0x18]
mov eax, dword [esp + 0x14]
push eax
call fcn.00565bb4
push eax
lea ecx, [esp + 0x14]
push 0x5e158c
push ecx
call sub.MFC42.DLL_CString::Format
mov edx, dword [esp + 0x1c]
add esp, 0xc
lea eax, [esi + 0x1f40]
push edx
push eax
push ebx
push ebp
call dword [sym.imp.USER32.dll_AppendMenuA]
mov ecx, dword [esp + 0x14]
push ecx
call edi
lea ecx, [esp + 0x10]
mov byte [esp + 0x14c], 6
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0x1c]
inc esi
cmp esi, eax
jl 0x5223f9
push 0x5e5830
push ebx
push 0x800
push ebp
call dword [sym.imp.USER32.dll_AppendMenuA]
mov dword [esp + 0x18], ebx
mov edx, dword [0x5ed920]
mov ecx, 0x5ed920
mov byte [esp + 0x14c], 9
mov dword [esp + 0x34], ecx
call dword [edx + 4]
mov eax, dword [0x5e5cb8]
mov byte [esp + 0x14c], 0xa
cmp eax, ebx
jne 0x52250f
cmp dword [0x5e5cb4], ebx
jne 0x52250f
push 0x380
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esp + 0x38], eax
cmp eax, ebx
mov byte [esp + 0x14c], 0xb
je 0x5224e1
push ebx
mov ecx, eax
call fcn.00414650
jmp 0x5224e3
xor eax, eax
mov dword [0x5e5cb4], eax
mov eax, dword [0x5cebb0]
push eax
push 0x406a50
mov ecx, 0x5eafa0
mov byte [esp + 0x154], 0xa
call fcn.00406600
mov dword [0x5e5cb8], 1
mov edx, dword [0x5ed920]
mov edi, dword [0x5e5cb4]
mov ecx, 0x5ed920
mov byte [esp + 0x14c], 9
call dword [edx + 8]
lea eax, [esp + 0x18]
mov ecx, edi
push eax
call fcn.0047a2a0
test eax, eax
jl 0x5225e9
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x5225e9
mov dword [esp + 0x14], ebx
mov ecx, dword [eax]
lea edx, [esp + 0x14]
push edx
push 0x5d7388
push eax
mov byte [esp + 0x158], 0xc
call dword [ecx + 0xc]
test eax, eax
jl 0x5225d3
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x5225d7
mov dword [esp + 0x10], ebx
mov ecx, dword [eax]
lea edx, [esp + 0x10]
push edx
push 0x5e04e8
push eax
mov byte [esp + 0x158], 0xd
call dword [ecx]
test eax, eax
mov eax, dword [esp + 0x10]
jl 0x5225c1
cmp eax, ebx
je 0x5225c1
mov ecx, dword [eax]
push eax
call dword [ecx + 0x40]
test al, al
je 0x5225ab
push 0x5e1580
jmp 0x5225b0
push 0x5e1574
push 0x806b
push ebx
push ebp
call dword [sym.imp.USER32.dll_AppendMenuA]
mov eax, dword [esp + 0x10]
cmp eax, ebx
mov byte [esp + 0x14c], 0xc
je 0x5225d3
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [esp + 0x14]
cmp eax, ebx
mov byte [esp + 0x14c], 9
je 0x5225e9
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov edx, dword [esp + 0x20]
push ebx
add edx, 0x1f40
add esi, 0x1f3f
push edx
push esi
push 0x1f40
push ebp
call dword [sym.imp.USER32.dll_CheckMenuRadioItem]
mov eax, dword [esp + 0x18]
mov byte [esp + 0x14c], 6
cmp eax, ebx
je 0x52261e
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x158]
jmp 0x52262f
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x2c], ebx
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x2c]
push ecx
push 0x5dff30
mov edx, dword [eax]
push eax
mov byte [esp + 0x158], 0xe
call dword [edx]
test eax, eax
mov eax, dword [esp + 0x2c]
jl 0x5227b5
cmp eax, ebx
je 0x5227b5
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], ebx
mov edx, dword [eax]
push ecx
push eax
call dword [edx + 0x18]
cmp dword [esp + 0x14], ebx
jle 0x5226c9
cmp edi, ebx
jg 0x5226b1
mov edx, dword [esp + 0x154]
push 0x400
push esi
push edx
call dword [sym.imp.USER32.dll_EnableMenuItem]
mov esi, dword [sym.imp.USER32.dll_DeleteMenu]
push 0x400
push ebx
push ebp
call esi
test eax, eax
je 0x5226c9
push 0x400
push ebx
push ebp
call esi
test eax, eax
jne 0x5226a2
jmp 0x5226c9
lea eax, [edi + 0x1f40]
push 0x5e5830
push eax
push 0x800
push ebp
call dword [sym.imp.USER32.dll_AppendMenuA]
mov eax, dword [esp + 0x14]
xor esi, esi
cmp eax, ebx
mov dword [esp + 0x20], ebx
jle 0x52278e
add edi, 0x1f41
mov eax, dword [esp + 0x2c]
lea edx, [esp + 0x18]
push edx
lea edx, [esp + 0x38]
push edx
lea edx, [esp + 0x40]
mov dword [esp + 0x40], ebx
mov dword [esp + 0x20], ebx
mov ecx, dword [eax]
push edx
push esi
push eax
call dword [ecx + 0x1c]
mov ecx, dword [esp + 0x34]
lea eax, [esp + 0x40]
push 0x104
push eax
push 2
push ecx
mov byte [esp + 0x50], bl
call dword [sym.imp.KERNEL32.DLL_GetLocaleInfoA]
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x10]
push edx
call sub.MFC42.DLL_CString::CString_1
push 0x5e1560
push 0x5dff40
lea ecx, [esp + 0x18]
mov byte [esp + 0x154], 0xf
call sub.MFC42.DLL_CString::Replace
cmp dword [esp + 0x38], 1
jne 0x522752
mov dword [esp + 0x20], esi
mov eax, dword [esp + 0x10]
push eax
push edi
push ebx
push ebp
call dword [sym.imp.USER32.dll_AppendMenuA]
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
lea ecx, [esp + 0x10]
mov byte [esp + 0x14c], 0xe
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0x14]
inc esi
inc edi
cmp esi, eax
jl 0x5226e1
mov edi, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
push ebx
lea ecx, [esi + edi + 0x1f40]
lea eax, [edx + edi + 0x1f41]
add edi, 0x1f41
push eax
push ecx
push edi
push ebp
call dword [sym.imp.USER32.dll_CheckMenuRadioItem]
mov eax, dword [esp + 0x2c]
cmp eax, ebx
mov byte [esp + 0x14c], 6
je 0x5227c7
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [esp + 0x24]
mov byte [esp + 0x14c], 5
cmp eax, ebx
je 0x5227dd
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [esp + 0x28]
cmp eax, ebx
mov byte [esp + 0x14c], 2
je 0x5227f3
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [esp + 0x30]
cmp eax, ebx
mov dword [esp + 0x14c], 0xffffffff
je 0x52280c
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ecx, dword [esp + 0x144]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x140
ret