Function at 0x409040
Capabilities:
Hash data using fnv

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x483526
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ebx
sub esp, 0x88
push esi
push edi
push 0x30
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x8c], 0
mov dword [ebp - 0x88], 0
call fcn.00481d9b
add esp, 4
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [ebp - 0x8c], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x84], 0
mov dword [ebp - 0x80], 0
mov dword [ebp - 0x7c], 0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x84]
push eax
push 0x10
mov dword [ebp - 0x78], 7
mov dword [ebp - 0x74], 8
mov dword [ebp - 0x90], 0x3f800000
call fcn.0041a4b0
mov dword [ebp - 4], 2
call dword [sym.imp.SDL2.dll_SDL_NumJoysticks]
push 0xc
mov edi, eax
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
call fcn.00481d9b
add esp, 4
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x40]
push eax
push 0x10
mov dword [ebp - 0x34], 7
mov dword [ebp - 0x30], 8
mov dword [ebp - 0x4c], 0x3f800000
call fcn.0041a4b0
xor esi, esi
mov byte [ebp - 4], 5
mov dword [ebp - 0x14], esi
test edi, edi
jle 0x409199
nop dword [eax]
push esi
call dword [sym.imp.SDL2.dll_SDL_IsGameController]
add esp, 4
test eax, eax
je 0x409191
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x4c]
call fcn.0041bdc0
mov esi, dword [ebp - 0x14]
inc esi
mov dword [ebp - 0x14], esi
cmp esi, edi
jl 0x409170
mov edi, dword [ebp - 0x48]
mov dword [ebp - 0x14], edi
mov esi, dword [edi]
mov dword [ebp - 0x18], esi
cmp esi, edi
je 0x4092fd
nop dword [eax]
mov eax, dword [esi + 8]
xorps xmm0, xmm0
movups xmmword [ebp - 0x70], xmm0
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0xf
mov byte [ebp - 0x70], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
push eax
mov byte [ebp - 4], 6
call dword [sym.imp.SDL2.dll_SDL_GameControllerOpen]
add esp, 4
mov dword [ebp - 0x24], eax
test eax, eax
je 0x4092ba
push eax
call dword [sym.imp.SDL2.dll_SDL_GameControllerName]
mov edx, eax
add esp, 4
lea ecx, [edx + 1]
mov dword [ebp - 0x1c], ecx
nop
mov cl, byte [edx]
inc edx
test cl, cl
jne 0x409210
sub edx, dword [ebp - 0x1c]
lea ecx, [ebp - 0x70]
push edx
push eax
call fcn.0041a230
push dword [ebp - 0x24]
call dword [sym.imp.SDL2.dll_SDL_GameControllerGetJoystick]
add esp, 4
mov dword [ebp - 0x20], eax
test eax, eax
je 0x4092ae
push eax
call dword [sym.imp.SDL2.dll_SDL_JoystickNumButtons]
mov edx, dword [ebp - 0x54]
mov edi, eax
mov ecx, dword [ebp - 0x58]
add esp, 4
sub edx, ecx
mov dword [ebp - 0x1c], edi
cmp edi, edx
jae 0x409259
add ecx, edi
mov dword [ebp - 0x54], ecx
jmp 0x409283
jbe 0x409283
mov eax, dword [ebp - 0x50]
sub eax, ecx
cmp edi, eax
jbe 0x409270
push ecx
push edi
lea ecx, [ebp - 0x58]
call fcn.0041d220
jmp 0x409283
sub edi, edx
push edi
push 0
push dword [ebp - 0x54]
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
add dword [ebp - 0x54], edi
xor edi, edi
cmp dword [ebp - 0x1c], edi
jle 0x4092ab
mov esi, dword [ebp - 0x1c]
nop dword [eax]
push edi
push dword [ebp - 0x20]
call dword [sym.imp.SDL2.dll_SDL_JoystickGetButton]
mov ecx, dword [ebp - 0x58]
add esp, 8
mov byte [ecx + edi], al
inc edi
cmp edi, esi
jl 0x409290
mov esi, dword [ebp - 0x18]
mov edi, dword [ebp - 0x14]
push dword [ebp - 0x24]
call dword [sym.imp.SDL2.dll_SDL_GameControllerClose]
add esp, 4
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x98]
push eax
lea ecx, [ebp - 0x90]
call fcn.0041c060
lea ecx, [ebp - 0x70]
push ecx
mov ecx, dword [eax]
add ecx, 0xc
call fcn.004095b0
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 5
call fcn.00409510
mov esi, dword [esi]
mov dword [ebp - 0x18], esi
cmp esi, edi
jne 0x4091b0
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x14], eax
mov edi, dword [0x602da4]
mov dword [ebp - 0x18], edi
mov esi, dword [edi]
cmp esi, edi
je 0x409413
movzx eax, byte [esi + 8]
lea edx, [esi + 8]
xor eax, 0x811c9dc5
mov dword [ebp - 0x20], edx
imul ecx, eax, 0x1000193
movzx eax, byte [edx + 1]
xor eax, ecx
mov dword [ebp - 0x28], ecx
imul ecx, eax, 0x1000193
movzx eax, byte [edx + 2]
xor ecx, eax
movzx eax, byte [edx + 3]
imul ecx, ecx, 0x1000193
xor ecx, eax
imul eax, ecx, 0x1000193
lea ecx, [ebp - 0x4c]
push eax
push edx
lea eax, [ebp - 0x98]
push eax
call fcn.0041d1b0
mov ecx, dword [ebp - 0x14]
mov eax, dword [eax + 4]
test eax, eax
cmovne ecx, eax
cmp ecx, dword [ebp - 0x14]
jne 0x409409
movzx eax, byte [esi + 9]
mov edi, esi
xor eax, dword [ebp - 0x28]
mov edx, dword [0x602dac]
imul ecx, eax, 0x1000193
movzx eax, byte [esi + 0xa]
xor ecx, eax
movzx eax, byte [esi + 0xb]
imul ecx, ecx, 0x1000193
xor ecx, eax
imul ecx, ecx, 0x1000193
and ecx, dword [0x602db8]
mov eax, dword [edx + ecx*8]
cmp dword [edx + ecx*8 + 4], esi
jne 0x4093c6
cmp eax, esi
jne 0x4093bd
mov eax, dword [ebp - 0x18]
mov dword [edx + ecx*8], eax
mov dword [edx + ecx*8 + 4], eax
jmp 0x4093cf
mov eax, dword [esi + 4]
mov dword [edx + ecx*8 + 4], eax
jmp 0x4093cf
cmp eax, esi
jne 0x4093cf
mov eax, dword [esi]
mov dword [edx + ecx*8], eax
mov esi, dword [edi]
dec dword [0x602da8]
mov eax, dword [edi + 4]
mov ecx, dword [ebp - 0x20]
add ecx, 4
mov dword [eax], esi
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
call fcn.00409510
push 0x30
push edi
call fcn.00482021
mov eax, dword [ebp - 0x48]
add esp, 8
mov edi, dword [0x602da4]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], edi
jmp 0x40940b
mov esi, dword [esi]
cmp esi, edi
jne 0x409310
mov edi, dword [ebp - 0x8c]
mov esi, dword [edi]
cmp esi, edi
je 0x409449
nop
lea eax, [esi + 8]
mov ecx, 0x602da0
push eax
lea eax, [ebp - 0x98]
push eax
call fcn.0041c060
lea ecx, [esi + 0xc]
push ecx
mov ecx, dword [eax]
add ecx, 0xc
call fcn.004095b0
mov esi, dword [esi]
cmp esi, edi
jne 0x409420
lea ecx, [ebp - 0x4c]
call fcn.00409480
lea ecx, [ebp - 0x90]
call fcn.00408b60
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret