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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x6c
mov eax, dword [0x100af010]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
mov ebx, dword [0x100aff30]
lea eax, [esp + 0x58]
push esi
push edi
push eax
mov dword [esp + 0x14], ecx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x1003882d
lea eax, [esp + 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x1003882d
push dword [0x100aff28]
push 0x38
call fcn.100037d0
mov esi, dword [0x100aff30]
add esp, 8
mov dword [esp + 0x18], 6
mov edi, eax
test esi, esi
je 0x10038542
movsx edx, word [esi + 0x6058]
lea eax, [esi + 0x605c]
mov ecx, dword [esi + 0x3fe0]
lea eax, [eax + edx*8]
cmp dword [eax], ecx
je 0x10038538
lea eax, [edx + 1]
cdq
idiv dword [esp + 0x18]
movzx eax, dx
mov word [esi + 0x6058], ax
cwde
lea eax, [eax*8 + 0x605c]
add eax, esi
mov dword [eax], ecx
xor ecx, ecx
mov dword [eax + 4], ecx
inc word [eax + 4]
inc dword [esi + 0x6050]
test edi, edi
je 0x10038555
push 0x38
push 0
push edi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
jmp 0x10038557
xor edi, edi
or dword [ebx + 0xc], 0xc06
mov eax, dword [esp + 0x10]
mov dword [ebx + 0x7c], edi
mov dword [ebx + 0x74], str.imgui_impl_win32
mov dword [edi], eax
mov byte [edi + 0x28], 1
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x64]
mov dword [edi + 0x18], eax
mov dword [edi + 0x1c], ecx
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x6c]
mov dword [edi + 0x10], eax
mov dword [edi + 0x14], ecx
mov dword [edi + 0x20], 9
test esi, esi
je 0x1003859e
mov esi, dword [esi + 0x7c]
jmp 0x100385a0
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 0x100385c3
mov dword [esi], eax
mov eax, dword [0x100aff30]
mov eax, dword [eax + 0x4b44]
mov ecx, dword [eax]
mov eax, dword [edi]
mov dword [ecx + 0x40], eax
mov dword [ecx + 0x3c], eax
test dword [ebx + 8], 0x400
je 0x1003879b
push 0
mov dword [esp + 0x34], 0x30
mov dword [esp + 0x38], 3
mov dword [esp + 0x3c], 0x1003b550
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
movaps xmm0, xmmword [0x100aa2e0]
mov dword [esp + 0x44], eax
lea eax, [esp + 0x30]
push eax
movups xmmword [esp + 0x4c], xmm0
mov dword [esp + 0x5c], str.ImGui_Platform
mov dword [esp + 0x60], 0
call dword [sym.imp.USER32.dll_RegisterClassExA]
call fcn.100395b0
mov ecx, dword [0x100aff30]
push dword [0x100aff28]
push 0x14
mov dword [ecx + 0x38e0], 0x1003add0
mov dword [ecx + 0x38e4], 0x1003af90
mov dword [ecx + 0x38e8], 0x1003b010
mov dword [ecx + 0x38ec], 0x1003b230
mov dword [ecx + 0x38f0], 0x1003b1d0
mov dword [ecx + 0x38f4], 0x1003b300
mov dword [ecx + 0x38f8], 0x1003b2a0
mov dword [ecx + 0x38fc], 0x1003b380
mov dword [ecx + 0x3900], 0x1003b3b0
mov dword [ecx + 0x3904], 0x1003b3d0
mov dword [ecx + 0x3908], 0x1003b3f0
mov dword [ecx + 0x390c], 0x1003b4b0
mov dword [ecx + 0x3910], 0x1003b040
mov dword [ecx + 0x391c], 0x1003b520
mov dword [ecx + 0x3920], 0x100014a0
mov eax, dword [ecx + 0x4b44]
mov ebx, dword [eax]
mov eax, dword [ecx + 0x7c]
mov dword [esp + 0x1c], eax
call fcn.100037d0
mov esi, dword [0x100aff30]
add esp, 8
mov ecx, eax
test esi, esi
je 0x10038760
movsx eax, word [esi + 0x6058]
mov edx, dword [esi + 0x3fe0]
mov dword [esp + 0x10], edx
lea eax, [eax*8 + 0x605c]
add eax, esi
cmp dword [eax], edx
je 0x10038756
movsx eax, word [esi + 0x6058]
inc eax
cdq
idiv dword [esp + 0x18]
movzx eax, dx
mov edx, dword [esp + 0x10]
mov word [esi + 0x6058], ax
cwde
lea eax, [eax*8 + 0x605c]
add eax, esi
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 4]
inc dword [esi + 0x6050]
test ecx, ecx
je 0x10038785
mov dword [ecx + 4], 0
mov dword [ecx], 0
mov byte [ecx + 8], 0
mov dword [ecx + 0x10], 0
mov dword [ecx + 0xc], 0
jmp 0x10038787
xor ecx, ecx
mov edx, dword [esp + 0x14]
mov eax, dword [edx]
mov dword [ecx], eax
mov byte [ecx + 8], 0
mov dword [ebx + 0x38], ecx
mov eax, dword [edx]
mov dword [ebx + 0x3c], eax
mov byte [edi + 0x2a], 1
xor esi, esi
mov dword [esp + 0x1c], str.xinput1_4.dll
mov dword [esp + 0x20], str.xinput1_3.dll
mov dword [esp + 0x24], str.xinput9_1_0.dll
mov dword [esp + 0x28], str.xinput1_2.dll
mov dword [esp + 0x2c], str.xinput1_1.dll
nop dword [eax]
push dword [esp + esi*4 + 0x1c]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
test ebx, ebx
jne 0x100387fa
inc esi
cmp esi, 5
jl 0x100387d0
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.1006dc26
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 [esp + 0x68]
xor ecx, esp
call fcn.1006dc26
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x74]
xor al, al
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1006dc26
mov esp, ebp
pop ebp
ret