Function at 0x407540
Capabilities:
Check for foreground window switch
Check if file exists
Enumerate files on windows
Log keystrokes via polling
Set console window title

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44ede9
mov eax, dword fs:[0]
push eax
sub esp, 0x484
mov eax, dword [0x46a06c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push str.DSAdvance_0.9.5
call dword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
xorps xmm0, xmm0
movups xmmword [ebp - 0x350], xmm0
push 0
movups xmmword [ebp - 0x340], xmm0
mov dword [ebp - 0x34c], 0x4074d0
movq qword [ebp - 0x330], xmm0
call esi
mov dword [ebp - 0x340], eax
lea eax, [ebp - 0x350]
push eax
mov dword [ebp - 0x32c], str.DSAdvanceApp
call dword [sym.imp.USER32.dll_RegisterClassA]
push 0
push 0
call esi
push eax
push 0
push 0
push 0x80000000
push 0x80000000
push 0x80000000
push 0x80000000
push 0
push str.DSAdvanceApp
push dword [ebp - 0x32c]
push 0
call dword [sym.imp.USER32.dll_CreateWindowExA]
sub esp, 8
mov dword [ebp - 0x1c8], 0
xorps xmm0, xmm0
lea ecx, [ebp - 0x17c]
mov eax, esp
movq qword [ebp - 0x1d0], xmm0
movups xmmword [ebp - 0x1e0], xmm0
movups xmmword [ebp - 0x17c], xmm0
movups xmmword [ebp - 0x16c], xmm0
mov dword [eax], str.Config.ini
mov dword [eax + 4], 0xa
call fcn.004021f0
push 0
sub esp, 8
mov dword [ebp - 4], 0
mov eax, esp
lea ecx, [ebp - 0x17c]
sub esp, 8
mov dword [eax], str.InvertLeftStickX
mov dword [eax + 4], 0x10
mov eax, esp
mov dword [eax], str.Gamepad
mov dword [eax + 4], 7
call fcn.00402ab0
mov byte [0x46aab0], al
lea ecx, [ebp - 0x17c]
push 0
sub esp, 8
mov eax, esp
sub esp, 8
mov dword [eax], str.InvertLeftStickY
mov dword [eax + 4], 0x10
mov eax, esp
mov dword [eax], str.Gamepad
mov dword [eax + 4], 7
call fcn.00402ab0
mov byte [0x46aab1], al
lea ecx, [ebp - 0x17c]
push 0
sub esp, 8
mov eax, esp
sub esp, 8
mov dword [eax], str.InvertRightStickX
mov dword [eax + 4], 0x11
mov eax, esp
mov dword [eax], str.Gamepad
mov dword [eax + 4], 7
call fcn.00402ab0
mov byte [0x46aab2], al
push 0
sub esp, 8
lea ecx, [ebp - 0x17c]
mov eax, esp
sub esp, 8
mov dword [eax], str.InvertRightStickY
mov dword [eax + 4], 0x11
mov eax, esp
mov dword [eax], str.Gamepad
mov dword [eax + 4], 7
call fcn.00402ab0
mov byte [0x46aab3], al
lea ecx, [ebp - 0x17c]
sub esp, 8
mov eax, esp
sub esp, 8
mov dword [eax], str.NONE
mov dword [eax + 4], 4
mov eax, esp
sub esp, 8
mov dword [eax], str.ResetKey
mov dword [eax + 4], 8
mov eax, esp
mov dword [eax], str.Gamepad
mov dword [eax + 4], 7
lea eax, [ebp - 0x3dc]
push eax
call fcn.00402d60
push eax
mov ecx, 0x46ab18
call fcn.0040a630
lea ecx, [ebp - 0x3dc]
mov byte [ebp - 4], 1
call fcn.0040a5e0
sub esp, 0x18
mov byte [ebp - 4], 0
mov esi, esp
lea eax, [ebp - 0x369]
mov dword [ebp - 0x354], esi
mov ecx, esi
push eax
push dword [ebp - 0x354]
call fcn.0040f590
push 0x46ab18
mov ecx, esi
mov byte [ebp - 4], 2
call fcn.0040c1d0
mov byte [ebp - 4], 0
call fcn.00403530
add esp, 0x18
mov dword [ebp - 0x400], eax
push 1
sub esp, 8
mov ecx, esp
sub esp, 8
mov eax, esp
mov dword [ecx], str.ShowBatteryStatusOnLightBar
mov dword [ecx + 4], 0x1b
lea ecx, [ebp - 0x17c]
mov dword [eax], str.Gamepad
mov dword [eax + 4], 7
call fcn.00402ab0
push 1
sub esp, 8
mov byte [ebp - 0x369], al
mov ecx, esp
sub esp, 8
mov esi, esp
mov dword [ecx], str.SleepTimeOut
mov dword [ecx + 4], 0xc
push str.Gamepad
mov dword [esi], str.Gamepad
call fcn.00401240
add esp, 4
mov dword [esi + 4], eax
lea ecx, [ebp - 0x17c]
call fcn.004025c0
sub esp, 8
mov dword [ebp - 0x3f4], eax
mov ecx, esp
push str.DeadZoneLeftStickX
call fcn.0040a7c0
sub esp, 8
mov ecx, esp
push str.Gamepad
call fcn.0040a7c0
xorps xmm3, xmm3
lea ecx, [ebp - 0x17c]
call fcn.004028c0
sub esp, 8
movss dword [0x46aaa0], xmm0
mov ecx, esp
push str.DeadZoneLeftStickY
call fcn.0040a7c0
sub esp, 8
mov ecx, esp
push str.Gamepad
call fcn.0040a7c0
xorps xmm3, xmm3
lea ecx, [ebp - 0x17c]
call fcn.004028c0
sub esp, 8
movss dword [0x46aaa4], xmm0
mov ecx, esp
push str.DeadZoneRightStickX
call fcn.0040a7c0
sub esp, 8
mov ecx, esp
push str.Gamepad
call fcn.0040a7c0
xorps xmm3, xmm3
lea ecx, [ebp - 0x17c]
call fcn.004028c0
sub esp, 8
movss dword [0x46aaa8], xmm0
mov ecx, esp
push str.DeadZoneRightStickY
call fcn.0040a7c0
sub esp, 8
mov ecx, esp
push str.Gamepad
call fcn.0040a7c0
xorps xmm3, xmm3
lea ecx, [ebp - 0x17c]
call fcn.004028c0
sub esp, 8
movss dword [0x46aaac], xmm0
mov ecx, esp
push str.DeadZoneLeftTrigger
call fcn.0040a7c0
sub esp, 8
mov ecx, esp
push str.Gamepad
call fcn.0040a7c0
xorps xmm3, xmm3
lea ecx, [ebp - 0x17c]
call fcn.004028c0
sub esp, 8
movss dword [0x46aab4], xmm0
mov ecx, esp
push str.DeadZoneRightTrigger
call fcn.0040a7c0
sub esp, 8
mov ecx, esp
push str.Gamepad
call fcn.0040a7c0
xorps xmm3, xmm3
lea ecx, [ebp - 0x17c]
call fcn.004028c0
sub esp, 8
movss dword [0x46aab8], xmm0
mov ecx, esp
push str.TouchLeftStickSensX
call fcn.0040a7c0
sub esp, 8
mov ecx, esp
push str.Gamepad
call fcn.0040a7c0
movss xmm3, dword [0x4611b8]
lea ecx, [ebp - 0x17c]
call fcn.004028c0
sub esp, 8
movss dword [ebp - 0x3c4], xmm0
mov ecx, esp
push str.TouchLeftStickSensY
call fcn.0040a7c0
sub esp, 8
mov ecx, esp
push str.Gamepad
call fcn.0040a7c0
movss xmm3, dword [0x4611b8]
lea ecx, [ebp - 0x17c]
call fcn.004028c0
sub esp, 8
movss dword [ebp - 0x3c0], xmm0
mov ecx, esp
push str.TouchRightStickSensX
call fcn.0040a7c0
sub esp, 8
mov ecx, esp
push str.Gamepad
call fcn.0040a7c0
movss xmm3, dword [0x4611b8]
lea ecx, [ebp - 0x17c]
call fcn.004028c0
sub esp, 8
movss dword [ebp - 0x3b8], xmm0
mov ecx, esp
push str.TouchRightStickSensY
call fcn.0040a7c0
sub esp, 8
mov ecx, esp
push str.Gamepad
call fcn.0040a7c0
movss xmm3, dword [0x4611b8]
lea ecx, [ebp - 0x17c]
call fcn.004028c0
sub esp, 8
movss dword [ebp - 0x3bc], xmm0
mov ecx, esp
push str.AutoPressModeStick
call fcn.0040a7c0
sub esp, 8
mov ecx, esp
push str.Gamepad
call fcn.0040a7c0
movss xmm3, dword [0x4611d0]
lea ecx, [ebp - 0x17c]
call fcn.004028c0
mulss xmm0, dword [0x461108]
push 0x64
sub esp, 8
mov dword [ebp - 0x3a0], 0xff
mov ecx, esp
movss dword [ebp - 0x3f8], xmm0
push str.DefaultBrightness
call fcn.0040a7c0
sub esp, 8
mov ecx, esp
push str.Gamepad
call fcn.0040a7c0
lea ecx, [ebp - 0x17c]
call fcn.004025c0
movsd xmm0, qword [0x4611b0]
lea edx, [ebp - 0x39c]
lea ecx, [ebp - 0x38c]
mov dword [ebp - 0x39c], 0
movd xmm1, eax
cvtdq2pd xmm1, xmm1
mulsd xmm1, qword [0x461190]
subsd xmm0, xmm1
cvttsd2si eax, xmm0
mov dword [ebp - 0x38c], eax
lea eax, [ebp - 0x3a0]
push eax
call fcn.0040e350
add esp, 4
mov al, byte [eax]
push 0
sub esp, 8
mov dword [ebp - 0x384], eax
mov ecx, esp
push str.LockChangeBrightness
call fcn.0040a7c0
sub esp, 8
mov ecx, esp
push str.Gamepad
call fcn.0040a7c0
lea ecx, [ebp - 0x17c]
call fcn.00402ab0
xor ecx, ecx
mov byte [ebp - 0x371], al
push ecx
sub esp, 8
mov dword [ebp - 0x394], ecx
mov ecx, esp
mov byte [ebp - 0x35d], 1
push str.ChangeModesWithoutPress
call fcn.0040a7c0
sub esp, 8
mov ecx, esp
push str.Gamepad
call fcn.0040a7c0
lea ecx, [ebp - 0x17c]
call fcn.00402ab0
push 1
sub esp, 8
mov byte [0x46ab0c], al
mov ecx, esp
push str.AimMode
call fcn.0040a7c0
sub esp, 8
mov ecx, esp
push str.Motion
call fcn.0040a7c0
lea ecx, [ebp - 0x17c]
call fcn.00402ab0
sub esp, 8
mov byte [0x46ab05], al
mov ecx, esp
push str.WheelAngle
call fcn.0040a7c0
sub esp, 8
mov ecx, esp
push str.Motion
call fcn.0040a7c0
movss xmm3, dword [0x4611d8]
lea ecx, [ebp - 0x17c]
call fcn.004028c0
mulss xmm0, dword [0x461114]
push 0
sub esp, 8
mov ecx, esp
movss dword [0x46aaec], xmm0
push str.WheelPitch
call fcn.0040a7c0
sub esp, 8
mov ecx, esp
push str.Motion
call fcn.0040a7c0
lea ecx, [ebp - 0x17c]
call fcn.00402ab0
push 1
sub esp, 8
mov byte [0x46aaf0], al
mov ecx, esp
push str.WheelRoll
call fcn.0040a7c0
sub esp, 8
mov ecx, esp
push str.Motion
call fcn.0040a7c0
lea ecx, [ebp - 0x17c]
call fcn.00402ab0
push 0
sub esp, 8
mov byte [0x46aaf1], al
mov ecx, esp
push str.WheelInvertPitch
call fcn.0040a7c0
sub esp, 8
mov ecx, esp
push str.Motion
call fcn.0040a7c0
lea ecx, [ebp - 0x17c]
call fcn.00402ab0
xor ecx, ecx
test al, al
sete cl
sub esp, 8
lea ecx, [ecx*2 - 1]
mov dword [0x46aaf4], ecx
mov ecx, esp
push str.MouseSensX
call fcn.0040a7c0
sub esp, 8
mov ecx, esp
push str.Motion
call fcn.0040a7c0
movss xmm3, dword [0x4611d4]
lea ecx, [ebp - 0x17c]
call fcn.004028c0
mulss xmm0, dword [0x46110c]
sub esp, 8
mov ecx, esp
push str.MouseSensY
movss dword [0x46aadc], xmm0
call fcn.0040a7c0
sub esp, 8
mov ecx, esp
push str.Motion
call fcn.0040a7c0
movss xmm3, dword [0x4611cc]
lea ecx, [ebp - 0x17c]
call fcn.004028c0
mulss xmm0, dword [0x46110c]
sub esp, 8
mov ecx, esp
push str.JoySensX
movss dword [0x46aae0], xmm0
call fcn.0040a7c0
sub esp, 8
mov ecx, esp
push str.Motion
call fcn.0040a7c0
movss xmm3, dword [0x4611d4]
lea ecx, [ebp - 0x17c]
call fcn.004028c0
cvtss2sd xmm0, xmm0
sub esp, 8
mov ecx, esp
push str.JoySensY
mulsd xmm0, qword [0x461120]
cvtsd2ss xmm0, xmm0
movss dword [0x46aae4], xmm0
call fcn.0040a7c0
sub esp, 8
mov ecx, esp
push str.Motion
call fcn.0040a7c0
movss xmm3, dword [0x4611cc]
lea ecx, [ebp - 0x17c]
call fcn.004028c0
cvtss2sd xmm0, xmm0
sub esp, 8
mov ecx, esp
push str.StickValuePressKey
mulsd xmm0, qword [0x461120]
cvtsd2ss xmm0, xmm0
movss dword [0x46aae8], xmm0
call fcn.0040a7c0
sub esp, 8
mov ecx, esp
push str.KeyboardMouse
call fcn.0040a7c0
movss xmm3, dword [0x461110]
lea ecx, [ebp - 0x17c]
call fcn.004028c0
sub esp, 8
movss dword [0x46aacc], xmm0
mov ecx, esp
push str.TriggerValuePressKey
call fcn.0040a7c0
sub esp, 8
mov ecx, esp
push str.KeyboardMouse
call fcn.0040a7c0
movss xmm3, dword [0x461110]
lea ecx, [ebp - 0x17c]
call fcn.004028c0
sub esp, 0x18
movss dword [0x46aad0], xmm0
mov esi, esp
mov dword [ebp - 0x380], 0x1fe
sub esp, 8
mov ecx, esp
push str.NONE
call fcn.0040a7c0
sub esp, 8
mov ecx, esp
push str.MicCustomKey
call fcn.0040a7c0
sub esp, 8
mov ecx, esp
push str.Gamepad
call fcn.0040a7c0
push esi
lea ecx, [ebp - 0x17c]
call fcn.00402d60
call fcn.00403530
add esp, 0x18
mov dword [ebp - 0x39c], eax
test eax, eax
jne 0x407e8a
mov dword [0x46ab10], 1
jmp 0x407e90
mov dword [ebp - 0x380], eax
push 0
sub esp, 8
mov ecx, esp
push str.COMPort
call fcn.0040a7c0
sub esp, 8
mov ecx, esp
push str.ExternalPedals
call fcn.0040a7c0
lea ecx, [ebp - 0x17c]
call fcn.004025c0
test eax, eax
je 0x407fb9
push eax
lea eax, [ebp - 0x30]
push str..COM_d
push eax
call fcn.0040e370
add esp, 0xc
lea eax, [ebp - 0x30]
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x46d624], eax
cmp eax, 0xffffffff
je 0x407fb9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x407fb9
lea eax, [ebp - 0x15c]
mov dword [ebp - 0x15c], 0x1c
xorps xmm0, xmm0
push eax
push dword [0x46d624]
movlpd qword [ebp - 0x158], xmm0
movlpd qword [ebp - 0x150], xmm0
movlpd qword [ebp - 0x148], xmm0
call dword [sym.imp.KERNEL32.dll_GetCommState]
test eax, eax
je 0x407fb9
lea eax, [ebp - 0x15c]
mov dword [ebp - 0x158], 0x1c200
push eax
push dword [0x46d624]
mov word [ebp - 0x14a], 8
mov byte [ebp - 0x148], 0
call dword [sym.imp.KERNEL32.dll_SetCommState]
test eax, eax
je 0x407fb9
push 0xc
push dword [0x46d624]
mov byte [0x46ab14], 1
call dword [sym.imp.KERNEL32.dll_PurgeComm]
push 8
call fcn.00414e17
add esp, 4
mov dword [ebp - 0x354], eax
push 0x405820
mov ecx, eax
mov byte [ebp - 4], 3
call fcn.0040e390
mov byte [ebp - 4], 0
mov dword [0x46d630], eax
push 0x104
lea eax, [ebp - 0x134]
push 0
push eax
call fcn.0042c940
add esp, 0xc
lea eax, [ebp - 0x134]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryA]
push str.MediaWindows_Pop_up_Blocked.wav
lea eax, [ebp - 0x134]
push 0x104
push eax
call fcn.00436b83
add esp, 0xc
lea eax, [ebp - 0x328]
push eax
push str.Profiles.ini
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
push str.Desktop.ini
lea ecx, [ebp - 0x3dc]
mov esi, eax
call fcn.0040a6b0
lea eax, [ebp - 0x3dc]
mov byte [ebp - 4], 4
push eax
mov ecx, 0x46d644
call fcn.0040a200
lea ecx, [ebp - 0x3dc]
mov byte [ebp - 4], 0
call fcn.0040a5e0
push str.FPS.ini
lea ecx, [ebp - 0x3dc]
call fcn.0040a6b0
lea eax, [ebp - 0x3dc]
mov byte [ebp - 4], 5
push eax
mov ecx, 0x46d644
call fcn.0040a200
lea ecx, [ebp - 0x3dc]
mov byte [ebp - 4], 0
call fcn.0040a5e0
cmp esi, 0xffffffff
je 0x40814c
mov edi, dword [sym.imp.KERNEL32.dll_FindNextFileA]
nop word [eax + eax]
mov ecx, str.Desktop.ini
lea eax, [ebp - 0x2fc]
nop dword [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4080c0
test dl, dl
je 0x4080bc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4080c0
add eax, 2
add ecx, 2
test dl, dl
jne 0x4080a0
xor eax, eax
jmp 0x4080c5
sbb eax, eax
or eax, 1
test eax, eax
je 0x408133
mov ecx, str.FPS.ini
lea eax, [ebp - 0x2fc]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4080f4
test dl, dl
je 0x4080f0
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4080f4
add eax, 2
add ecx, 2
test dl, dl
jne 0x4080d4
xor eax, eax
jmp 0x4080f9
sbb eax, eax
or eax, 1
test eax, eax
je 0x408133
lea eax, [ebp - 0x2fc]
push eax
lea ecx, [ebp - 0x3dc]
call fcn.0040a6b0
lea eax, [ebp - 0x3dc]
mov byte [ebp - 4], 6
push eax
mov ecx, 0x46d644
call fcn.0040a200
lea ecx, [ebp - 0x3dc]
mov byte [ebp - 4], 0
call fcn.0040a5e0
lea eax, [ebp - 0x328]
push eax
push esi
call edi
test eax, eax
jne 0x408090
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
call fcn.00405c80
mov eax, dword [ebp - 0x384]
sub esp, 8
mov ecx, esp
mov byte [0x46d63f], al
mov byte [0x46d63e], 0xff
xor dl, dl
mov eax, dword [0x46d63c]
mov byte [0x46d642], dl
mov dword [ecx], eax
mov ax, word [0x46d640]
mov word [ecx + 4], ax
mov byte [ecx + 6], dl
call fcn.004058e0
xor esi, esi
mov byte [ebp - 0x35e], 0
mov dword [ebp - 0x35c], esi
mov dword [ebp - 0x3b0], esi
mov dword [ebp - 0x3b4], esi
mov dword [ebp - 0x388], esi
mov byte [ebp - 0x398], 0
mov dword [ebp - 0x364], esi
mov dword [ebp - 0x3ac], 2
call dword [sym.imp.JoyShockLibrary.dll_JslConnectDevices]
push eax
push 0x46aa80
mov dword [0x46aafc], eax
call dword [sym.imp.JoyShockLibrary.dll_JslGetConnectedDeviceHandles]
call fcn.00407270
call fcn.00411cb0
mov edi, eax
mov ecx, edi
mov dword [ebp - 0x3a0], edi
call fcn.00411d20
call fcn.00411f80
mov edx, eax
mov dword [ebp - 0x38c], eax
mov ecx, edi
call fcn.00411ff0
mov edx, dword [ebp - 0x38c]
mov ecx, edi
push esi
push 0x406150
call fcn.00412370
add esp, 0x18
lea ecx, [ebp - 0x1b4]
call fcn.0040a180
lea ecx, [ebp - 0x198]
call fcn.0040a180
lea ecx, [ebp - 0x1bc]
call fcn.00401260
xorps xmm0, xmm0
mov dword [ebp - 0x3fc], 0x1e
movsd qword [ebp - 0x408], xmm0
movsd qword [ebp - 0x410], xmm0
movsd xmm0, qword [ebp - 0x3cc]
movsd qword [ebp - 0x3e4], xmm0
mov edi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 0xa4
call edi
mov ecx, 0x8000
test cx, ax
je 0x408292
push 0x1b
call edi
mov ecx, 0x8000
test cx, ax
jne 0x40a0c7
push 1
push 0
push 0
push 0
lea eax, [ebp - 0x1e0]
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x4082d2
lea eax, [ebp - 0x1e0]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x1e0]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
cmp dword [ebp - 0x1dc], 0x12
je 0x40a0c7
test esi, esi
jne 0x4082ee
lea ecx, [esi + 0x11]
call fcn.004062c0
test al, al
je 0x4082ee
lea ecx, [esi + 0x52]
call fcn.004062c0
test al, al
jne 0x408305
mov ecx, dword [ebp - 0x400]
call fcn.004062c0
test al, al
jne 0x408305
cmp byte [0x46ab15], al
je 0x40835b
call dword [sym.imp.JoyShockLibrary.dll_JslConnectDevices]
push eax
push 0x46aa80
mov dword [0x46aafc], eax
call dword [sym.imp.JoyShockLibrary.dll_JslGetConnectedDeviceHandles]
call fcn.00405c80
mov eax, dword [0x46d63c]
mov ecx, esp
mov dword [ecx], eax
mov ax, word [0x46d640]
mov word [ecx + 4], ax
mov al, byte [0x46d642]
mov byte [ecx + 6], al
call fcn.004058e0
add esp, 8
mov byte [0x46ab15], 0
call fcn.00407270
mov esi, 0xf
mov dword [ebp - 0x35c], esi
push dword [0x46aa80]
xor eax, eax
mov dword [ebp - 0x370], eax
mov word [ebp - 0x140], ax
lea eax, [ebp - 0x42c]
push eax
call dword [sym.imp.JoyShockLibrary.dll_JslGetSimpleState]
add esp, 8
cmp dword [0x46aafc], 1
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x2c], xmm0
movq xmm0, qword [eax + 0x10]
mov eax, dword [eax + 0x18]
movq qword [ebp - 0x1c], xmm0
mov dword [ebp - 0x14], eax
jge 0x4083e9
xorps xmm0, xmm0
mov dword [ebp - 0x42c], 0
movups xmmword [ebp - 0x428], xmm0
mov dword [ebp - 0x418], 0
movups xmm0, xmmword [ebp - 0x42c]
mov dword [ebp - 0x414], 0
mov eax, dword [ebp - 0x414]
movups xmmword [ebp - 0x2c], xmm0
mov dword [ebp - 0x14], eax
movq xmm0, qword [ebp - 0x41c]
movq qword [ebp - 0x1c], xmm0
push dword [0x46aa80]
lea eax, [ebp - 0x490]
push eax
call dword [sym.imp.JoyShockLibrary.dll_JslGetMotionState]
xorps xmm2, xmm2
xorps xmm1, xmm1
movups xmm3, xmmword [eax]
movups xmm0, xmmword [eax + 0x10]
movups xmmword [ebp - 0x428], xmm0
movq xmm0, qword [eax + 0x20]
lea eax, [ebp - 0x428]
movq qword [ebp - 0x418], xmm0
movaps xmm0, xmm3
shufps xmm0, xmm3, 0xaa
cvtss2sd xmm0, xmm0
movsd qword [esp], xmm0
movaps xmm0, xmm3
shufps xmm0, xmm3, 0x55
cvtss2sd xmm2, xmm0
push eax
movaps xmm0, xmm3
shufps xmm0, xmm3, 0xff
cvtss2sd xmm1, xmm0
xorps xmm0, xmm0
cvtss2sd xmm0, xmm3
movaps xmm3, xmm2
movaps xmm2, xmm1
movaps xmm1, xmm0
call fcn.00405fb0
add esp, 0xc
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x460], xmm0
movups xmmword [ebp - 0x450], xmm0
movq xmm0, qword [eax + 0x10]
movsd qword [ebp - 0x3a8], xmm0
test esi, esi
jne 0x4084bf
lea ecx, [esi + 0x12]
call fcn.004062c0
test al, al
je 0x4084bf
lea ecx, [esi + 0x78]
call fcn.004062c0
test al, al
je 0x4084bf
cmp byte [0x46ab30], 0
sete al
mov byte [0x46ab30], al
test al, al
jne 0x4084b4
call fcn.00407270
mov esi, 0xf
mov dword [ebp - 0x35c], esi
cmp byte [0x46ab30], 0
je 0x40858f
movss xmm0, dword [ebp - 0x20]
call fcn.004010e0
cvtss2sd xmm0, xmm0
sub esp, 8
movsd qword [esp], xmm0
push str._Left_stick_X_6.2f_
call fcn.00401120
movss xmm0, dword [ebp - 0x1c]
call fcn.004010e0
cvtss2sd xmm0, xmm0
add esp, 4
movsd qword [esp], xmm0
push str.Y_6.2f_t
call fcn.00401120
movss xmm0, dword [ebp - 0x18]
call fcn.004010e0
cvtss2sd xmm0, xmm0
add esp, 4
movsd qword [esp], xmm0
push str.Right_stick_X_6.2f
call fcn.00401120
movss xmm0, dword [ebp - 0x14]
call fcn.004010e0
cvtss2sd xmm0, xmm0
add esp, 4
movsd qword [esp], xmm0
push str.Y_6.2f_t
call fcn.00401120
movss xmm0, dword [ebp - 0x28]
call fcn.004010e0
cvtss2sd xmm0, xmm0
add esp, 4
movsd qword [esp], xmm0
push str.Left_trigger_6.2f_t
call fcn.00401120
movss xmm0, dword [ebp - 0x24]
call fcn.004010e0
cvtss2sd xmm0, xmm0
add esp, 4
movsd qword [esp], xmm0
push str.Right_trigger_6.2f_n
call fcn.00401120
add esp, 0xc
mov al, byte [ebp - 0x2c]
mov edi, dword [ebp - 0x2c]
mov dword [ebp - 0x390], edi
mov byte [ebp - 0x355], al
test esi, esi
jne 0x40872c
mov ecx, 0x12
call fcn.004062c0
test al, al
je 0x4085e1
mov ecx, 0x51
call fcn.004062c0
test al, al
jne 0x408644
mov ecx, 0x25
call fcn.004062c0
test al, al
jne 0x408644
mov ecx, 0x27
call fcn.004062c0
test al, al
jne 0x408644
mov al, byte [ebp - 0x355]
test al, 0xc
je 0x4085f3
test edi, 0x10000
jne 0x40864a
mov ecx, 0x12
call fcn.004062c0
test al, al
je 0x40860f
mov ecx, 0x41
call fcn.004062c0
test al, al
jne 0x408621
mov eax, edi
and eax, 0x10200
cmp eax, 0x10200
jne 0x408710
cmp byte [0x46ab05], 0
sete byte [0x46ab05]
call fcn.00407270
mov esi, 0xf
mov dword [ebp - 0x35c], esi
jmp 0x40872c
mov al, byte [ebp - 0x355]
mov esi, 0x1e
mov dword [ebp - 0x35c], esi
test al, 4
jne 0x40866d
lea ecx, [esi + 7]
call fcn.004062c0
test al, al
jne 0x40866d
mov eax, dword [0x46ab00]
inc eax
jmp 0x4086d0
mov eax, dword [0x46ab00]
test eax, eax
jne 0x4086cf
mov eax, 3
mov dword [0x46ab00], eax
mov byte [0x46ab04], 0
cmp eax, 3
jne 0x4086b7
sub esp, 0x18
mov ecx, 0x46d644
mov esi, esp
push dword [0x46d620]
call fcn.0040a1c0
push eax
mov ecx, esi
call fcn.0040a6f0
call fcn.00406870
mov esi, dword [ebp - 0x35c]
add esp, 0x18
push 1
push 0
lea eax, [ebp - 0x134]
push eax
call dword [sym.imp.WINMM.dll_PlaySoundA]
call fcn.00407270
jmp 0x40872c
dec eax
mov dword [0x46ab00], eax
cmp eax, 3
jle 0x4086e3
xor eax, eax
mov dword [0x46ab00], eax
jmp 0x4086fb
cmp eax, 2
je 0x408680
cmp eax, 3
je 0x408680
test eax, eax
je 0x4086fb
cmp eax, 1
jne 0x408687
mov byte [0x46ab05], al
cmp byte [0x46ab04], 0
jne 0x408687
mov byte [0x46ab04], 1
jmp 0x408687
mov ecx, 0x12
call fcn.004062c0
test al, al
je 0x40872c
mov ecx, 0x57
call fcn.004062c0
test al, al
jne 0x40873a
mov eax, edi
and eax, 0x10020
cmp eax, 0x10020
jne 0x40875d
cmp byte [0x46ab0c], 0
sete byte [0x46ab0c]
call fcn.00407270
mov esi, 0xf
mov dword [ebp - 0x35c], esi
jmp 0x408a2c
test esi, esi
jne 0x408a2c
lea ecx, [esi + 0x12]
call fcn.004062c0
test al, al
je 0x40877d
lea ecx, [esi + 0x53]
call fcn.004062c0
test al, al
jne 0x40878b
mov eax, edi
and eax, 0x10040
cmp eax, 0x10040
jne 0x4087b3
mov eax, dword [0x46ab08]
xor ecx, ecx
inc eax
cmp eax, 2
cmovg eax, ecx
mov dword [0x46ab08], eax
call fcn.00407270
mov esi, 0xf
mov dword [ebp - 0x35c], esi
jmp 0x408a2c
mov ecx, 0x12
call fcn.004062c0
test al, al
je 0x408871
mov ecx, 0x58
call fcn.004062c0
test al, al
je 0x408871
mov eax, dword [0x46ab10]
mov ecx, dword [ebp - 0x39c]
inc eax
mov dword [0x46ab10], eax
cmp eax, 3
jle 0x4087f9
xor eax, eax
test ecx, ecx
sete al
mov dword [0x46ab10], eax
test eax, eax
je 0x408856
cmp eax, 1
jne 0x408821
mov dword [ebp - 0x380], 0x1fe
call fcn.00407270
mov esi, 0xf
mov dword [ebp - 0x35c], esi
jmp 0x408a2c
cmp eax, 2
jne 0x408845
mov dword [ebp - 0x380], 0x1ff
call fcn.00407270
mov esi, 0xf
mov dword [ebp - 0x35c], esi
jmp 0x408a2c
mov ecx, dword [ebp - 0x380]
cmp eax, 3
mov eax, 0x200
cmove ecx, eax
mov dword [ebp - 0x380], ecx
call fcn.00407270
mov esi, 0xf
mov dword [ebp - 0x35c], esi
jmp 0x408a2c
mov ecx, 0x12
call fcn.004062c0
test al, al
je 0x40888d
mov ecx, 0x42
call fcn.004062c0
test al, al
jne 0x40889b
mov eax, edi
and eax, 0x10100
cmp eax, 0x10100
jne 0x408911
mov cl, byte [0x46d63f]
cmp cl, 0xff
jne 0x4088b3
mov eax, dword [ebp - 0x384]
mov byte [0x46d63f], al
jmp 0x4088db
cmp byte [ebp - 0x371], 0
jne 0x4088d4
mov edx, dword [ebp - 0x384]
cmp cl, 4
movzx edx, dl
movzx eax, cl
cmova edx, eax
mov dword [ebp - 0x384], edx
mov byte [0x46d63f], 0xff
mov eax, dword [0x46d63c]
sub esp, 8
mov ecx, esp
mov dword [ecx], eax
mov ax, word [0x46d640]
mov word [ecx + 4], ax
mov al, byte [0x46d642]
mov byte [ecx + 6], al
call fcn.004058e0
mov esi, 0xf
add esp, 8
mov dword [ebp - 0x35c], esi
jmp 0x408a2c
cmp dword [0x46ab00], 3
jne 0x408a2c
test edi, 0x10000
je 0x40892f
test byte [ebp - 0x355], 3
jne 0x408977
mov ecx, 0x12
call fcn.004062c0
test al, al
je 0x408a2c
mov ecx, 0x26
call fcn.004062c0
test al, al
jne 0x408961
mov ecx, 0x28
call fcn.004062c0
test al, al
je 0x408a2c
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetConsoleWindow]
cmp eax, esi
jne 0x408a26
mov ecx, 0x26
mov dword [ebp - 0x35c], 0xf
call fcn.004062c0
test al, al
jne 0x408998
test byte [ebp - 0x355], 1
je 0x4089b1
mov eax, dword [0x46d620]
test eax, eax
jg 0x4089ab
mov ecx, 0x46d644
call fcn.0040a1e0
dec eax
mov dword [0x46d620], eax
mov ecx, 0x28
call fcn.004062c0
test al, al
jne 0x4089d0
test byte [ebp - 0x355], 2
jne 0x4089d0
mov ecx, dword [0x46d620]
jmp 0x4089f0
mov ecx, 0x46d644
call fcn.0040a1e0
mov ecx, dword [0x46d620]
dec eax
cmp ecx, eax
jae 0x4089e8
inc ecx
jmp 0x4089ea
xor ecx, ecx
mov dword [0x46d620], ecx
sub esp, 0x18
mov esi, esp
push ecx
mov ecx, 0x46d644
call fcn.0040a1c0
push eax
mov ecx, esi
call fcn.0040a6f0
call fcn.00406870
add esp, 0x18
call fcn.00407270
push 1
push 0
lea eax, [ebp - 0x134]
push eax
call dword [sym.imp.WINMM.dll_PlaySoundA]
mov esi, dword [ebp - 0x35c]
push dword [0x46aa80]
call dword [sym.imp.JoyShockLibrary.dll_JslGetControllerType]
add esp, 4
cmp eax, 5
je 0x408a58
push dword [0x46aa80]
call dword [sym.imp.JoyShockLibrary.dll_JslGetControllerType]
add esp, 4
cmp eax, 4
jne 0x408e8e
push dword [0x46aa80]
lea eax, [ebp - 0x42c]
push eax
call dword [sym.imp.JoyShockLibrary.dll_JslGetTouchState]
mov dl, byte [ebp - 0x35d]
add esp, 8
movsd xmm3, qword [0x461128]
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x15c], xmm0
movq xmm0, qword [eax + 0x10]
mov eax, dword [eax + 0x18]
movq qword [ebp - 0x14c], xmm0
movss xmm2, dword [ebp - 0x14c]
mov dword [ebp - 0x144], eax
mov al, byte [ebp - 0x154]
test dl, dl
jne 0x408b8f
movss xmm1, dword [ebp - 0x150]
test al, al
je 0x408b97
cvtps2pd xmm0, xmm2
comisd xmm3, xmm0
jb 0x408b97
cvtps2pd xmm0, xmm1
comisd xmm0, xmmword [0x461148]
jb 0x408b97
movsd xmm4, qword [0x461168]
cvtps2pd xmm0, xmm1
comisd xmm4, xmm0
jb 0x408b97
cvtps2pd xmm0, xmm1
lea edx, [ebp - 0x378]
mov dword [ebp - 0x37c], 0xff
lea ecx, [ebp - 0x368]
mov dword [ebp - 0x378], 0
subsd xmm0, qword [0x461158]
mulsd xmm0, qword [0x4611b0]
mulsd xmm0, qword [0x4611a0]
cvttsd2si eax, xmm0
mov dword [ebp - 0x368], eax
lea eax, [ebp - 0x37c]
push eax
call fcn.0040e350
push ecx
mov ecx, esp
mov al, byte [eax]
not al
mov byte [0x46d63f], al
mov eax, dword [0x46d63c]
mov dword [ecx], eax
mov ax, word [0x46d640]
mov word [ecx + 4], ax
mov al, byte [0x46d642]
mov byte [ecx + 6], al
call fcn.004058e0
movss xmm2, dword [ebp - 0x14c]
add esp, 8
movsd xmm3, qword [0x461128]
mov dl, byte [ebp - 0x35d]
mov al, byte [ebp - 0x154]
movss xmm1, dword [ebp - 0x150]
test edi, 0x20000
jne 0x408bb4
test al, al
je 0x408e8e
cmp byte [0x46ab0c], 0
je 0x408e8e
test esi, esi
jne 0x408c34
cvtps2pd xmm0, xmm2
comisd xmm3, xmm0
jb 0x408c34
mov eax, dword [ebp - 0x394]
inc eax
mov dword [ebp - 0x394], eax
cmp eax, 1
jle 0x408c24
cmp byte [ebp - 0x371], 0
je 0x408c11
mov eax, dword [ebp - 0x384]
mov ecx, 0xff
cmp byte [0x46d63f], cl
mov esi, 0xf
movzx eax, al
cmove ecx, eax
mov dword [ebp - 0x35c], esi
mov byte [0x46d63f], cl
xor ecx, ecx
mov dword [ebp - 0x394], ecx
jmp 0x408e40
test dl, dl
sete cl
mov byte [ebp - 0x35d], cl
xor ecx, ecx
mov dword [ebp - 0x394], ecx
mov esi, 0xf
mov dword [ebp - 0x35c], esi
jmp 0x408e40
cvtps2pd xmm0, xmm2
comisd xmm0, xmm3
jbe 0x408e40
movsd xmm4, qword [0x461150]
xorps xmm0, xmm0
comiss xmm1, xmm0
mov eax, dword [ebp - 0x364]
jbe 0x408ca2
cvtps2pd xmm0, xmm1
comisd xmm4, xmm0
jb 0x408ca2
cmp eax, 4
je 0x408ca2
movups xmm0, xmmword [ebp - 0x460]
mov dword [ebp - 0x364], 1
movq xmm1, qword [ebp - 0x3a8]
movups xmmword [ebp - 0x3dc], xmm0
mov word [0x46d63d], 0
movsd qword [ebp - 0x3e4], xmm1
mov byte [0x46d63c], 0xff
jmp 0x408e1f
cvtps2pd xmm0, xmm1
comisd xmm0, xmm4
movsd xmm4, qword [0x461160]
jbe 0x408da1
cvtps2pd xmm0, xmm1
comisd xmm4, xmm0
jb 0x408da1
cvtps2pd xmm0, xmm2
comisd xmm0, xmm3
jbe 0x408d85
movsd xmm1, qword [0x461170]
cvtps2pd xmm0, xmm2
comisd xmm1, xmm0
jbe 0x408d85
mov dword [ebp - 0x364], 0
call fcn.00405e60
mov ecx, dword [ebp - 0x388]
mov eax, 0x28
test ecx, ecx
cmove ecx, eax
cmp byte [ebp - 0x369], 0
mov dword [ebp - 0x388], ecx
je 0x408d6a
mov edx, dword [ebp - 0x398]
cmp ecx, 0x28
movzx eax, byte [0x46d63f]
movzx edx, dl
cmove edx, eax
mov word [0x46d63d], 0xff
mov al, byte [0x46aa98]
mov dword [ebp - 0x398], edx
cmp al, 0x1e
jb 0x408d4b
mov byte [0x46d63c], 0
jmp 0x408d5f
mov byte [0x46d63c], 0xff
cmp al, 0xa
jae 0x408d5f
mov word [0x46d63d], 0
mov eax, dword [ebp - 0x384]
mov byte [0x46d63f], al
mov al, byte [0x46aa99]
mov byte [0x46d642], al
mov byte [0x46ab0d], 1
call fcn.00407270
jmp 0x408e1f
mov dword [ebp - 0x364], 4
mov word [0x46d63d], 0xff00
mov byte [0x46d63c], 0xff
jmp 0x408e1f
cvtps2pd xmm0, xmm1
comisd xmm0, xmm4
jbe 0x408e1f
movss xmm0, dword [0x46111c]
comiss xmm0, xmm1
jb 0x408e1f
cmp eax, 4
je 0x408e1f
movups xmm0, xmmword [ebp - 0x460]
movups xmmword [ebp - 0x3dc], xmm0
movq xmm0, qword [ebp - 0x3a8]
movsd qword [ebp - 0x3e4], xmm0
cvtps2pd xmm0, xmm2
comisd xmm0, xmm3
jbe 0x408e05
movss xmm0, dword [0x461114]
comiss xmm0, xmm2
jbe 0x408e05
mov dword [ebp - 0x364], 2
mov word [0x46d63d], 0xffff
jmp 0x408e18
mov dword [ebp - 0x364], 3
mov word [0x46d63d], 0xff
mov byte [0x46d63c], 0
xor ecx, ecx
mov dword [ebp - 0x394], ecx
mov cl, byte [ebp - 0x35d]
movzx eax, cl
test cl, cl
mov ecx, 1
cmove eax, ecx
mov byte [ebp - 0x35d], al
mov eax, dword [0x46d63c]
sub esp, 8
mov ecx, esp
mov dword [ecx], eax
mov ax, word [0x46d640]
mov word [ecx + 4], ax
mov al, byte [0x46d642]
mov byte [ecx + 6], al
call fcn.004058e0
add esp, 8
cmp dword [0x46ab00], 1
jne 0x408e8e
mov ecx, dword [ebp - 0x364]
mov edx, 1
movzx eax, byte [0x46ab31]
cmp ecx, 1
cmovne eax, edx
mov byte [0x46ab31], al
jmp 0x408e94
mov ecx, dword [ebp - 0x364]
mov dword [ebp - 0x368], ecx
test esi, esi
jne 0x408f12
lea ecx, [esi + 0x12]
call fcn.004062c0
test al, al
je 0x408f12
lea ecx, [esi + 0x49]
call fcn.004062c0
test al, al
je 0x408f12
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetConsoleWindow]
cmp eax, esi
jne 0x408f0c
mov esi, 0xf
mov dword [ebp - 0x35c], esi
call fcn.00405e60
mov eax, dword [ebp - 0x388]
test eax, eax
jne 0x408eee
mov dword [ebp - 0x388], 0x28
jmp 0x408ef3
cmp eax, 0x28
jne 0x408efe
mov al, byte [0x46d63f]
mov dword [ebp - 0x398], eax
mov byte [0x46ab0d], 1
call fcn.00407270
jmp 0x408f12
mov esi, dword [ebp - 0x35c]
cmp byte [0x46aab0], 0
movss xmm1, dword [0x46aaa0]
movss xmm0, dword [ebp - 0x20]
je 0x408f2f
xorps xmm0, xmmword [0x461220]
call fcn.004061c0
cmp byte [0x46aab0], 0
mulss xmm0, dword [0x4611ec]
movss xmm1, dword [0x46aaa4]
cvttss2si eax, xmm0
movss xmm0, dword [ebp - 0x1c]
mov word [ebp - 0x13c], ax
je 0x408f64
xorps xmm0, xmmword [0x461220]
call fcn.004061c0
cmp byte [0x46aab2], 0
mulss xmm0, dword [0x4611ec]
movss xmm1, dword [0x46aaa8]
cvttss2si eax, xmm0
movss xmm0, dword [ebp - 0x18]
mov word [ebp - 0x13a], ax
je 0x408f99
xorps xmm0, xmmword [0x461220]
call fcn.004061c0
cmp byte [0x46aab3], 0
mulss xmm0, dword [0x4611ec]
movss xmm1, dword [0x46aaac]
cvttss2si eax, xmm0
movss xmm0, dword [ebp - 0x14]
mov dword [ebp - 0x378], eax
mov word [ebp - 0x138], ax
je 0x408fd4
xorps xmm0, xmmword [0x461220]
call fcn.004061c0
cmp dword [0x46ab08], 1
mulss xmm0, dword [0x4611ec]
cvttss2si eax, xmm0
mov dword [ebp - 0x3ec], eax
mov word [ebp - 0x136], ax
jne 0x409038
movss xmm2, dword [ebp - 0x20]
movss xmm0, dword [ebp - 0x1c]
movaps xmm1, xmm2
mulss xmm0, xmm0
mulss xmm1, xmm2
addss xmm0, xmm1
call fcn.004010f0
comiss xmm0, dword [ebp - 0x3f8]
jb 0x409038
mov eax, dword [ebp - 0x370]
or eax, 0x40
mov dword [ebp - 0x370], eax
mov word [ebp - 0x140], ax
movss xmm1, dword [0x46aab4]
movss xmm0, dword [ebp - 0x28]
call fcn.004061c0
mulss xmm0, dword [0x4611e4]
movss xmm1, dword [0x46aab8]
cvttss2si eax, xmm0
movss xmm0, dword [ebp - 0x24]
mov byte [ebp - 0x13e], al
call fcn.004061c0
cmp byte [0x46ab14], 0
mulss xmm0, dword [0x4611e4]
cvttss2si eax, xmm0
mov byte [ebp - 0x13d], al
je 0x4090f9
movss xmm1, dword [0x46aab4]
movss xmm0, dword [ebp - 0x28]
call fcn.004061c0
xorps xmm1, xmm1
ucomiss xmm0, xmm1
lahf
test ah, 0x44
jp 0x4090c1
movss xmm0, dword [0x46d634]
mulss xmm0, dword [0x4611e4]
cvttss2si eax, xmm0
mov byte [ebp - 0x13e], al
movss xmm1, dword [0x46aab8]
movss xmm0, dword [ebp - 0x24]
call fcn.004061c0
xorps xmm1, xmm1
ucomiss xmm0, xmm1
lahf
test ah, 0x44
jp 0x4090f9
movss xmm0, dword [0x46d638]
mulss xmm0, dword [0x4611e4]
cvttss2si eax, xmm0
mov byte [ebp - 0x13d], al
push dword [0x46aa80]
call dword [sym.imp.JoyShockLibrary.dll_JslGetControllerType]
add esp, 4
cmp eax, 5
je 0x40915d
push dword [0x46aa80]
call dword [sym.imp.JoyShockLibrary.dll_JslGetControllerType]
add esp, 4
cmp eax, 4
je 0x40915d
push dword [0x46aa80]
call dword [sym.imp.JoyShockLibrary.dll_JslGetControllerType]
add esp, 4
cmp eax, 3
je 0x409165
push dword [0x46aa80]
call dword [sym.imp.JoyShockLibrary.dll_JslGetControllerType]
add esp, 4
cmp eax, 1
je 0x409165
push dword [0x46aa80]
call dword [sym.imp.JoyShockLibrary.dll_JslGetControllerType]
add esp, 4
cmp eax, 2
jmp 0x409163
test edi, 0x10000
jne 0x409180
mov ecx, dword [ebp - 0x370]
mov eax, edi
and eax, 0x30
or cx, ax
mov word [ebp - 0x140], cx
mov dword [ebp - 0x370], ecx
mov eax, edi
and eax, 0x10000
mov dword [ebp - 0x37c], eax
jne 0x4091c8
mov eax, edi
and eax, 0x300
or eax, dword [ebp - 0x140]
cmp dword [0x46ab08], 2
movzx ecx, ax
mov eax, edi
jne 0x4091ac
not eax
and eax, 0x40
or ecx, eax
mov eax, edi
and eax, 0xf08f
or cx, ax
mov dword [ebp - 0x370], ecx
mov word [ebp - 0x140], cx
push dword [0x46aa80]
call dword [sym.imp.JoyShockLibrary.dll_JslGetControllerType]
add esp, 4
cmp eax, 3
je 0x409208
push dword [0x46aa80]
call dword [sym.imp.JoyShockLibrary.dll_JslGetControllerType]
add esp, 4
cmp eax, 1
je 0x409208
push dword [0x46aa80]
call dword [sym.imp.JoyShockLibrary.dll_JslGetControllerType]
add esp, 4
cmp eax, 2
jne 0x4092d8
test esi, esi
jne 0x4092d8
test edi, 0x20000
je 0x409261
cmp dword [ebp - 0x364], 1
je 0x40923f
movups xmm0, xmmword [ebp - 0x460]
movups xmmword [ebp - 0x3dc], xmm0
movq xmm0, qword [ebp - 0x3a8]
movsd qword [ebp - 0x3e4], xmm0
xor eax, eax
mov esi, 0xf
cmp dword [ebp - 0x368], 1
setne al
mov dword [ebp - 0x364], eax
mov eax, dword [ebp - 0x37c]
jmp 0x4092e4
mov eax, dword [ebp - 0x37c]
test eax, eax
je 0x4092de
mov eax, dword [ebp - 0x364]
test eax, eax
je 0x4092bf
cmp eax, 1
je 0x4092bf
cmp eax, 2
jne 0x40929e
lea esi, [eax + 0xd]
mov dword [ebp - 0x364], 3
mov eax, dword [ebp - 0x37c]
mov dword [ebp - 0x3ac], 3
jmp 0x4092e4
mov eax, dword [ebp - 0x37c]
mov esi, 0xf
mov dword [ebp - 0x364], 2
mov dword [ebp - 0x3ac], 2
jmp 0x4092e4
mov eax, dword [ebp - 0x3ac]
mov esi, 0xf
mov dword [ebp - 0x364], eax
mov eax, dword [ebp - 0x37c]
jmp 0x4092e4
mov eax, dword [ebp - 0x37c]
mov esi, dword [ebp - 0x35c]
mov ecx, dword [ebp - 0x3b4]
test ecx, ecx
jne 0x409302
cmp edi, 0x10000
jne 0x409302
lea edx, [ecx + 0x14]
mov byte [ebp - 0x35e], 1
jmp 0x409325
mov edx, dword [ebp - 0x3b0]
test edx, edx
jle 0x409347
cmp edx, 1
jne 0x409325
cmp byte [ebp - 0x35e], 0
cmovne ecx, dword [ebp - 0x3fc]
mov dword [ebp - 0x3b4], ecx
dec edx
mov dword [ebp - 0x3b0], edx
cmp edi, 0x10000
je 0x409347
test edi, edi
je 0x409347
xor edx, edx
mov byte [ebp - 0x35e], 0
mov dword [ebp - 0x3b0], edx
test eax, eax
je 0x40935a
cmp edi, 0x10000
je 0x40935a
mov ecx, 0x1e
jmp 0x40935e
test ecx, ecx
jle 0x409365
dec ecx
mov dword [ebp - 0x3b4], ecx
cmp edx, 1
jne 0x409377
cmp byte [ebp - 0x35e], 0
je 0x409377
mov dl, dl
jmp 0x409379
xor dl, dl
push 0x46d6f4
mov ecx, 0x1fd
call fcn.00403080
mov eax, edi
mov ecx, 0xae
and eax, 0x14000
cmp eax, 0x14000
push 0x46d70c
sete dl
call fcn.00403080
mov eax, edi
mov ecx, 0xaf
and eax, 0x12000
cmp eax, 0x12000
push 0x46d704
sete dl
call fcn.00403080
add esp, 0xc
test edi, 0x40000
jne 0x4093e1
mov eax, edi
and eax, 0x11000
cmp eax, 0x11000
je 0x4093e1
xor dl, dl
jmp 0x4093e3
mov dl, 1
mov ecx, dword [ebp - 0x380]
push 0x46d6fc
call fcn.00403080
add esp, 4
test esi, esi
jne 0x409443
mov eax, edi
and eax, 0x18000
cmp eax, 0x18000
jne 0x409443
movss xmm0, dword [0x46aaf8]
cvtps2pd xmm0, xmm0
addsd xmm0, qword [0x461138]
cvtpd2ps xmm0, xmm0
movss dword [0x46aaf8], xmm0
cvtps2pd xmm0, xmm0
comisd xmm0, xmmword [0x461188]
jbe 0x40943e
mov dword [0x46aaf8], 0x3e4ccccd
mov esi, 0xf
mov eax, edi
mov dword [ebp - 0x354], esi
and eax, 0x10080
cmp eax, 0x10080
jne 0x409461
mov dword [0x46aaf8], 0x3f800000
mov esi, dword [ebp - 0x364]
cmp esi, 1
jne 0x4095a2
cmp byte [0x46aaf1], 0
movss xmm0, dword [0x46aaec]
je 0x4094ca
movss dword [ebp - 0x378], xmm0
movsd xmm0, qword [ebp - 0x3e4]
call fcn.004060f0
cvtsd2ss xmm0, xmm0
movss dword [ebp - 0x368], xmm0
movsd xmm0, qword [ebp - 0x3a8]
call fcn.004060f0
movss xmm1, dword [ebp - 0x368]
cvtsd2ss xmm0, xmm0
call fcn.00406110
movss xmm1, dword [ebp - 0x378]
jmp 0x409511
movss dword [ebp - 0x378], xmm0
movsd xmm0, qword [ebp - 0x3dc]
call fcn.004060f0
cvtsd2ss xmm0, xmm0
movss dword [ebp - 0x368], xmm0
movsd xmm0, qword [ebp - 0x450]
call fcn.004060f0
movss xmm1, dword [ebp - 0x368]
cvtsd2ss xmm0, xmm0
call fcn.00406110
movss xmm1, dword [ebp - 0x378]
mulsd xmm0, qword [0x4611f8]
call fcn.004062d0
cmp byte [0x46aaf0], 0
mov word [ebp - 0x13c], ax
je 0x409c78
movss xmm0, dword [0x46aaec]
movss dword [ebp - 0x378], xmm0
movsd xmm0, qword [ebp - 0x3d4]
call fcn.004060f0
cvtsd2ss xmm0, xmm0
movss dword [ebp - 0x368], xmm0
movsd xmm0, qword [ebp - 0x448]
call fcn.004060f0
movss xmm1, dword [ebp - 0x368]
cvtsd2ss xmm0, xmm0
call fcn.00406110
movd xmm2, dword [0x46aaf4]
movss xmm1, dword [ebp - 0x378]
cvtdq2pd xmm2, xmm2
mulsd xmm0, xmm2
call fcn.004062d0
mov word [ebp - 0x13a], ax
jmp 0x409c78
cmp esi, 2
je 0x409966
cmp esi, 3
je 0x409966
cmp esi, 4
jne 0x409c78
cmp byte [ebp - 0x154], 0
je 0x409795
cmp byte [ebp - 0x1b4], 0
movss xmm4, dword [ebp - 0x150]
movss xmm0, dword [ebp - 0x14c]
jne 0x409602
movaps xmm1, xmm4
mov byte [ebp - 0x1b4], 1
movaps xmm3, xmm0
movss dword [ebp - 0x1b0], xmm1
movss dword [ebp - 0x1ac], xmm3
jmp 0x409612
movss xmm3, dword [ebp - 0x1ac]
movss xmm1, dword [ebp - 0x1b0]
subss xmm0, xmm3
movaps xmm2, xmm4
subss xmm2, xmm1
movss dword [ebp - 0x1a4], xmm0
movss xmm0, dword [0x461114]
comiss xmm0, xmm1
movss xmm1, dword [0x4611f0]
movss dword [ebp - 0x1a8], xmm2
jbe 0x4096d3
movss xmm0, dword [ebp - 0x3c4]
mulss xmm0, xmm2
movss xmm2, dword [0x46111c]
call fcn.00406200
mulss xmm0, dword [0x4611ec]
movss xmm2, dword [0x46111c]
movss xmm1, dword [0x4611f0]
cvttss2si eax, xmm0
movss xmm0, dword [ebp - 0x3c0]
mulss xmm0, dword [ebp - 0x1a4]
mov word [ebp - 0x13c], ax
xorps xmm0, xmmword [0x461220]
call fcn.00406200
mulss xmm0, dword [0x4611ec]
cvttss2si eax, xmm0
mov word [ebp - 0x13a], ax
test edi, 0x20000
je 0x4097b0
mov eax, dword [ebp - 0x370]
or ax, 0x40
mov word [ebp - 0x140], ax
jmp 0x4097b0
movss xmm2, dword [0x46111c]
movaps xmm0, xmm4
subss xmm0, dword [ebp - 0x1a0]
mulss xmm0, dword [ebp - 0x3b8]
mulss xmm0, dword [0x4611e0]
call fcn.00406200
mulss xmm0, dword [0x4611ec]
movss xmm2, dword [0x46111c]
movss xmm1, dword [0x4611f0]
cvttss2si eax, xmm0
movss xmm0, dword [ebp - 0x14c]
subss xmm0, dword [ebp - 0x19c]
mov word [ebp - 0x138], ax
mulss xmm0, dword [ebp - 0x3bc]
mulss xmm0, dword [0x461204]
call fcn.00406200
mulss xmm0, dword [0x4611ec]
cvttss2si eax, xmm0
movss xmm0, dword [ebp - 0x150]
movss dword [ebp - 0x1a0], xmm0
movss xmm0, dword [ebp - 0x14c]
mov word [ebp - 0x136], ax
movss dword [ebp - 0x19c], xmm0
test edi, 0x20000
je 0x4097b0
mov eax, dword [ebp - 0x370]
mov ecx, 0x80
or ax, cx
mov word [ebp - 0x140], ax
jmp 0x4097b0
mov dword [ebp - 0x1a8], 0
mov dword [ebp - 0x1a4], 0
mov byte [ebp - 0x1b4], 0
cmp byte [ebp - 0x153], 0
je 0x409946
cmp byte [ebp - 0x198], 0
movss xmm4, dword [ebp - 0x148]
movss xmm0, dword [ebp - 0x144]
jne 0x4097f5
movaps xmm1, xmm4
mov byte [ebp - 0x198], 1
movaps xmm3, xmm0
movss dword [ebp - 0x194], xmm1
movss dword [ebp - 0x190], xmm3
jmp 0x409805
movss xmm3, dword [ebp - 0x190]
movss xmm1, dword [ebp - 0x194]
subss xmm0, xmm3
movaps xmm2, xmm4
subss xmm2, xmm1
movss dword [ebp - 0x188], xmm0
movss xmm0, dword [0x461114]
comiss xmm0, xmm1
movss xmm1, dword [0x4611f0]
movss dword [ebp - 0x18c], xmm2
jbe 0x4098a5
movss xmm0, dword [ebp - 0x3c4]
mulss xmm0, xmm2
movss xmm2, dword [0x46111c]
call fcn.00406200
mulss xmm0, dword [0x4611ec]
movss xmm2, dword [0x46111c]
movss xmm1, dword [0x4611f0]
cvttss2si eax, xmm0
movss xmm0, dword [ebp - 0x188]
mulss xmm0, dword [ebp - 0x3c0]
mov word [ebp - 0x13c], ax
xorps xmm0, xmmword [0x461220]
call fcn.00406200
mulss xmm0, dword [0x4611ec]
cvttss2si eax, xmm0
mov word [ebp - 0x13a], ax
jmp 0x409c78
movss xmm2, dword [0x46111c]
movaps xmm0, xmm4
subss xmm0, dword [ebp - 0x184]
mulss xmm0, dword [ebp - 0x3b8]
mulss xmm0, dword [0x4611e0]
call fcn.00406200
mulss xmm0, dword [0x4611ec]
movss xmm2, dword [0x46111c]
movss xmm1, dword [0x4611f0]
cvttss2si eax, xmm0
movss xmm0, dword [ebp - 0x144]
subss xmm0, dword [ebp - 0x180]
mov word [ebp - 0x138], ax
mulss xmm0, dword [ebp - 0x3bc]
mulss xmm0, dword [0x461204]
call fcn.00406200
mulss xmm0, dword [0x4611ec]
cvttss2si eax, xmm0
movss xmm0, dword [ebp - 0x148]
movss dword [ebp - 0x184], xmm0
movss xmm0, dword [ebp - 0x144]
movss dword [ebp - 0x180], xmm0
jmp 0x409c71
mov dword [ebp - 0x18c], 0
mov dword [ebp - 0x188], 0
mov byte [ebp - 0x198], 0
jmp 0x409c78
movsd xmm0, qword [ebp - 0x450]
subsd xmm0, qword [ebp - 0x408]
call fcn.004060f0
movss xmm1, dword [0x46aad4]
mulss xmm1, dword [0x461118]
mulsd xmm0, qword [0x461140]
cvtps2pd xmm1, xmm1
addsd xmm1, xmm0
cvtpd2ps xmm0, xmm1
movss dword [0x46aad4], xmm0
movsd xmm0, qword [ebp - 0x448]
subsd xmm0, qword [ebp - 0x410]
call fcn.004060f0
movss xmm1, dword [0x46aad8]
lea ecx, [ebp - 0x1c4]
mulss xmm1, dword [0x461118]
mulsd xmm0, qword [0x461140]
cvtps2pd xmm1, xmm1
addsd xmm1, xmm0
cvtpd2ps xmm0, xmm1
movss dword [ebp - 0x35c], xmm0
movss dword [0x46aad8], xmm0
movss xmm0, dword [0x46aad4]
movss dword [ebp - 0x370], xmm0
call fcn.00401260
lea eax, [ebp - 0x1bc]
push eax
lea edx, [ebp - 0x1c4]
lea ecx, [ebp - 0x468]
call fcn.0040e470
add esp, 4
lea ecx, [ebp - 0x1e8]
push eax
call fcn.0040e4a0
lea ecx, [ebp - 0x1e8]
call fcn.0040a7f0
movss xmm1, dword [ebp - 0x35c]
mov eax, dword [ebp - 0x1c4]
cvtsd2ss xmm0, xmm0
mov dword [ebp - 0x1bc], eax
mov eax, dword [ebp - 0x1c0]
mov dword [ebp - 0x1b8], eax
mulss xmm1, xmm1
movss dword [ebp - 0x368], xmm0
movss xmm0, dword [ebp - 0x370]
mulss xmm0, xmm0
addss xmm0, xmm1
call fcn.004010f0
movss xmm1, dword [ebp - 0x368]
mulss xmm1, dword [0x4611d4]
comiss xmm0, xmm1
jbe 0x409ac1
divss xmm1, xmm0
movss xmm0, dword [ebp - 0x370]
mulss xmm0, xmm1
movss dword [ebp - 0x370], xmm0
movss xmm0, dword [ebp - 0x35c]
mulss xmm0, xmm1
movss dword [ebp - 0x35c], xmm0
movsd xmm0, qword [ebp - 0x450]
movsd qword [ebp - 0x408], xmm0
movsd xmm0, qword [ebp - 0x448]
movsd qword [ebp - 0x410], xmm0
cmp esi, 2
je 0x409b0d
cmp esi, 3
jne 0x409c78
movss xmm1, dword [0x46aab4]
movss xmm0, dword [ebp - 0x28]
call fcn.004061c0
xorps xmm1, xmm1
comiss xmm0, xmm1
jbe 0x409c78
cmp byte [0x46ab05], 1
jne 0x409b60
movss xmm1, dword [ebp - 0x35c]
movss xmm0, dword [ebp - 0x370]
mulss xmm1, dword [0x4611f0]
mulss xmm0, dword [0x4611f0]
mulss xmm1, dword [0x46aae0]
mulss xmm0, dword [0x46aadc]
mulss xmm1, dword [0x46aaf8]
mulss xmm0, dword [0x46aaf8]
call fcn.00406220
jmp 0x409c78
movss xmm0, dword [0x46aae4]
mulss xmm0, dword [ebp - 0x370]
mov dword [ebp - 0x368], 0x7fff
movss xmm2, dword [0x46111c]
movss xmm1, dword [0x4611f0]
mulss xmm0, dword [0x46aaf8]
mov dword [ebp - 0x3a4], 0xffff8001
xorps xmm0, xmmword [0x461220]
call fcn.00406200
mov eax, dword [ebp - 0x378]
lea edx, [ebp - 0x3a4]
mulss xmm0, dword [0x4611ec]
lea ecx, [ebp - 0x3e8]
cwde
movd xmm1, eax
cvtdq2ps xmm1, xmm1
addss xmm0, xmm1
cvttss2si eax, xmm0
mov dword [ebp - 0x3e8], eax
lea eax, [ebp - 0x368]
push eax
call fcn.0040e350
movss xmm0, dword [0x46aae8]
mulss xmm0, dword [ebp - 0x35c]
movzx eax, word [eax]
movss xmm2, dword [0x46111c]
mulss xmm0, dword [0x46aaf8]
mov word [ebp - 0x138], ax
movss xmm1, dword [0x4611f0]
mov dword [ebp - 0x3a4], 0x7fff
mov dword [ebp - 0x368], 0xffff8001
call fcn.00406200
mov eax, dword [ebp - 0x3ec]
lea edx, [ebp - 0x368]
mulss xmm0, dword [0x4611ec]
lea ecx, [ebp - 0x3f0]
cwde
movd xmm1, eax
cvtdq2ps xmm1, xmm1
addss xmm0, xmm1
cvttss2si eax, xmm0
mov dword [ebp - 0x3f0], eax
lea eax, [ebp - 0x3a4]
push eax
call fcn.0040e350
add esp, 8
movzx eax, word [eax]
mov word [ebp - 0x136], ax
mov edx, dword [0x46ab00]
cmp edx, 3
jne 0x409f91
cmp dword [ebp - 0x37c], 0
jne 0x409f91
movss xmm0, dword [ebp - 0x28]
comiss xmm0, dword [0x46aad0]
mov ecx, dword [0x46d664]
push 0x46d660
seta dl
call fcn.00403080
movss xmm0, dword [ebp - 0x24]
comiss xmm0, dword [0x46aad0]
mov ecx, dword [0x46d66c]
push 0x46d668
seta dl
call fcn.00403080
mov ecx, dword [0x46d654]
mov edx, edi
shr edx, 8
push 0x46d650
and dl, 1
call fcn.00403080
mov ecx, dword [0x46d65c]
mov edx, edi
shr edx, 9
push 0x46d658
and dl, 1
call fcn.00403080
mov ecx, dword [0x46d674]
test edi, 0x20020
push 0x46d670
setne dl
call fcn.00403080
mov ecx, dword [0x46d67c]
test edi, 0x10010
push 0x46d678
setne dl
call fcn.00403080
mov ecx, dword [0x46d6a4]
add esp, 0x18
cmp byte [0x46d6b8], 0
push 0x46d6a0
jne 0x409da8
mov dl, byte [ebp - 0x355]
and dl, 1
call fcn.00403080
mov ecx, dword [0x46d6ac]
mov edx, edi
shr edx, 1
push 0x46d6a8
and dl, 1
call fcn.00403080
mov ecx, dword [0x46d6b4]
mov edx, edi
shr edx, 2
push 0x46d6b0
and dl, 1
call fcn.00403080
mov ecx, dword [0x46d6c0]
mov edx, edi
shr edx, 3
push 0x46d6bc
and dl, 1
call fcn.00403080
add esp, 0x10
jmp 0x409e6c
mov eax, edi
and al, 0xd
cmp al, 1
sete dl
call fcn.00403080
mov ecx, dword [0x46d6b4]
mov eax, edi
and al, 7
cmp al, 4
push 0x46d6b0
sete dl
call fcn.00403080
mov ecx, dword [0x46d6c0]
mov eax, edi
and al, 0xb
cmp al, 8
push 0x46d6bc
sete dl
call fcn.00403080
mov ecx, dword [0x46d6ac]
mov eax, edi
and al, 0xe
cmp al, 2
push 0x46d6a8
sete dl
call fcn.00403080
mov ecx, dword [0x46d6c8]
mov eax, edi
and eax, 5
cmp al, 5
push 0x46d6c4
sete dl
call fcn.00403080
mov ecx, dword [0x46d6d0]
mov eax, edi
and eax, 9
cmp al, 9
push 0x46d6cc
sete dl
call fcn.00403080
mov ecx, dword [0x46d6d8]
mov eax, edi
and eax, 6
cmp al, 6
push 0x46d6d4
sete dl
call fcn.00403080
mov ecx, dword [0x46d6e0]
mov eax, edi
and eax, 0xa
cmp al, 0xa
push 0x46d6dc
sete dl
call fcn.00403080
add esp, 0x20
mov ecx, dword [0x46d684]
mov edx, edi
shr edx, 0xf
push 0x46d680
and dl, 1
call fcn.00403080
mov ecx, dword [0x46d694]
mov edx, edi
shr edx, 0xc
push 0x46d690
and dl, 1
call fcn.00403080
mov ecx, dword [0x46d68c]
mov edx, edi
shr edx, 0xe
push 0x46d688
and dl, 1
call fcn.00403080
mov ecx, dword [0x46d69c]
mov edx, edi
shr edx, 0xd
push 0x46d698
and dl, 1
call fcn.00403080
mov ecx, dword [0x46d6e8]
mov edx, edi
shr edx, 6
push 0x46d6e4
and dl, 1
call fcn.00403080
mov edx, dword [ebp - 0x390]
mov ecx, dword [0x46d6f0]
shr edx, 7
push 0x46d6ec
and dl, 1
call fcn.00403080
movss xmm1, dword [0x46aaa4]
add esp, 0x18
movss xmm0, dword [ebp - 0x1c]
mov esi, dword [0x46aabc]
call fcn.004061c0
movss xmm1, dword [0x46aaa0]
movss dword [ebp - 0x390], xmm0
movss xmm0, dword [ebp - 0x20]
call fcn.004061c0
movss xmm1, dword [ebp - 0x390]
mov ecx, esi
call fcn.00406320
movss xmm1, dword [0x46aaac]
movss xmm0, dword [ebp - 0x14]
mov esi, dword [0x46aac0]
call fcn.004061c0
movss xmm1, dword [0x46aaa8]
movss dword [ebp - 0x390], xmm0
movss xmm0, dword [ebp - 0x18]
call fcn.004061c0
movss xmm1, dword [ebp - 0x390]
mov ecx, esi
call fcn.00406320
mov edx, dword [0x46ab00]
mov esi, dword [ebp - 0x364]
mov al, byte [0x46aa96]
mov edi, 1
cmp byte [0x46ab32], al
movzx ecx, byte [0x46ab15]
cmovne ecx, edi
mov byte [0x46ab32], al
cmp byte [0x46ab31], 0
mov byte [0x46ab15], cl
je 0x409fdb
xorps xmm0, xmm0
mov byte [0x46ab31], 0
xor ecx, ecx
movq qword [ebp - 0x140], xmm0
mov dword [ebp - 0x138], ecx
jmp 0x409fe1
mov ecx, dword [ebp - 0x138]
cmp edx, 3
jne 0x40a000
xorps xmm0, xmm0
xor ecx, ecx
movq qword [ebp - 0x140], xmm0
mov dword [ebp - 0x138], ecx
mov word [ebp - 0x13c], di
movq xmm0, qword [ebp - 0x140]
sub esp, 0xc
mov edx, dword [ebp - 0x38c]
mov eax, esp
movq qword [eax], xmm0
mov dword [eax + 8], ecx
mov ecx, dword [ebp - 0x3a0]
call fcn.00412540
mov edi, dword [ebp - 0x388]
add esp, 0xc
test edi, edi
jle 0x40a0a2
cmp edi, 1
jne 0x40a09b
movzx ecx, byte [0x46d63f]
xor dl, dl
mov eax, dword [ebp - 0x398]
cmp byte [ebp - 0x369], dl
movzx eax, al
cmovne ecx, eax
mov word [0x46d63d], 0xff00
mov byte [0x46d63f], cl
sub esp, 8
mov ecx, esp
mov byte [0x46d63c], 0
mov eax, dword [0x46d63c]
mov byte [0x46d642], dl
mov dword [ecx], eax
mov ax, word [0x46d640]
mov word [ecx + 4], ax
mov byte [ecx + 6], dl
call fcn.004058e0
add esp, 8
mov byte [0x46ab0d], 0
call fcn.00407270
dec edi
mov dword [ebp - 0x388], edi
push dword [ebp - 0x3f4]
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x354]
test eax, eax
lea esi, [eax - 1]
cmovle esi, eax
mov dword [ebp - 0x35c], esi
jmp 0x408269
call dword [sym.imp.JoyShockLibrary.dll_JslDisconnectAndDisposeAll]
mov ecx, dword [0x46aa90]
test ecx, ecx
je 0x40a0dc
call fcn.004119e0
cmp byte [0x46ab14], 0
je 0x40a11e
mov ecx, dword [0x46d630]
mov byte [0x46ab14], 0
call fcn.00401a00
mov ecx, dword [0x46d630]
test ecx, ecx
je 0x40a108
push 1
call fcn.0040a1a0
push dword [0x46d624]
mov dword [0x46d630], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 0x38c]
mov ecx, edi
call fcn.00412500
mov esi, dword [ebp - 0x3a0]
mov edx, edi
mov ecx, esi
call fcn.004121f0
mov ecx, edi
call fcn.00411fc0
mov ecx, esi
call fcn.00411f30
mov ecx, esi
call fcn.00411d00
lea ecx, [ebp - 0x17c]
call fcn.00407170
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00414ab7
mov esp, ebp
pop ebp
ret