Function at 0x55fba0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x43c
mov eax, dword [0x675978]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x418], edi
mov dword [ebp - 0x414], eax
mov dword [ebp - 0x40c], 0
mov dword [ebp - 0x420], 0
test edi, edi
je 0x5602ae
push edi
call sym.BZDPatcher.exe_SDL_RWtell
mov dword [ebp - 0x43c], eax
mov dword [ebp - 0x438], edx
call sym.BZDPatcher.exe_SDL_ClearError
push edi
call sym.BZDPatcher.exe_SDL_ReadLE16
push edi
movzx esi, ax
call sym.BZDPatcher.exe_SDL_ReadLE16
movzx eax, ax
push edi
mov dword [ebp - 0x428], eax
call sym.BZDPatcher.exe_SDL_ReadLE16
mov ecx, dword [ebp - 0x414]
add esp, 0x10
movzx edx, ax
test si, si
jne 0x56026c
mov eax, dword [ebp - 0x428]
movzx eax, ax
cmp eax, ecx
jne 0x56026c
test dx, dx
je 0x56026c
mov eax, edx
mov dword [ebp - 0x414], eax
test eax, eax
je 0x55fcfe
lea ebx, [ebx]
push 1
push 1
lea eax, [ebp - 0x419]
push eax
push edi
call sym.BZDPatcher.exe_SDL_RWread
push 1
push 1
lea eax, [ebp - 0x429]
push eax
push edi
call sym.BZDPatcher.exe_SDL_RWread
push 1
push 1
lea eax, [ebp - 0x405]
push eax
push edi
call sym.BZDPatcher.exe_SDL_RWread
movzx esi, byte [ebp - 0x405]
lea eax, [ebp - 0x41a]
push 1
push 1
push eax
push edi
call sym.BZDPatcher.exe_SDL_RWread
add esp, 0x40
push edi
call sym.BZDPatcher.exe_SDL_ReadLE16
push edi
call sym.BZDPatcher.exe_SDL_ReadLE16
push edi
call sym.BZDPatcher.exe_SDL_ReadLE32
push edi
call sym.BZDPatcher.exe_SDL_ReadLE32
add esp, 0x10
mov ecx, 0x100
test esi, esi
cmove esi, ecx
cmp esi, dword [ebp - 0x40c]
cmovle esi, dword [ebp - 0x40c]
cmovg ebx, eax
sub dword [ebp - 0x414], 1
mov dword [ebp - 0x40c], esi
jne 0x55fc60
mov dword [ebp - 0x420], ebx
xor ebx, ebx
mov eax, dword [ebp - 0x420]
push 0
cdq
push edx
push eax
push edi
call sym.BZDPatcher.exe_SDL_RWseek
add esp, 0x10
test edx, edx
jg 0x55fd2b
jl 0x55fd1c
test eax, eax
jae 0x55fd2b
push 3
call sym.BZDPatcher.exe_SDL_Error
add esp, 4
jmp 0x56028a
push edi
call sym.BZDPatcher.exe_SDL_ReadLE32
add esp, 4
cmp eax, 0x28
jne 0x56025d
push edi
call sym.BZDPatcher.exe_SDL_ReadLE32
push edi
mov dword [ebp - 0x414], eax
call sym.BZDPatcher.exe_SDL_ReadLE32
push edi
mov dword [ebp - 0x424], eax
call sym.BZDPatcher.exe_SDL_ReadLE16
push edi
call sym.BZDPatcher.exe_SDL_ReadLE16
movzx eax, ax
push edi
mov dword [ebp - 0x40c], eax
call sym.BZDPatcher.exe_SDL_ReadLE32
push edi
mov dword [ebp - 0x420], eax
call sym.BZDPatcher.exe_SDL_ReadLE32
push edi
call sym.BZDPatcher.exe_SDL_ReadLE32
push edi
call sym.BZDPatcher.exe_SDL_ReadLE32
push edi
call sym.BZDPatcher.exe_SDL_ReadLE32
push edi
mov esi, eax
call sym.BZDPatcher.exe_SDL_ReadLE32
add esp, 0x28
push 0x64e2f4
call sym.BZDPatcher.exe_SDL_GetError
push eax
call sym.BZDPatcher.exe_SDL_strcmp
add esp, 8
test eax, eax
jne 0x56028a
cmp dword [ebp - 0x420], eax
je 0x55fdce
push str.Compressed_ICO_files_not_supported
call sym.BZDPatcher.exe_SDL_SetError
add esp, 4
jmp 0x56028a
mov eax, dword [ebp - 0x40c]
movzx ecx, ax
lea eax, [ecx - 1]
cmp eax, 0x1f
ja case.0x55fdea.2
movzx eax, byte [eax + 0x5602ec]
jmp dword [eax*4 + 0x5602d8]
mov dword [ebp - 0x428], ecx
jmp 0x55fe1b
mov dword [ebp - 0x428], 8
jmp 0x55fe1b
mov dword [ebp - 0x428], 0x18
jmp 0x55fe1b
mov dword [ebp - 0x428], 0
mov ecx, dword [ebp - 0x414]
cmp ecx, 0xffffff
ja 0x56023f
mov eax, dword [ebp - 0x424]
cmp eax, 0xffffff
ja 0x56023f
push 0x16362004
push 0
sar eax, 1
push eax
push ecx
push 0
call sym.BZDPatcher.exe_SDL_CreateRGBSurfaceWithFormat
mov ebx, eax
add esp, 0x14
mov dword [ebp - 0x424], ebx
test ebx, ebx
je 0x56028a
mov eax, dword [ebp - 0x40c]
cmp ax, 8
ja 0x55febd
test esi, esi
jne 0x55fe7d
mov esi, 1
movzx ecx, ax
shl esi, cl
cmp esi, 0x100
jbe 0x55fe97
push str.Unsupported_or_incorrect_biClrUsed_field
call sym.BZDPatcher.exe_SDL_SetError
add esp, 4
jmp 0x56028a
test esi, esi
jle 0x55febd
lea ebx, [ebp - 0x404]
push 1
push 4
push ebx
push edi
call sym.BZDPatcher.exe_SDL_RWread
add esp, 0x10
add ebx, 4
sub esi, 1
jne 0x55fea1
mov ebx, dword [ebp - 0x424]
mov edx, dword [ebx + 0xc]
mov eax, edx
mov esi, dword [ebx + 0x10]
mov ecx, dword [ebx + 0x14]
imul eax, esi
mov dword [ebp - 0x40c], 4
add eax, ecx
mov dword [ebp - 0x420], eax
mov eax, dword [ebp - 0x428]
dec eax
mov dword [ebp - 0x430], eax
cmp eax, 0x17
ja case.0x55fef6.2
movzx eax, byte [eax + 0x560320]
jmp dword [eax*4 + 0x56030c]
mov eax, dword [ebp - 0x414]
add eax, 7
sar eax, 3
and eax, 0x80000003
jns 0x55ff15
dec eax
or eax, 0xfffffffc
inc eax
mov dword [ebp - 0x410], eax
mov edi, dword [ebp - 0x410]
mov eax, dword [ebp - 0x40c]
sub eax, edi
neg edi
sbb edi, edi
and edi, eax
mov dword [ebp - 0x410], edi
mov edi, dword [ebp - 0x418]
jmp 0x55ff65
mov eax, dword [ebp - 0x414]
inc eax
sar eax, 1
jmp 0x55ff09
mov eax, dword [ebp - 0x414]
jmp 0x55ff09
mov eax, dword [ebp - 0x414]
lea eax, [eax + eax*2]
jmp 0x55ff09
mov dword [ebp - 0x410], 0
mov eax, dword [ebp - 0x420]
cmp eax, ecx
jbe 0x560080
mov ecx, dword [ebx + 0x10]
sub eax, ecx
mov edx, dword [ebp - 0x430]
mov dword [ebp - 0x420], eax
cmp edx, 0x17
ja case.default.0x55ff94
movzx eax, byte [edx + 0x560344]
jmp dword [eax*4 + 0x560338]
mov ecx, dword [ebp - 0x428]
mov eax, 8
sub eax, ecx
xor bl, bl
mov dword [ebp - 0x418], eax
xor esi, esi
mov eax, dword [ebp - 0x424]
mov byte [ebp - 0x405], bl
cmp dword [eax + 8], esi
jle 0x56003c
mov eax, 8
xor edx, edx
div ecx
mov ecx, eax
mov dword [ebp - 0x434], ecx
mov eax, esi
cdq
idiv ecx
test edx, edx
jne 0x55ffff
push 1
push 1
lea eax, [ebp - 0x405]
push eax
push edi
call sym.BZDPatcher.exe_SDL_RWread
add esp, 0x10
test eax, eax
je 0x56021b
mov bl, byte [ebp - 0x405]
movzx ecx, byte [ebp - 0x418]
movzx eax, bl
shr eax, cl
mov ecx, dword [ebp - 0x420]
mov eax, dword [ebp + eax*4 - 0x404]
mov dword [ecx + esi*4], eax
inc esi
mov eax, dword [ebp - 0x424]
movzx ecx, byte [ebp - 0x428]
shl bl, cl
mov ecx, dword [ebp - 0x434]
mov byte [ebp - 0x405], bl
cmp esi, dword [eax + 8]
jl 0x55ffd4
mov ebx, dword [ebp - 0x424]
mov eax, dword [ebp - 0x410]
test eax, eax
jle 0x560069
mov esi, eax
mov edi, edi
push 1
push 1
lea eax, [ebp - 0x41a]
push eax
push edi
call sym.BZDPatcher.exe_SDL_RWread
add esp, 0x10
sub esi, 1
jne 0x560050
mov ecx, dword [ebx + 0x14]
mov eax, dword [ebp - 0x420]
cmp eax, ecx
ja 0x55ff73
mov esi, dword [ebx + 0x10]
mov edx, dword [ebx + 0xc]
mov eax, dword [ebp - 0x414]
imul edx, esi
add eax, 7
sar eax, 3
add edx, ecx
and eax, 0x80000003
jns 0x56009d
dec eax
or eax, 0xfffffffc
inc eax
mov esi, dword [ebp - 0x40c]
sub esi, eax
neg eax
sbb eax, eax
and eax, esi
mov dword [ebp - 0x40c], eax
cmp edx, ecx
jbe 0x5602b0
lea esp, [esp]
sub edx, dword [ebx + 0x10]
xor cl, cl
xor esi, esi
mov byte [ebp - 0x405], cl
mov dword [ebp - 0x418], edx
cmp dword [ebx + 8], esi
jle 0x560147
jmp 0x5600e0
mov eax, esi
and eax, 0x80000007
jns 0x5600f0
dec eax
or eax, 0xfffffff8
add eax, 1
jne 0x56011a
push 1
push 1
lea eax, [ebp - 0x405]
push eax
push edi
call sym.BZDPatcher.exe_SDL_RWread
add esp, 0x10
test eax, eax
je 0x560230
mov cl, byte [ebp - 0x405]
mov edx, dword [ebp - 0x418]
test cl, 0x80
mov eax, 0xff000000
mov ecx, 0
cmovne eax, ecx
or dword [edx + esi*4], eax
inc esi
mov cl, byte [ebp - 0x405]
add cl, cl
mov byte [ebp - 0x405], cl
cmp esi, dword [ebx + 8]
jl 0x5600e0
mov eax, dword [ebp - 0x40c]
test eax, eax
jle 0x560175
mov esi, eax
lea ecx, [ecx]
push 1
push 1
lea eax, [ebp - 0x41a]
push eax
push edi
call sym.BZDPatcher.exe_SDL_RWread
add esp, 0x10
sub esi, 1
jne 0x560150
mov edx, dword [ebp - 0x418]
mov eax, dword [ebp - 0x40c]
cmp edx, dword [ebx + 0x14]
ja 0x5600c0
jmp 0x5602b0
cmp dword [ebx + 8], 0
mov dword [ebp - 0x418], 0
jle 0x560042
xor ebx, ebx
xor esi, esi
jmp 0x5601a0
push 1
push 1
lea eax, [ebp - 0x419]
push eax
push edi
call sym.BZDPatcher.exe_SDL_RWread
add esp, 0x10
test eax, eax
je 0x56021b
movzx eax, byte [ebp - 0x419]
mov ecx, esi
shl eax, cl
add esi, 8
or ebx, eax
cmp esi, 0x18
jl 0x5601a0
mov eax, dword [ebp - 0x418]
mov ecx, dword [ebp - 0x420]
mov dword [ecx + eax*4], ebx
inc eax
mov ebx, dword [ebp - 0x424]
mov dword [ebp - 0x418], eax
cmp eax, dword [ebx + 8]
jl 0x560197
jmp 0x560042
mov eax, dword [ebp - 0x420]
push ecx
push 1
push eax
push edi
call sym.BZDPatcher.exe_SDL_RWread
add esp, 0x10
cmp eax, dword [ebx + 0x10]
je 0x560042
push 1
call sym.BZDPatcher.exe_SDL_Error
add esp, 4
jmp 0x56028a
push str.Error_reading_from_ICO
call sym.BZDPatcher.exe_SDL_SetError
mov ebx, dword [ebp - 0x424]
add esp, 4
jmp 0x56028a
push str.Error_reading_from_ICO
call sym.BZDPatcher.exe_SDL_SetError
add esp, 4
jmp 0x56028a
push str.Unsupported_or_invalid_ICO_dimensions
call sym.BZDPatcher.exe_SDL_SetError
add esp, 4
jmp 0x56028a
push str.ICO_file_with_unsupported_bit_count
call sym.BZDPatcher.exe_SDL_SetError
add esp, 4
jmp 0x56028a
push str.Unsupported_ICO_bitmap_format
call sym.BZDPatcher.exe_SDL_SetError
add esp, 4
jmp 0x56028a
cmp ecx, 1
mov edx, 0x636ca4
mov eax, 0x636ca8
cmovne eax, edx
push eax
push str.File_is_not_a_Windows__s_file
call sym.BZDPatcher.exe_SDL_SetError
add esp, 8
push 0
push dword [ebp - 0x438]
push dword [ebp - 0x43c]
push edi
call sym.BZDPatcher.exe_SDL_RWseek
add esp, 0x10
test ebx, ebx
je 0x5602ae
push ebx
call sym.BZDPatcher.exe_SDL_FreeSurface
add esp, 4
xor ebx, ebx
cmp dword [ebp + 0x10], 0
je 0x5602c3
test edi, edi
je 0x5602c3
push edi
call sym.BZDPatcher.exe_SDL_RWclose
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005b6a10
mov esp, ebp
pop ebp
ret