Function at 0x402540
Capabilities:
Get geographical location
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41e4d8
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x425424]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor edi, edi
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x44], edi
call dword [0x4253fc]
mov edx, dword [0x426abc]
mov ebx, eax
mov eax, dword [edx + 0xc]
mov ecx, 0x426abc
mov dword [ebp - 0x4c], ebx
call eax
add eax, 0x10
mov dword [ebp - 0x34], eax
push str.ARA_ar_CHS_00_CHT_00_CSY_cs_DAN_da_DEU_de_ELL_el_ENU_en_ESN_es_BAQ_eu_CAT_ca_GLG_gl_FIN_fi_FRA_fr_HEB_he_ITA_it_JPN_ja_KOR_ko_NLD_nl_NOR_no_PLK_pl_PTB_pt_PTG_00_RUS_ru_SKY_sk_SVE_sv_TRK_tr_ZHH_00_
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
add esi, 1
cmp esi, 0x3fffffff
jg 0x4025df
lea eax, [esi + esi]
call fcn.004091a0
mov edi, esp
test edi, edi
je 0x4025df
push esi
push edi
push 0xffffffffffffffff
push str.ARA_ar_CHS_00_CHT_00_CSY_cs_DAN_da_DEU_de_ELL_el_ENU_en_ESN_es_BAQ_eu_CAT_ca_GLG_gl_FIN_fi_FRA_fr_HEB_he_ITA_it_JPN_ja_KOR_ko_NLD_nl_NOR_no_PLK_pl_PTB_pt_PTG_00_RUS_ru_SKY_sk_SVE_sv_TRK_tr_ZHH_00_
push 0
push ebx
mov word [edi], 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
neg eax
sbb eax, eax
and eax, edi
jmp 0x4025e1
xor eax, eax
mov dword [ebp - 0x40], eax
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4025e7
sub eax, edx
sar eax, 1
cmp eax, 7
ja 0x40264c
push 0x41f328
lea ecx, [ebp - 0x34]
push 0x41f498
push ecx
call fcn.00402450
mov esi, dword [ebp - 0x34]
add esi, 0xfffffff0
push esi
call fcn.00401980
mov edi, dword [ebp - 0x3c]
add eax, 0x10
mov dword [edi], eax
add esp, 0x10
mov dword [ebp - 4], 0xffffffff
lea edx, [esi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x402645
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov eax, edi
jmp 0x402929
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
push 6
lea ecx, [ebp - 0x20]
push ecx
movzx edi, ax
push 3
push edi
call ebx
test eax, eax
jne 0x4026aa
push 0x41f328
lea edx, [ebp - 0x34]
push 0x41f498
push edx
call fcn.00402450
mov esi, dword [ebp - 0x34]
add esi, 0xfffffff0
push esi
call fcn.00401980
mov edi, dword [ebp - 0x3c]
add eax, 0x10
mov dword [edi], eax
add esp, 0x10
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jmp 0x402639
lea ecx, [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
add esi, 1
cmp esi, 0x3fffffff
jle 0x4026ca
mov dword [ebp - 0x48], 0
jmp 0x4026e6
lea eax, [esi + esi]
call fcn.004091a0
mov edx, dword [ebp - 0x4c]
mov eax, esp
push edx
push esi
lea ecx, [ebp - 0x20]
push ecx
push eax
call fcn.00401220
mov dword [ebp - 0x48], eax
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x40]
push edx
push eax
call fcn.00408227
add esp, 8
test eax, eax
je 0x40273c
lea ecx, [ebp - 0x20]
push ecx
lea edx, [ebp - 0x34]
push 0x41f498
push edx
call fcn.00402450
mov esi, dword [ebp - 0x34]
add esi, 0xfffffff0
push esi
call fcn.00401980
mov edi, dword [ebp - 0x3c]
add eax, 0x10
mov dword [edi], eax
add esp, 0x10
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jmp 0x402639
push 6
lea ecx, [ebp - 0x30]
push ecx
push 0x59
push edi
call ebx
test eax, eax
je 0x4028fb
lea ecx, [ebp - 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
add esi, 1
cmp esi, 0x3fffffff
jle 0x40276d
xor edi, edi
mov dword [ebp - 0x44], edi
jmp 0x40278b
lea eax, [esi + esi]
call fcn.004091a0
mov edx, dword [ebp - 0x4c]
mov eax, esp
push edx
push esi
lea ecx, [ebp - 0x30]
push ecx
push eax
call fcn.00401220
mov dword [ebp - 0x44], eax
xor edi, edi
mov ebx, dword [ebp - 0x40]
mov eax, ebx
mov byte [ebp - 0x35], 0
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x402797
sub eax, edx
sar eax, 1
je 0x4028fb
lea esp, [esp]
xor eax, eax
jmp 0x4027c0
movzx ecx, word [eax + 0x41f494]
mov word [ebp + eax - 0x18], cx
add eax, 2
cmp cx, di
jne 0x4027c0
xor eax, eax
jmp 0x4027e0
movzx ecx, word [eax + 0x41f494]
mov word [ebp + eax - 0x28], cx
add eax, 2
cmp cx, di
jne 0x4027e0
push 3
lea edx, [ebp - 0x18]
push ebx
push edx
call fcn.00409a63
lea eax, [ebp - 0x18]
add esp, 0xc
mov word [ebp - 0x12], di
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x402810
sub eax, edx
sar eax, 1
cmp eax, 3
jb 0x402948
mov eax, dword [ebp - 0x48]
push eax
lea ecx, [ebp - 0x18]
push ecx
call fcn.0041e04f
add esp, 8
test eax, eax
je 0x402964
push 2
add ebx, 8
lea edx, [ebp - 0x28]
push ebx
push edx
call fcn.00409a63
lea eax, [ebp - 0x28]
add esp, 0xc
mov word [ebp - 0x24], di
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x402860
sub eax, edx
sar eax, 1
cmp eax, 2
jb 0x40297f
mov eax, dword [ebp - 0x44]
push eax
lea ecx, [ebp - 0x28]
push ecx
call fcn.0041e04f
add esp, 8
test eax, eax
jne 0x4028d5
lea edx, [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
cmp eax, 0x3fffffff
jle 0x4028a4
xor eax, eax
jmp 0x4028bf
lea esi, [eax + eax]
mov eax, esi
call fcn.004091a0
mov ecx, dword [ebp - 0x4c]
mov eax, esp
push ecx
push esi
lea edx, [ebp - 0x18]
push edx
push eax
call fcn.00401260
push eax
lea eax, [ebp - 0x34]
push 0x41f498
push eax
call fcn.00402450
add esp, 0xc
mov byte [ebp - 0x35], 1
add ebx, 6
mov eax, ebx
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x4028e0
sub eax, edx
sar eax, 1
jne 0x4027b0
cmp byte [ebp - 0x35], 0
jne 0x402911
push 0x41f328
lea edx, [ebp - 0x34]
push 0x41f498
push edx
call fcn.00402450
add esp, 0xc
lea eax, [ebp - 0x34]
push eax
mov esi, dword [ebp - 0x3c]
mov ecx, esi
call fcn.00401ef0
lea ecx, [ebp - 0x34]
call fcn.004014b0
mov eax, esi
lea esp, [ebp - 0x5c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00408fe9
mov esp, ebp
pop ebp
ret
push 0x41f328
lea ecx, [ebp - 0x34]
push 0x41f498
push ecx
call fcn.00402450
add esp, 0xc
lea edx, [ebp - 0x34]
push edx
jmp 0x402915
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x34]
push 0x41f498
push ecx
call fcn.00402450
add esp, 0xc
lea edx, [ebp - 0x34]
push edx
jmp 0x402915
push 0x41f328
lea eax, [ebp - 0x34]
push 0x41f498
push eax
call fcn.00402450
add esp, 0xc
lea ecx, [ebp - 0x34]
push ecx
jmp 0x402915