Function at 0x40e280
Capabilities:
Get geographical location
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x250
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [sym.imp.USER32.dll_IsWindowVisible]
mov esi, eax
mov eax, dword [ebx + 4]
push eax
call edi
test eax, eax
je 0x40e2af
mov ecx, dword [ebx + 0x44]
push ecx
call edi
test eax, eax
je 0x40e71c
test byte [ebp + 0x10], 2
je 0x40e3df
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40e3b5
test esi, esi
je 0x40e2da
mov ecx, 0xb
lea edi, [ebp - 0x4c]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
jmp 0x40e2f1
mov eax, dword [eax + 0x38]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
lea edx, [ebp - 0x4c]
push edx
push 0
push 0xbc9
push eax
call edi
push 0x80
lea ecx, [ebp - 0x24c]
push ecx
push 0xf014
call fcn.0041d910
add esp, 0xc
cmp dword [0x425308], 0
je 0x40e31c
mov eax, dword [ebp - 0x3c]
cdq
idiv dword [ebx + 0x20]
jmp 0x40e31f
mov eax, dword [ebp - 0x40]
mov edx, dword [ebp - 0x2c]
inc eax
push eax
mov eax, dword [ebp - 0x38]
push edx
inc eax
push eax
lea ecx, [ebp - 0x24c]
push ecx
lea esi, [ebp - 0x14c]
call fcn.0040bb00
mov eax, dword [ebx + 0x44]
add esp, 0x10
mov edx, esi
push edx
push 1
push 0x40b
push eax
call edi
cmp dword [ebp - 0x24], 0
jle 0x40e394
push 0x80
lea ecx, [ebp - 0x24c]
push ecx
push 0xf019
call fcn.0041d910
mov edx, dword [ebp - 0x24]
push edx
lea eax, [ebp - 0x24c]
push eax
call fcn.0040bb00
mov edx, dword [ebx + 0x44]
or dword [ebx + 0x1c], 0x40
add esp, 0x14
mov ecx, esi
push ecx
push 3
push 0x40b
push edx
call edi
jmp 0x40e3e5
mov eax, dword [ebx + 0x1c]
test al, 0x40
je 0x40e3e5
push 0x420450
add eax, 0xffffffc0
push 3
mov dword [ebx + 0x1c], eax
mov eax, dword [ebx + 0x44]
push 0x40b
push eax
call edi
jmp 0x40e3e5
mov ecx, dword [ebx + 0x44]
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
push 0x420450
push 1
push 0x40b
push ecx
call esi
mov edx, dword [ebx + 0x44]
push 0x420450
push 3
push 0x40b
push edx
call esi
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
test byte [ebp + 0x10], 1
mov esi, dword [ebp + 0xc]
je 0x40e664
test esi, esi
je 0x40e640
lea ecx, [ebp - 0xc]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_C2bString::constructor_void_]
mov ecx, dword [0x4250c8]
push 0
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.Ngs3.dll_public:_class_CInputScheme____thiscall_CEditContext::GetCurrentScheme_unsigned_int___int__const]
test byte [ebp - 0x10], 4
je 0x40e43d
mov edx, dword [eax]
mov edx, dword [edx + 0x3c]
push 0
lea ecx, [ebp - 8]
push ecx
mov ecx, eax
call edx
push eax
lea ecx, [ebp - 0xc]
call dword [0x4253b8]
lea ecx, [ebp - 8]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_C2bString::destructor_void_]
lea ecx, [ebp - 0xc]
call dword [sym.imp.Ngs3.dll_public:_unsigned_int___thiscall_C2bString::GetLength_void_const]
test eax, eax
je 0x40e45e
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebx + 0x44]
push eax
push 0
push 0x40b
push ecx
jmp 0x40e57e
cmp dword [0x42538c], 0
je 0x40e4be
mov eax, dword [0x425398]
mov edx, dword [eax]
mov edx, dword [edx + 0x34]
lea ecx, [ebp - 8]
push ecx
push eax
call edx
movzx ecx, word [ebp - 8]
push 0x30
lea eax, [ebp - 0x24c]
push eax
push 2
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
mov edx, dword [ebx + 0x1c]
and dl, 8
movzx eax, dl
neg eax
sbb eax, eax
and eax, 0x2b
push eax
lea ecx, [ebp - 0x24c]
push ecx
push str._s_TSF_c
lea esi, [ebp - 0x14c]
call fcn.0040bb00
add esp, 0xc
jmp 0x40e56c
mov eax, dword [esi + 0x38]
push eax
mov dword [ebp - 8], 0
mov dword [ebp - 0x14], eax
call dword [sym.imp.IMM32.dll_ImmGetContext]
push 0
mov dword [ebp - 0x18], eax
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push 0x30
mov esi, eax
lea edx, [ebp - 0x24c]
push edx
movzx eax, si
push 2
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.IMM32.dll_ImmGetOpenStatus]
test eax, eax
je 0x40e516
mov ecx, dword [ebp - 0x18]
lea edx, [ebp - 0x20]
push edx
lea eax, [ebp - 8]
push eax
push ecx
call dword [sym.imp.IMM32.dll_ImmGetConversionStatus]
jmp 0x40e51d
mov dword [ebp - 8], 0
push esi
call dword [sym.imp.IMM32.dll_ImmIsIME]
test eax, eax
mov eax, 0x420850
jne 0x40e532
mov eax, 0x420858
mov edx, dword [ebp - 8]
and dl, 1
movzx ecx, dl
neg ecx
sbb ecx, ecx
and ecx, 0x2b
push ecx
push eax
lea edx, [ebp - 0x24c]
push edx
push str._s__s_c
lea esi, [ebp - 0x14c]
call fcn.0040bb00
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
add esp, 0x10
push eax
push ecx
call dword [sym.imp.IMM32.dll_ImmReleaseContext]
mov eax, dword [ebx + 0x44]
lea edx, [ebp - 0x14c]
push edx
push 0
push 0x40b
push eax
call edi
mov ecx, dword [0x4250c8]
mov esi, dword [sym.imp.Ngs3.dll_public:_bool___thiscall_CEditContext::IsStatus_unsigned_int_const]
push 0x10
call esi
movzx eax, al
mov dword [ebp - 0x10], eax
neg eax
push 0x80
lea ecx, [ebp - 0x14c]
sbb eax, eax
push ecx
add eax, 0xf016
push eax
call fcn.0041d910
add esp, 0xc
cmp dword [ebp - 0x10], 0
je 0x40e61e
mov ecx, dword [0x4250c8]
push 0x20
call esi
test al, al
je 0x40e61e
lea eax, [ebp - 0x14c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40e5d1
sub eax, edx
sar eax, 1
lea edx, [eax + eax + 2]
push edx
lea eax, [ebp - 0x14c]
push eax
lea ecx, [ebp - 0x14a]
push ecx
call dword [sym.imp.MSVCRT.dll_memmove]
mov edx, 0x5b
add esp, 0xc
lea ebx, [edx + 0x25]
mov ecx, 0x420870
lea eax, [ebp - 0x14c]
mov word [ebp - 0x14c], dx
call fcn.00406540
mov ebx, dword [ebp + 8]
mov ecx, dword [ebx + 0x44]
lea eax, [ebp - 0x14c]
push eax
push 2
push 0x40b
push ecx
call edi
lea ecx, [ebp - 0xc]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_C2bString::destructor_void_]
mov esi, dword [ebp + 0xc]
jmp 0x40e664
mov edx, dword [ebx + 0x44]
push 0x420450
push 0
push 0x40b
push edx
call edi
mov eax, dword [ebx + 0x44]
push 0x420450
push 2
push 0x40b
push eax
call edi
test byte [ebp + 0x10], 4
je 0x40e71c
test esi, esi
je 0x40e6fb
mov eax, dword [esi + 0xc]
cmp eax, 0xfdea
je 0x40e6e6
cmp eax, 0x3b6
jg 0x40e6b9
je 0x40e6b2
mov ecx, eax
sub ecx, 0x3a4
je 0x40e6ab
sub ecx, 4
je 0x40e6a4
sub ecx, 0xd
jne 0x40e6ce
mov edi, str.KSX1001
jmp 0x40e70a
mov edi, 0x4208c8
jmp 0x40e70a
mov edi, str.S_JIS
jmp 0x40e70a
mov edi, str.BIG5
jmp 0x40e70a
cmp eax, 0x4b0
je 0x40e6f4
cmp eax, 0x551
je 0x40e6ed
cmp eax, 0xfde9
je 0x40e6e6
push eax
lea edi, [ebp - 0x14c]
push 0x4204a4
mov esi, edi
call fcn.0040bb00
add esp, 8
jmp 0x40e70a
mov edi, 0x420888
jmp 0x40e70a
mov edi, str.KSSM
jmp 0x40e70a
mov edi, 0x420874
jmp 0x40e70a
xor ecx, ecx
lea edi, [ebp - 0x14c]
mov word [ebp - 0x14c], cx
mov edx, dword [ebx + 0x44]
push edi
push 4
push 0x40b
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc