Function at 0x577200
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
mov esi, dword [ebp + 0x10]
cmp esi, dword [ebp + 0xc]
jne 0x577217
mov eax, dword [ebp + 8]
pop esi
mov esp, ebp
pop ebp
ret
push ebx
push edi
test esi, esi
js 0x577596
mov ebx, dword [ebp + 0x14]
test ebx, ebx
js 0x577596
je 0x57723e
mov eax, 0x7fffffff
cdq
idiv ebx
cmp esi, eax
jg 0x577596
mov eax, esi
imul eax, ebx
mov dword [ebp + 0x10], eax
test eax, eax
js 0x577596
mov ecx, dword [ebp + 0x18]
test ecx, ecx
js 0x577596
je 0x57726f
mov eax, 0x7fffffff
cdq
idiv ecx
cmp dword [ebp + 0x10], eax
jg 0x577596
mov eax, dword [ebp + 0x10]
imul eax, ecx
push eax
call sym.BZDPatcher.exe_SDL_malloc
mov edi, eax
add esp, 4
mov dword [ebp - 0x10], edi
test edi, edi
je 0x577596
cmp dword [ebp + 0x18], 0
mov edx, dword [ebp + 8]
mov dword [ebp - 4], 0
jle 0x577559
mov eax, dword [ebp + 0xc]
lea ecx, [esi - 0xa]
mov esi, edx
mov dword [ebp - 8], edx
lea ecx, [ecx + eax*8]
imul eax, ebx
mov dword [ebp - 0x14], ecx
mov dword [ebp + 0xc], eax
mov eax, edi
mov dword [ebp - 0xc], eax
jmp 0x5772c0
cmp ecx, 0x19
ja case.0x5772d0.3
movzx ecx, byte [ecx + 0x5775f0]
jmp dword [ecx*4 + 0x5775bc]
lea edx, [ebx - 1]
test ebx, ebx
jle 0x57752e
sub edx, 1
mov cl, byte [esi]
mov byte [eax], cl
lea esi, [esi + 1]
mov byte [eax + 1], 0xff
lea eax, [eax + 2]
jns 0x5772e2
jmp 0x57752e
lea edx, [ebx - 1]
test ebx, ebx
jle 0x57752e
sub edx, 1
mov cl, byte [esi]
mov byte [eax + 2], cl
lea esi, [esi + 1]
mov byte [eax + 1], cl
lea eax, [eax + 3]
mov byte [eax - 3], cl
jns 0x577305
jmp 0x57752e
lea edx, [ebx - 1]
test ebx, ebx
jle 0x57752e
jmp 0x577330
sub edx, 1
mov cl, byte [esi]
mov byte [eax + 2], cl
lea esi, [esi + 1]
mov byte [eax + 1], cl
lea eax, [eax + 4]
mov byte [eax - 4], cl
mov byte [eax - 1], 0xff
jns 0x577330
jmp 0x57752e
lea edx, [ebx - 1]
test ebx, ebx
jle 0x57752e
lea ebx, [ebx]
sub edx, 1
mov cl, byte [esi]
mov byte [eax], cl
lea esi, [esi + 2]
lea eax, [eax + 1]
jns 0x577360
jmp 0x57752e
lea edx, [ebx - 1]
test ebx, ebx
jle 0x57752e
nop
sub edx, 1
mov cl, byte [esi]
mov byte [eax + 2], cl
lea esi, [esi + 2]
mov byte [eax + 1], cl
lea eax, [eax + 3]
mov byte [eax - 3], cl
jns 0x577380
jmp 0x57752e
lea edx, [ebx - 1]
test ebx, ebx
jle 0x57752e
sub edx, 1
mov cl, byte [esi]
mov byte [eax + 2], cl
lea esi, [esi + 2]
mov byte [eax + 1], cl
lea eax, [eax + 4]
mov byte [eax - 4], cl
movzx ecx, byte [esi - 1]
mov byte [eax - 1], cl
jns 0x5773a6
jmp 0x57752e
lea edx, [ebx - 1]
test ebx, ebx
jle 0x57752e
sub edx, 1
movzx ecx, byte [esi]
mov byte [eax], cl
lea esi, [esi + 3]
movzx ecx, byte [esi - 2]
lea eax, [eax + 4]
mov byte [eax - 3], cl
movzx ecx, byte [esi - 1]
mov byte [eax - 2], cl
mov byte [eax - 1], 0xff
jns 0x5773d3
jmp 0x57752e
lea edi, [ebx - 1]
test ebx, ebx
jle 0x57752e
jmp 0x577410
movzx ecx, byte [esi + 1]
lea esi, [esi + 3]
imul edx, ecx, 0x96
lea eax, [eax + 1]
movzx ecx, byte [esi - 1]
imul ecx, ecx, 0x1d
add edx, ecx
movzx ecx, byte [esi - 3]
imul ecx, ecx, 0x4d
add edx, ecx
shr edx, 8
sub edi, 1
mov byte [eax - 1], dl
jns 0x577410
jmp 0x57752e
lea edi, [ebx - 1]
test ebx, ebx
jle 0x57752e
lea ecx, [ecx]
movzx ecx, byte [esi + 1]
lea esi, [esi + 3]
imul edx, ecx, 0x96
lea eax, [eax + 2]
movzx ecx, byte [esi - 1]
imul ecx, ecx, 0x1d
add edx, ecx
movzx ecx, byte [esi - 3]
imul ecx, ecx, 0x4d
mov byte [eax - 1], 0xff
add edx, ecx
shr edx, 8
sub edi, 1
mov byte [eax - 2], dl
jns 0x577450
jmp 0x57752e
lea edi, [ebx - 1]
test ebx, ebx
jle 0x57752e
movzx ecx, byte [esi + 1]
lea esi, [esi + 4]
imul edx, ecx, 0x96
lea eax, [eax + 1]
movzx ecx, byte [esi - 2]
imul ecx, ecx, 0x1d
add edx, ecx
movzx ecx, byte [esi - 4]
imul ecx, ecx, 0x4d
add edx, ecx
shr edx, 8
sub edi, 1
mov byte [eax - 1], dl
jns 0x577491
jmp 0x57752e
lea edi, [ebx - 1]
test ebx, ebx
jle 0x57752e
jmp 0x5774d0
movzx ecx, byte [esi + 1]
lea esi, [esi + 4]
imul edx, ecx, 0x96
lea eax, [eax + 2]
movzx ecx, byte [esi - 2]
imul ecx, ecx, 0x1d
add edx, ecx
movzx ecx, byte [esi - 4]
imul ecx, ecx, 0x4d
add edx, ecx
shr edx, 8
sub edi, 1
mov byte [eax - 2], dl
mov cl, byte [esi - 1]
mov byte [eax - 1], cl
jns 0x5774d0
jmp 0x57752e
lea edx, [ebx - 1]
test edx, edx
js 0x57752e
lea esp, [esp]
sub edx, 1
movzx ecx, byte [esi]
mov byte [eax], cl
lea esi, [esi + 4]
movzx ecx, byte [esi - 3]
lea eax, [eax + 3]
mov byte [eax - 2], cl
movzx ecx, byte [esi - 2]
mov byte [eax - 1], cl
jns 0x577510
mov ecx, dword [ebp - 4]
mov esi, dword [ebp - 8]
inc ecx
mov eax, dword [ebp - 0xc]
add esi, dword [ebp + 0xc]
add eax, dword [ebp + 0x10]
cmp ecx, dword [ebp + 0x18]
mov dword [ebp - 4], ecx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], eax
jl 0x5772c0
mov edi, dword [ebp - 0x10]
mov edx, dword [ebp + 8]
push edx
call sym.BZDPatcher.exe_SDL_free
add esp, 4
mov eax, edi
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
push dword [ebp + 8]
call sym.BZDPatcher.exe_SDL_free
push dword [ebp - 0x10]
call sym.BZDPatcher.exe_SDL_free
push str.Unsupported_format_conversion
push 0x652d7c
call sym.BZDPatcher.exe_SDL_SetError
add esp, 0x10
xor eax, eax
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
push dword [ebp + 8]
call sym.BZDPatcher.exe_SDL_free
push str.Out_of_memory
push 0x652d7c
call sym.BZDPatcher.exe_SDL_SetError
add esp, 0xc
xor eax, eax
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret