Function at 0x405404
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffbe8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.004035b4
mov eax, dword [ebp - 8]
call fcn.004035b4
xor eax, eax
push ebp
push 0x405773
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, 0x42166c
mov edx, 0x405788
call fcn.0040379c
mov eax, 0x40585c
mov dword [0x42cb0c], eax
mov eax, 0x42c6f8
mov edx, 0x405868
call fcn.00403394
push 0
push 0
push 0
push 0
push 0
call sub.winmm.dll_midiOutOpen
push 0
call sub.user32.dll_CharLowerA
mov eax, dword [ebp - 8]
call fcn.004034c4
cmp eax, 0x100
jle 0x4054f2
mov eax, 0x40588c
mov dword [0x421804], eax
mov byte [0x42c6fc], 0
mov eax, 0x42c6f4
mov edx, 0x4058b0
call fcn.00403394
push 0
push 0
call sub.winmm.dll_midiOutGetID
push 0
push 0
call sub.winmm.dll_joyGetPos
push 0x100
lea eax, [ebp - 0x10]
mov ecx, 1
mov edx, dword [0x4043b4]
call fcn.00403cf4
add esp, 4
lea eax, [ebp - 8]
call fcn.0040361c
mov edx, eax
mov eax, dword [ebp - 0x10]
mov ecx, 0x100
call fcn.004042cc
jmp 0x405567
mov esi, 0x4058dc
mov edi, 0x4220f8
mov ecx, 5
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov eax, 0x4058f4
mov dword [0x42cb0c], eax
mov eax, 0x42c6f4
mov edx, 0x405908
call fcn.00403394
push 0
call sub.kernel32.dll_DisableThreadLibraryCalls
push 0xffffffffffffffff
call sub.user32.dll_ShowCursor
mov eax, dword [ebp - 8]
call fcn.004034c4
push eax
lea eax, [ebp - 0x10]
mov ecx, 1
mov edx, dword [0x4043b4]
call fcn.00403cf4
add esp, 4
mov eax, dword [ebp - 8]
call fcn.004034c4
push eax
lea eax, [ebp - 8]
call fcn.0040361c
mov edx, eax
mov eax, dword [ebp - 0x10]
pop ecx
call fcn.004042cc
xor edi, edi
lea eax, [ebp - 0x418]
mov dword [eax], edi
inc edi
add eax, 4
cmp edi, 0x100
jne 0x40556f
xor esi, esi
xor edi, edi
lea ebx, [ebp - 0x418]
mov eax, 0x42a808
mov edx, 0x405954
call fcn.0040379c
mov eax, 0x42cb04
mov edx, 0x4059ec
call fcn.0040379c
mov eax, 0x42cb08
mov edx, 0x405a2c
call fcn.0040379c
push 0
push 0
push 0
call sub.user32.dll_ShowScrollBar
push 0
call sub.kernel32.dll_AddAtomA
mov eax, dword [ebp - 8]
call fcn.004034c4
push eax
mov eax, edi
pop edx
mov ecx, edx
cdq
idiv ecx
mov eax, dword [ebp - 0x10]
movzx eax, byte [eax + edx]
add esi, dword [ebx]
add eax, esi
and eax, 0x800000ff
jns 0x4055f0
dec eax
or eax, 0xffffff00
inc eax
mov esi, eax
mov al, byte [ebx]
mov edx, dword [ebp + esi*4 - 0x418]
mov dword [ebx], edx
and eax, 0xff
mov dword [ebp + esi*4 - 0x418], eax
inc edi
add ebx, 4
cmp edi, 0x100
jne 0x405587
xor esi, esi
xor ebx, ebx
mov eax, dword [ebp - 4]
call fcn.004034c4
push eax
lea eax, [ebp - 0x14]
mov ecx, 1
mov edx, dword [0x4043b4]
call fcn.00403cf4
add esp, 4
mov eax, dword [ebp - 4]
call fcn.004034c4
push eax
lea eax, [ebp - 4]
call fcn.0040361c
mov edx, eax
mov eax, dword [ebp - 0x14]
pop ecx
call fcn.004042cc
mov eax, dword [ebp - 4]
call fcn.004034c4
dec eax
test eax, eax
jl 0x405719
inc eax
mov dword [ebp - 0x18], eax
xor edi, edi
mov eax, 0x42a8ec
call fcn.00403760
mov eax, 0x42c6f8
mov edx, 0x405a6c
call fcn.00403394
mov byte [0x42c7fc], 0
push 0
call sub.gdi32.dll_AbortPath
push 0
call sub.winmm.dll_midiInStart
inc esi
and esi, 0x800000ff
jns 0x4056ae
dec esi
or esi, 0xffffff00
inc esi
add ebx, dword [ebp + esi*4 - 0x418]
and ebx, 0x800000ff
jns 0x4056c5
dec ebx
or ebx, 0xffffff00
inc ebx
mov al, byte [ebp + esi*4 - 0x418]
mov edx, dword [ebp + ebx*4 - 0x418]
mov dword [ebp + esi*4 - 0x418], edx
and eax, 0xff
mov dword [ebp + ebx*4 - 0x418], eax
mov eax, dword [ebp + esi*4 - 0x418]
add eax, dword [ebp + ebx*4 - 0x418]
and eax, 0x800000ff
jns 0x405702
dec eax
or eax, 0xffffff00
inc eax
mov al, byte [ebp + eax*4 - 0x418]
mov edx, dword [ebp - 0x14]
xor byte [edx + edi], al
inc edi
dec dword [ebp - 0x18]
jne 0x40566f
mov eax, dword [ebp - 4]
call fcn.004034c4
mov edx, eax
mov eax, dword [ebp - 0xc]
call fcn.004036f4
mov eax, dword [ebp - 4]
call fcn.004034c4
push eax
mov eax, dword [ebp - 0xc]
call fcn.0040361c
mov edx, dword [ebp - 0x14]
pop ecx
call fcn.004042cc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40577a
lea eax, [ebp - 0x14]
mov edx, dword [0x4043b4]
mov ecx, 2
call fcn.0040380c
lea eax, [ebp - 8]
mov edx, 2
call fcn.00403364
ret