Function at 0x40f841
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x25c
mov eax, dword [0x4ad15c]
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 0x4d1cac
mov dword [esp + 0x28], esi
call fcn.0040dfae
test byte [edi + 0x20], 2
jne 0x40fb84
cmp dword [edi + 0x14], esi
je 0x40f898
push dword [edi + 0x14]
call fcn.00416a16
and dword [edi + 0x14], esi
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 0x40fa24
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
push 4
xor ecx, ecx
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004169d0
mov dword [edi + 0x14], eax
test eax, eax
jne 0x40f8f1
mov esi, 0x8007000e
jmp 0x40fb84
push 4
xor al, al
pop ecx
mov byte [esp + 0x13], al
cmp ebx, ecx
jbe 0x40f9da
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 0x40f9c4
lea eax, [ecx + ebx]
cmp eax, 0x200
jae 0x40fba4
xor eax, eax
lea edx, [esp + 0x28]
mov ecx, ebx
mov word [ebx + 8], ax
call fcn.00411316
mov esi, eax
mov dword [esp + 0x20], esi
test esi, esi
js 0x40f9b0
cmp byte [edi + 0x1d], 0
jbe 0x40f99d
cmp byte [esp + 0x13], 1
jae 0x40f99d
push ebx
push 0x481fa8
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x40f996
push ebx
push str.Hant
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x40f996
push ebx
push str.Jpan
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x40f99d
mov al, byte [edi + 0x1d]
mov byte [esp + 0x13], al
movzx edx, byte [edi + 0x1d]
mov ecx, dword [edi + 0x14]
mov eax, dword [esp + 0x28]
mov dword [ecx + edx*4], eax
inc byte [edi + 0x1d]
jmp 0x40f9b8
cmp esi, 0x8007000e
je 0x40fa00
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 0x40f919
mov al, byte [esp + 0x13]
cmp byte [edi + 0x1d], 0
jbe 0x40fa15
test al, al
je 0x40fb64
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 0x40fb64
push dword [edi + 0x14]
call fcn.00416a16
and dword [edi + 0x14], 0
mov byte [edi + 0x1d], 0
jmp 0x40fb84
push dword [edi + 0x14]
call fcn.00416a16
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 0x40fb00
lea eax, [esp + 0x2c]
mov edx, str.CpgScript
push eax
push 0
lea eax, [esp + 0x58]
xor ecx, ecx
push eax
call fcn.00413945
mov esi, eax
mov dword [esp + 0x20], esi
test esi, esi
js 0x40fb00
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.004169d0
mov dword [edi + 0x14], eax
test eax, eax
jne 0x40fa95
mov esi, 0x8007000e
jmp 0x40fb7b
xor ebx, ebx
cmp dword [esp + 0x30], ebx
jbe 0x40fad5
mov ecx, dword [esp + 0x2c]
lea edx, [esp + 0x28]
mov ecx, dword [ecx + ebx*4]
call fcn.00411316
mov esi, eax
test esi, esi
js 0x40fac6
movzx edx, byte [edi + 0x1d]
mov ecx, dword [edi + 0x14]
mov eax, dword [esp + 0x28]
mov dword [ecx + edx*4], eax
inc byte [edi + 0x1d]
jmp 0x40face
cmp esi, 0x8007000e
je 0x40faee
inc ebx
cmp ebx, dword [esp + 0x30]
jb 0x40fa9d
cmp byte [edi + 0x1d], 0
mov ecx, dword [esp + 0x14]
jne 0x40fb68
mov eax, dword [edi + 0x14]
mov byte [edi + 0x1d], cl
and dword [eax], 0
jmp 0x40fb68
push dword [edi + 0x14]
call fcn.00416a16
and dword [edi + 0x14], 0
mov byte [edi + 0x1d], 0
jmp 0x40fb7b
push ebx
call fcn.004169d0
mov dword [edi + 0x14], eax
test eax, eax
je 0x40f8e7
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 0x40fb64
and dword [esp + 0x18], 0
lea edx, [esp + 0x18]
lea ecx, [esp + 0x60]
call fcn.004132c4
test eax, eax
je 0x40fb5c
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x20]
call fcn.00416539
mov ecx, dword [edi + 0x14]
mov esi, dword [esp + 0x20]
mov dword [ecx], eax
cmp esi, 0x8007000e
je 0x40fb84
mov ecx, dword [esp + 0x14]
cmp dword [edi + 8], 0xc00
je 0x40fb75
or dword [edi + 0x20], 2
xor esi, esi
test cl, cl
je 0x40fb84
lea ecx, [esp + 0x2c]
call fcn.00413ad2
lea ecx, [esp + 0x44]
call fcn.0040df8c
mov ecx, dword [esp + 0x264]
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0047a72f
mov esp, ebp
pop ebp
ret
call fcn.0047ab25
int3