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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x6c
mov eax, dword [0x100d7010]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
mov ebx, dword [0x100d9260]
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 0x100383ed
lea eax, [esp + 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x100383ed
push dword [0x100d9258]
push 0x38
call fcn.100033b0
mov esi, dword [0x100d9260]
add esp, 8
mov dword [esp + 0x18], 6
mov edi, eax
test esi, esi
je 0x10038102
movsx edx, word [esi + 0x6058]
lea eax, [esi + 0x605c]
mov ecx, dword [esi + 0x3fe0]
lea eax, [eax + edx*8]
cmp dword [eax], ecx
je 0x100380f8
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 0x10038115
push 0x38
push 0
push edi
call fcn.100679f0
add esp, 0xc
jmp 0x10038117
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 0x1003815e
mov esi, dword [esi + 0x7c]
jmp 0x10038160
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 0x10038183
mov dword [esi], eax
mov eax, dword [0x100d9260]
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 0x1003835b
push 0
mov dword [esp + 0x34], 0x30
mov dword [esp + 0x38], 3
mov dword [esp + 0x3c], 0x1003b110
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
movaps xmm0, xmmword [0x100cf6b0]
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.10039170
mov ecx, dword [0x100d9260]
push dword [0x100d9258]
push 0x14
mov dword [ecx + 0x38e0], 0x1003a990
mov dword [ecx + 0x38e4], 0x1003ab50
mov dword [ecx + 0x38e8], 0x1003abd0
mov dword [ecx + 0x38ec], 0x1003adf0
mov dword [ecx + 0x38f0], 0x1003ad90
mov dword [ecx + 0x38f4], 0x1003aec0
mov dword [ecx + 0x38f8], 0x1003ae60
mov dword [ecx + 0x38fc], 0x1003af40
mov dword [ecx + 0x3900], 0x1003af70
mov dword [ecx + 0x3904], 0x1003af90
mov dword [ecx + 0x3908], 0x1003afb0
mov dword [ecx + 0x390c], 0x1003b070
mov dword [ecx + 0x3910], 0x1003ac00
mov dword [ecx + 0x391c], 0x1003b0e0
mov dword [ecx + 0x3920], 0x10001080
mov eax, dword [ecx + 0x4b44]
mov ebx, dword [eax]
mov eax, dword [ecx + 0x7c]
mov dword [esp + 0x1c], eax
call fcn.100033b0
mov esi, dword [0x100d9260]
add esp, 8
mov ecx, eax
test esi, esi
je 0x10038320
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 0x10038316
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 0x10038345
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 0x10038347
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 0x100383ba
inc esi
cmp esi, 5
jl 0x10038390
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.10064b15
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.10064b15
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.10064b15
mov esp, ebp
pop ebp
ret