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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x100d3080]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [0x100d5ea4]
mov dword [ebp - 0x24], ecx
push edi
test esi, esi
jne 0x1004005d
push 0x10b2
push str.E:Visual_Studio_ProjectsMGRCheatMenumgrCheat_srcimguiimgui.cpp
push str.GImGui___0___No_current_context._Did_you_call_ImGui::CreateContext___and_ImGui::SetCurrentContext_____
call fcn.10077443
mov esi, dword [0x100d5ea4]
add esp, 0xc
cmp dword [esi + 0x74], 0
je 0x1004007a
push 0x8b
push str.E:Visual_Studio_ProjectsMGRCheatMenumgrCheat_srcimguiimgui_impl_win32.cpp
push str.io.BackendPlatformUserData__nullptr___Already_initialized_a_platform_backend__
call fcn.10077443
add esp, 0xc
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x1004022d
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x1004022d
push 0x38
call fcn.10079f96
mov ebx, dword [0x100d5ea4]
add esp, 4
mov edi, eax
test ebx, ebx
je 0x10040100
movsx edx, word [ebx + 0x5ea4]
lea eax, [ebx + 0x5ea8]
mov ecx, dword [ebx + 0x3f10]
lea eax, [eax + edx*8]
cmp dword [eax], ecx
je 0x100400f6
lea eax, [edx + 1]
mov dword [ebp - 0x1c], 6
cdq
idiv dword [ebp - 0x1c]
movzx eax, dx
mov word [ebx + 0x5ea4], ax
cwde
add eax, 0xbd5
lea eax, [ebx + eax*8]
mov dword [eax], ecx
xor ecx, ecx
mov dword [eax + 4], ecx
inc word [eax + 4]
inc dword [ebx + 0x5e9c]
test edi, edi
je 0x10040113
push 0x38
push 0
push edi
call fcn.100620b0
add esp, 0xc
jmp 0x10040115
xor edi, edi
or dword [esi + 0xc], 6
mov eax, dword [ebp - 0x24]
mov dword [esi + 0x74], edi
mov dword [esi + 0x6c], str.imgui_impl_win32
mov dword [edi], eax
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
mov dword [edi + 0x18], eax
mov dword [edi + 0x1c], ecx
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
mov dword [edi + 0x10], eax
mov dword [edi + 0x14], ecx
mov dword [edi + 0x20], 9
test ebx, ebx
je 0x10040150
mov esi, dword [ebx + 0x74]
jmp 0x10040152
xor esi, esi
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push 4
add esi, 0x24
shr eax, 0x10
push esi
push 0x20001004
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
jne 0x10040175
mov dword [esi], eax
mov esi, dword [0x100d5ea4]
cmp dword [esi + 0x4a20], 0
jg 0x1004019b
push 0x785
push str.E:Visual_Studio_ProjectsMGRCheatMenumgrCheat_srcimguiimgui.h
push str.i___0__i___Size
call fcn.10077443
add esp, 0xc
mov eax, dword [esi + 0x4a28]
xor esi, esi
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x38], str.xinput1_4.dll
mov dword [ebp - 0x34], str.xinput1_3.dll
mov eax, dword [eax]
mov dword [ebp - 0x30], str.xinput9_1_0.dll
mov dword [ebp - 0x2c], str.xinput1_2.dll
mov dword [ebp - 0x28], str.xinput1_1.dll
mov dword [eax + 0x24], ecx
mov byte [edi + 0x29], 1
push dword [ebp + esi*4 - 0x38]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
test ebx, ebx
jne 0x100401fb
inc esi
cmp esi, 5
jl 0x100401d2
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1005ff0b
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.XInputGetCapabilities
push ebx
mov dword [edi + 0x2c], ebx
call esi
push str.XInputGetState
push ebx
mov dword [edi + 0x30], eax
call esi
mov dword [edi + 0x34], eax
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1005ff0b
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1005ff0b
mov esp, ebp
pop ebp
ret