Function at 0x577db0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
push ebx
push esi
xor ecx, ecx
push edi
mov edi, dword [ebp + 0x20]
cmp edi, 0x10
sete cl
inc ecx
mov esi, ecx
imul esi, dword [ebp + 0x14]
mov eax, esi
mov dword [ebp - 8], esi
imul eax, dword [ebp + 0x18]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov eax, dword [eax + 8]
mov ebx, eax
imul ebx, ecx
mov ecx, dword [ebp + 0x18]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 4], ebx
test ecx, ecx
js 0x577e38
mov eax, dword [ebp + 0x1c]
test eax, eax
js 0x577e38
je 0x577e0d
mov eax, 0x7fffffff
cdq
idiv dword [ebp + 0x1c]
cmp ecx, eax
jg 0x577e38
mov eax, dword [ebp + 0x1c]
imul ecx, eax
test ecx, ecx
js 0x577e38
test esi, esi
js 0x577e38
je 0x577e26
mov eax, 0x7fffffff
cdq
idiv esi
cmp ecx, eax
jg 0x577e38
mov eax, dword [ebp - 0x24]
imul eax, dword [ebp + 0x1c]
push eax
call sym.BZDPatcher.exe_SDL_malloc
add esp, 4
jmp 0x577e3a
xor eax, eax
mov ecx, dword [ebp + 8]
mov dword [ecx + 0xc], eax
test eax, eax
jne 0x577e4e
push str.Out_of_memory
jmp 0x578a10
mov esi, dword [ebp - 0x1c]
test esi, esi
js 0x578a0b
mov ecx, dword [ebp + 0x18]
test ecx, ecx
js 0x578a0b
je 0x577e76
mov eax, 0x7fffffff
cdq
idiv ecx
cmp esi, eax
jg 0x578a0b
imul esi, ecx
mov dword [ebp - 0x2c], esi
test esi, esi
js 0x578a0b
test edi, edi
js 0x578a0b
je 0x577e9e
mov eax, 0x7fffffff
cdq
idiv edi
cmp esi, eax
jg 0x578a0b
mov eax, esi
imul eax, edi
cmp eax, 0x7ffffff8
jg 0x578a0b
add eax, 7
shr eax, 3
mov dword [ebp - 0x20], eax
inc eax
imul eax, dword [ebp + 0x1c]
cmp dword [ebp + 0x10], eax
jb 0x578a0b
mov eax, dword [ebp + 0x1c]
xor esi, esi
mov dword [ebp - 0x40], esi
test eax, eax
je 0x578642
mov edi, dword [ebp + 0xc]
jmp 0x577ee0
mov ecx, dword [ebp + 8]
mov eax, esi
imul eax, dword [ebp - 0x24]
movzx edx, byte [edi]
inc edi
mov dword [ebp - 0x18], edx
mov ecx, dword [ecx + 0xc]
add ecx, eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0xc], ecx
cmp edx, 4
ja 0x578a0b
cmp dword [ebp + 0x20], 8
jge 0x577f32
mov ebx, dword [ebp + 0x18]
cmp dword [ebp - 0x20], ebx
ja 0x578a0b
mov eax, dword [ebp + 0x14]
imul eax, ebx
mov ebx, 1
mov dword [ebp - 4], ebx
sub eax, dword [ebp - 0x20]
add ecx, eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x3c], eax
mov eax, ecx
sub eax, dword [ebp - 0x24]
mov dword [ebp - 0x34], eax
test esi, esi
jne 0x577f48
movzx edx, byte [edx + 0x674800]
mov dword [ebp - 0x18], edx
test ebx, ebx
jle 0x578044
mov edx, ecx
mov dword [ebp - 0x14], ebx
sub eax, edi
mov esi, edi
sub edx, edi
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x38], edx
mov ecx, ebx
cmp dword [ebp - 0x18], 6
ja case.default.0x577f6c
mov ebx, dword [ebp - 0x18]
jmp dword [ebx*4 + 0x578a28]
mov ebx, dword [ebp - 4]
inc esi
sub ecx, 1
mov dword [ebp - 0x14], ecx
jne 0x577f63
jmp 0x578041
mov ebx, dword [ebp - 4]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [edx + esi - 1], al
sub ecx, 1
jne 0x577f87
jmp 0x578041
mov ebx, dword [ebp - 4]
lea ecx, [ecx]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [edx + esi - 1], al
sub ecx, 1
jne 0x577fa0
jmp 0x578041
mov ebx, dword [ebp - 4]
mov al, byte [eax + esi]
lea esi, [esi + 1]
add al, byte [esi - 1]
mov byte [edx + esi - 1], al
sub ecx, 1
je 0x578041
mov eax, dword [ebp - 0x10]
jmp 0x577fb6
mov ebx, dword [ebp - 4]
mov al, byte [eax + esi]
lea esi, [esi + 1]
shr al, 1
add al, byte [esi - 1]
mov byte [edx + esi - 1], al
sub ecx, 1
je 0x578041
mov eax, dword [ebp - 0x10]
jmp 0x577fd0
mov ebx, dword [ebp - 4]
lea esp, [esp]
movzx eax, byte [eax + esi]
push 0
push eax
push 0
call fcn.0057b170
mov ecx, dword [ebp - 0x38]
lea esi, [esi + 1]
add al, byte [esi - 1]
add esp, 0xc
sub dword [ebp - 0x14], 1
mov byte [ecx + esi - 1], al
je 0x578041
mov eax, dword [ebp - 0x10]
jmp 0x577ff0
mov ebx, dword [ebp - 4]
lea esp, [esp]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [edx + esi - 1], al
sub ecx, 1
jne 0x578020
jmp 0x578041
mov ebx, dword [ebp - 4]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [edx + esi - 1], al
sub ecx, 1
jne 0x578033
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 0x20]
cmp eax, 8
jne 0x578060
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp - 0x1c]
cmp edx, eax
je 0x57805a
mov byte [ecx + edx], 0xff
mov ecx, eax
mov esi, edx
jmp 0x578083
cmp eax, 0x10
jne 0x57807c
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp + 0x14]
je 0x578073
mov word [ecx + ebx], 0xffff
mov eax, dword [ebp - 8]
mov esi, ebx
mov ecx, eax
jmp 0x578086
mov ecx, 1
mov esi, ecx
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x18]
add edi, esi
mov esi, dword [ebp - 0x34]
add esi, ecx
mov dword [ebp + 0xc], edi
add ecx, dword [ebp - 0xc]
cmp dword [ebp + 0x20], 8
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0xc], ecx
jl 0x57847f
mov ebx, dword [ebp - 0x1c]
cmp ebx, dword [ebp + 0x14]
mov ebx, dword [ebp - 4]
je 0x57847f
cmp edx, 6
ja case.default.0x5780c1
jmp dword [edx*4 + 0x578a44]
mov edx, dword [ebp + 0x18]
mov esi, dword [ebp - 0x10]
dec edx
mov dword [ebp - 0x28], edx
mov edi, esi
cmp edx, 1
jb case.default.0x5780c1
lea ecx, [ecx]
test ebx, ebx
jle 0x578108
mov eax, edi
mov esi, ebx
sub eax, ecx
mov edx, ecx
mov dword [ebp - 0x38], eax
mov ebx, eax
mov al, byte [ebx + edx]
lea edx, [edx + 1]
mov byte [edx - 1], al
sub esi, 1
jne 0x5780f1
mov ebx, dword [ebp - 4]
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x28]
mov byte [ecx + ebx], 0xff
add edi, ebx
add ecx, eax
sub edx, 1
mov dword [ebp - 0x28], edx
jne 0x5780e0
jmp case.default.0x5780c1
mov edx, dword [ebp + 0x18]
mov esi, dword [ebp - 0x10]
dec edx
mov dword [ebp - 0x28], edx
mov edi, esi
cmp edx, 1
jb case.default.0x5780c1
mov edx, ecx
mov dword [ebp + 0xc], edi
sub edx, eax
mov dword [ebp - 0x18], edx
lea esp, [esp]
xor esi, esi
test ebx, ebx
jle 0x57816f
mov dword [ebp - 0x38], edi
sub edi, ecx
jmp 0x578150
mov ebx, dword [ebp - 0x18]
lea edx, [esi + ecx]
mov al, byte [edx + edi]
add al, byte [ebx + esi]
inc esi
mov ebx, dword [ebp - 4]
mov byte [edx], al
cmp esi, ebx
jl 0x578150
mov edi, dword [ebp + 0xc]
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x18]
mov byte [ecx + ebx], 0xff
add edi, ebx
add edx, eax
mov dword [ebp + 0xc], edi
add ecx, eax
mov dword [ebp - 0x18], edx
sub dword [ebp - 0x28], 1
jne 0x578140
jmp case.default.0x5780c1
mov edx, dword [ebp + 0x18]
mov edi, dword [ebp - 0x10]
dec edx
mov dword [ebp - 0x28], edx
cmp edx, 1
jb case.default.0x5780c1
lea ecx, [ecx]
test ebx, ebx
jle 0x5781d4
mov dword [ebp - 0x38], esi
mov edx, edi
sub esi, edi
mov dword [ebp - 0x38], ebx
sub ecx, edi
mov dword [ebp - 0x34], ecx
mov al, byte [edx + esi]
lea edx, [edx + 1]
add al, byte [edx - 1]
mov byte [edx + ecx - 1], al
sub ebx, 1
jne 0x5781b3
mov ecx, dword [ebp - 0xc]
mov ebx, dword [ebp - 4]
mov eax, dword [ebp - 8]
mov esi, dword [ebp - 0x14]
mov edx, dword [ebp - 0x28]
mov byte [ecx + ebx], 0xff
add esi, eax
add ecx, eax
mov dword [ebp - 0x14], esi
add edi, ebx
mov dword [ebp - 0xc], ecx
sub edx, 1
mov dword [ebp - 0x28], edx
jne 0x5781a0
jmp case.default.0x5780c1
mov edx, dword [ebp + 0x18]
mov edi, dword [ebp - 0x10]
dec edx
mov dword [ebp - 0x28], edx
cmp edx, 1
jb case.default.0x5780c1
mov edx, ecx
mov dword [ebp + 0xc], edi
sub edx, eax
mov dword [ebp - 0x18], edx
mov edi, edi
mov dword [ebp - 0x38], 0
test ebx, ebx
jle 0x578261
mov eax, dword [ebp - 0x14]
mov esi, edi
sub eax, edi
sub ecx, edi
mov dword [ebp - 0x30], ecx
mov edi, eax
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x34], eax
nop
mov eax, dword [ebp - 0x18]
lea esi, [esi + 1]
movzx edx, byte [esi + edi - 1]
movzx eax, byte [eax + ecx]
inc ecx
add edx, eax
mov eax, dword [ebp - 0x30]
shr edx, 1
add dl, byte [esi - 1]
mov byte [esi + eax - 1], dl
cmp ecx, ebx
jl 0x578230
mov ecx, dword [ebp - 0xc]
mov edi, dword [ebp + 0xc]
mov eax, dword [ebp - 8]
mov esi, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
mov byte [ecx + ebx], 0xff
add edi, ebx
add ecx, eax
mov dword [ebp + 0xc], edi
add edx, eax
mov dword [ebp - 0xc], ecx
add esi, eax
mov dword [ebp - 0x18], edx
sub dword [ebp - 0x28], 1
mov dword [ebp - 0x14], esi
jne 0x578210
jmp case.default.0x5780c1
mov edx, dword [ebp + 0x18]
dec edx
mov dword [ebp - 0x28], edx
cmp dword [ebp - 0x28], 1
mov edx, dword [ebp - 0x10]
mov edi, edx
jb case.default.0x5780c1
mov edx, ecx
mov dword [ebp + 0xc], edi
sub edx, eax
mov dword [ebp - 0x18], edx
test ebx, ebx
jle 0x578354
mov eax, esi
mov dword [ebp - 0x38], ebx
mov ebx, dword [ebp - 8]
sub eax, ecx
mov ecx, dword [ebp - 0x18]
mov edx, edi
sub esi, edi
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x54], esi
jmp 0x5782d0
movzx edi, byte [edx + esi]
movzx eax, byte [eax + ecx]
movzx edx, byte [ecx]
mov dword [ebp - 0x10], eax
mov esi, edx
sub esi, eax
mov dword [ebp - 0x4c], edi
add edi, esi
mov dword [ebp - 0x30], edx
mov eax, edi
sub edi, dword [ebp - 0x10]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
mov dword [ebp - 0x44], eax
mov eax, esi
cdq
xor eax, edx
sub eax, edx
mov dword [ebp - 0x48], eax
mov eax, edi
cdq
mov esi, eax
mov eax, dword [ebp - 0x44]
xor esi, edx
sub esi, edx
mov edx, dword [ebp - 0x48]
cmp eax, edx
jg 0x57831a
cmp eax, esi
jle 0x578326
mov eax, dword [ebp - 0x10]
cmp edx, esi
cmovle eax, dword [ebp - 0x4c]
mov dword [ebp - 0x30], eax
mov edx, dword [ebp - 0x34]
mov esi, dword [ebp - 0x54]
mov al, byte [edx]
inc edx
add al, byte [ebp - 0x30]
mov byte [ecx + ebx], al
inc ecx
sub dword [ebp - 0x38], 1
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x34], edx
jne 0x5782d0
mov ecx, dword [ebp - 0xc]
mov ebx, dword [ebp - 4]
mov edi, dword [ebp + 0xc]
mov eax, dword [ebp - 8]
mov esi, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
mov byte [ecx + ebx], 0xff
add edi, ebx
add ecx, eax
mov dword [ebp + 0xc], edi
add edx, eax
mov dword [ebp - 0xc], ecx
add esi, eax
mov dword [ebp - 0x18], edx
sub dword [ebp - 0x28], 1
mov dword [ebp - 0x14], esi
jne 0x5782a4
jmp case.default.0x5780c1
mov edx, dword [ebp + 0x18]
mov esi, dword [ebp - 0x10]
dec edx
mov dword [ebp - 0x38], edx
mov edi, esi
cmp edx, 1
jb case.default.0x5780c1
mov edx, ecx
mov dword [ebp + 0xc], edi
sub edx, eax
mov dword [ebp - 0x28], edx
lea ebx, [ebx]
xor esi, esi
test ebx, ebx
jle 0x5783ce
sub edi, ecx
mov dword [ebp - 0x54], edi
jmp 0x5783b0
mov eax, dword [ebp - 0x28]
lea edx, [esi + ecx]
mov al, byte [eax + esi]
inc esi
shr al, 1
add al, byte [edx + edi]
mov byte [edx], al
cmp esi, ebx
jl 0x5783b0
mov edi, dword [ebp + 0xc]
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x28]
mov byte [ecx + ebx], 0xff
add edi, ebx
add edx, eax
mov dword [ebp + 0xc], edi
add ecx, eax
mov dword [ebp - 0x28], edx
sub dword [ebp - 0x38], 1
jne 0x5783a0
jmp case.default.0x5780c1
mov esi, dword [ebp + 0x18]
mov edx, dword [ebp - 0x10]
dec esi
mov dword [ebp - 0x38], esi
mov edi, edx
cmp esi, 1
jb case.default.0x5780c1
mov edx, ecx
mov dword [ebp + 0xc], edi
sub edx, eax
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x54], 0
test ebx, ebx
jle 0x578437
mov eax, edi
mov edi, dword [ebp - 0x54]
sub eax, ecx
mov dword [ebp - 0x50], eax
mov dl, byte [edx + edi]
lea esi, [edi + ecx]
mov al, byte [esi + eax]
inc edi
add al, dl
mov edx, dword [ebp - 0x28]
mov byte [esi], al
mov eax, dword [ebp - 0x50]
cmp edi, ebx
jl 0x578416
mov edi, dword [ebp + 0xc]
mov eax, dword [ebp - 8]
mov esi, dword [ebp - 0x38]
mov byte [ecx + ebx], 0xff
add edi, ebx
add edx, eax
mov dword [ebp + 0xc], edi
add ecx, eax
mov dword [ebp - 0x28], edx
sub esi, 1
mov dword [ebp - 0x38], esi
jne 0x578401
cmp dword [ebp + 0x20], 0x10
jne 0x57862a
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0x18]
mov ecx, dword [ecx + 0xc]
inc ecx
test edx, edx
je 0x57862a
add ecx, dword [ebp - 0x58]
add ecx, ebx
mov byte [ecx], 0xff
add ecx, eax
sub edx, 1
jne 0x578470
jmp 0x57862a
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x18]
dec edx
imul edx, ebx
mov dword [ebp - 0xc], edx
cmp eax, 6
ja case.default.0x578495
jmp dword [eax*4 + 0x578a60]
push edx
push edi
push ecx
call sym.BZDPatcher.exe_SDL_memcpy
add esp, 0xc
jmp 0x578625
xor esi, esi
test edx, edx
jle case.default.0x578495
mov eax, ecx
sub eax, ebx
mov ebx, dword [ebp - 0xc]
mov dword [ebp - 0x58], eax
mov eax, edi
mov edi, dword [ebp - 0x58]
sub eax, ecx
mov dword [ebp - 0x54], eax
lea ebx, [ebx]
lea edx, [ecx + esi]
mov al, byte [edx + eax]
add al, byte [edi + esi]
inc esi
mov byte [edx], al
mov eax, dword [ebp - 0x54]
cmp esi, ebx
jl 0x5784d0
jmp 0x57861f
test edx, edx
jle case.default.0x578495
sub esi, edi
mov dword [ebp - 0x58], edx
mov ebx, edi
sub ecx, edi
lea esp, [esp]
mov al, byte [esi + ebx]
lea ebx, [ebx + 1]
add al, byte [ebx - 1]
mov byte [ecx + ebx - 1], al
sub edx, 1
jne 0x578500
jmp 0x578622
xor eax, eax
mov dword [ebp - 0x38], eax
test edx, edx
jle case.default.0x578495
mov edx, ecx
mov dword [ebp - 0x58], edi
sub edx, ebx
sub esi, edi
mov dword [ebp - 0x54], edx
sub ecx, edi
mov ebx, dword [ebp - 0x54]
lea edi, [edi + 1]
movzx edx, byte [edi + esi - 1]
movzx eax, byte [ebx + eax]
add edx, eax
mov eax, dword [ebp - 0x38]
shr edx, 1
inc eax
add dl, byte [edi - 1]
mov byte [edi + ecx - 1], dl
mov dword [ebp - 0x38], eax
cmp eax, dword [ebp - 0xc]
jl 0x578532
jmp 0x57861f
test edx, edx
jle case.default.0x578495
mov eax, ecx
mov dword [ebp - 0x28], edi
sub eax, ebx
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x58], eax
mov eax, esi
sub eax, ecx
mov ecx, dword [ebp - 0x28]
sub esi, edi
mov dword [ebp - 0x54], eax
mov edi, dword [ebp - 0x58]
movzx eax, byte [eax + edi]
push eax
movzx eax, byte [ecx + esi]
push eax
movzx eax, byte [edi]
push eax
call fcn.0057b170
mov ecx, dword [ebp - 0x28]
lea edi, [edi + 1]
add esp, 0xc
add al, byte [ecx]
inc ecx
sub dword [ebp - 0x38], 1
mov byte [edi + ebx - 1], al
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x28], ecx
jne 0x578581
mov edi, dword [ebp + 0xc]
jmp 0x578625
xor esi, esi
test edx, edx
jle case.default.0x578495
mov eax, ecx
sub eax, ebx
mov dword [ebp - 0x58], eax
mov eax, edi
mov edi, dword [ebp - 0x58]
sub eax, ecx
mov dword [ebp - 0x54], eax
lea esp, [esp]
mov al, byte [edi + esi]
lea edx, [ecx + esi]
mov ebx, dword [ebp - 0x54]
inc esi
shr al, 1
add al, byte [edx + ebx]
mov byte [edx], al
cmp esi, dword [ebp - 0xc]
jl 0x5785d0
jmp 0x57861f
mov dword [ebp - 0x58], 0
test edx, edx
jle case.default.0x578495
mov eax, ecx
mov edx, edi
mov edi, dword [ebp - 0x58]
sub eax, ebx
mov ebx, dword [ebp - 0xc]
sub edx, ecx
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x54], edx
mov dl, byte [eax + edi]
lea esi, [ecx + edi]
mov eax, dword [ebp - 0x54]
inc edi
mov al, byte [esi + eax]
add al, dl
mov byte [esi], al
mov eax, dword [ebp - 0x50]
cmp edi, ebx
jl 0x578607
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
add edi, edx
mov esi, dword [ebp - 0x40]
mov eax, dword [ebp + 0x1c]
inc esi
mov dword [ebp - 0x40], esi
cmp esi, eax
jb 0x577ee0
mov edi, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x18]
cmp edi, 8
jge 0x5789c8
test eax, eax
je 0x5789ff
mov ebx, dword [ebp + 0x14]
imul ebx, ecx
xor ecx, ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x50], ebx
mov eax, dword [ebp + 8]
mov esi, ebx
sub esi, dword [ebp - 0x20]
mov eax, dword [eax + 0xc]
add esi, eax
add esi, ecx
cmp dword [ebp + 0x24], 0
lea edx, [eax + ecx]
jne 0x578681
mov bl, byte [edi + 0x638c14]
jmp 0x578683
mov bl, 1
cmp edi, 4
jne 0x5786e1
mov ecx, dword [ebp - 0x2c]
cmp ecx, 2
jl 0x5786cf
mov edi, ecx
shr edi, 1
mov eax, edi
neg eax
lea ecx, [ecx + eax*2]
mov dword [ebp - 0x58], ecx
mov edi, edi
movzx ecx, byte [esi]
shr cl, 4
movzx ecx, cl
movzx eax, bl
imul ecx, eax
movzx eax, bl
mov byte [edx], cl
movzx ecx, byte [esi]
inc esi
and cl, 0xf
movzx ecx, cl
imul ecx, eax
mov byte [edx + 1], cl
add edx, 2
sub edi, 1
jne 0x5786a0
mov ecx, dword [ebp - 0x58]
test ecx, ecx
jle 0x578929
mov cl, byte [esi]
shr cl, 4
jmp 0x57891e
cmp edi, 2
jne 0x5787a7
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x18], ecx
cmp ecx, 4
jl 0x57875d
mov edi, ecx
shr edi, 2
mov eax, edi
neg eax
lea ecx, [ecx + eax*4]
mov dword [ebp - 0x18], ecx
movzx ecx, byte [esi]
shr cl, 6
movzx ecx, cl
movzx eax, bl
imul ecx, eax
movzx eax, bl
mov byte [edx], cl
movzx ecx, byte [esi]
shr cl, 4
and cl, 3
movzx ecx, cl
imul ecx, eax
movzx eax, bl
mov byte [edx + 1], cl
movzx ecx, byte [esi]
shr cl, 2
and cl, 3
movzx ecx, cl
imul ecx, eax
movzx eax, bl
mov byte [edx + 2], cl
movzx ecx, byte [esi]
inc esi
and cl, 3
movzx ecx, cl
imul ecx, eax
mov byte [edx + 3], cl
add edx, 4
sub edi, 1
jne 0x578704
mov ecx, dword [ebp - 0x18]
test ecx, ecx
jle 0x578775
mov cl, byte [esi]
shr cl, 6
movzx ecx, cl
movzx eax, bl
imul ecx, eax
mov byte [edx], cl
inc edx
mov ecx, dword [ebp - 0x18]
cmp ecx, 1
jle 0x578791
mov cl, byte [esi]
shr cl, 4
and cl, 3
movzx eax, bl
movzx ecx, cl
imul ecx, eax
mov byte [edx], cl
inc edx
mov ecx, dword [ebp - 0x18]
cmp ecx, 2
jle 0x578929
mov cl, byte [esi]
shr cl, 2
and cl, 3
jmp 0x57891e
cmp edi, 1
jne 0x57892c
mov edi, dword [ebp - 0x2c]
cmp edi, 8
jl 0x578880
mov eax, edi
shr eax, 3
mov dword [ebp - 0x58], eax
neg eax
lea edi, [edi + eax*8]
mov dword [ebp - 0x54], edi
mov edi, dword [ebp - 0x58]
nop
movzx ecx, byte [esi]
shr cl, 7
movzx ecx, cl
movzx eax, bl
imul ecx, eax
movzx eax, bl
mov byte [edx], cl
movzx ecx, byte [esi]
shr cl, 6
and cl, 1
movzx ecx, cl
imul ecx, eax
movzx eax, bl
mov byte [edx + 1], cl
movzx ecx, byte [esi]
shr cl, 5
and cl, 1
movzx ecx, cl
imul ecx, eax
movzx eax, bl
mov byte [edx + 2], cl
movzx ecx, byte [esi]
shr cl, 4
and cl, 1
movzx ecx, cl
imul ecx, eax
movzx eax, bl
mov byte [edx + 3], cl
movzx ecx, byte [esi]
shr cl, 3
and cl, 1
movzx ecx, cl
imul ecx, eax
movzx eax, bl
mov byte [edx + 4], cl
movzx ecx, byte [esi]
shr cl, 2
and cl, 1
movzx ecx, cl
imul ecx, eax
movzx eax, bl
mov byte [edx + 5], cl
movzx ecx, byte [esi]
shr cl, 1
and cl, 1
movzx ecx, cl
imul ecx, eax
movzx eax, bl
mov byte [edx + 6], cl
movzx ecx, byte [esi]
inc esi
and cl, 1
movzx ecx, cl
imul ecx, eax
mov byte [edx + 7], cl
add edx, 8
sub edi, 1
jne 0x5787d0
mov edi, dword [ebp - 0x54]
test edi, edi
jle 0x578895
mov cl, byte [esi]
shr cl, 7
movzx eax, bl
movzx ecx, cl
imul ecx, eax
mov byte [edx], cl
inc edx
cmp edi, 1
jle 0x5788ae
mov cl, byte [esi]
shr cl, 6
and cl, 1
movzx eax, bl
movzx ecx, cl
imul ecx, eax
mov byte [edx], cl
inc edx
cmp edi, 2
jle 0x5788c7
mov cl, byte [esi]
shr cl, 5
and cl, 1
movzx eax, bl
movzx ecx, cl
imul ecx, eax
mov byte [edx], cl
inc edx
cmp edi, 3
jle 0x5788e0
mov cl, byte [esi]
shr cl, 4
and cl, 1
movzx eax, bl
movzx ecx, cl
imul ecx, eax
mov byte [edx], cl
inc edx
cmp edi, 4
jle 0x5788f9
mov cl, byte [esi]
shr cl, 3
and cl, 1
movzx eax, bl
movzx ecx, cl
imul ecx, eax
mov byte [edx], cl
inc edx
cmp edi, 5
jle 0x578912
mov cl, byte [esi]
shr cl, 2
and cl, 1
movzx eax, bl
movzx ecx, cl
imul ecx, eax
mov byte [edx], cl
inc edx
cmp edi, 6
jle 0x578929
mov cl, byte [esi]
shr cl, 1
and cl, 1
movzx eax, bl
movzx ecx, cl
imul ecx, eax
mov byte [edx], cl
mov ecx, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x1c]
cmp ebx, dword [ebp + 0x14]
je 0x5789a6
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0xc]
add edx, ecx
mov ecx, dword [ebp + 0x18]
dec ecx
cmp ebx, 1
jne 0x578962
test ecx, ecx
js 0x5789a3
lea esp, [esp]
mov byte [edx + ecx*2 + 1], 0xff
mov al, byte [ecx + edx]
mov byte [edx + ecx*2], al
sub ecx, 1
jns 0x578950
jmp 0x5789a3
test ecx, ecx
js 0x5789a3
lea esi, [ecx*2 + 1]
add esi, edx
lea edx, [edx + ecx*4]
add esi, ecx
add edx, 2
jmp 0x578980
sub ecx, 1
mov byte [edx + 1], 0xff
movzx eax, byte [esi + 1]
lea esi, [esi - 3]
mov byte [edx], al
lea edx, [edx - 4]
movzx eax, byte [esi + 3]
mov byte [edx + 3], al
movzx eax, byte [esi + 2]
mov byte [edx + 2], al
jns 0x578980
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 0x24]
sub dword [ebp + 0x1c], 1
mov ebx, dword [ebp - 0x50]
mov edi, dword [ebp + 0x20]
mov dword [ebp - 0xc], ecx
jne 0x578661
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
cmp edi, 0x10
jne 0x5789ff
mov ebx, dword [ebp + 0x14]
mov esi, dword [ebp + 8]
imul ebx, ecx
mov esi, dword [esi + 0xc]
mov edx, esi
imul ebx, eax
test ebx, ebx
je 0x5789ff
movzx ecx, byte [esi]
lea edx, [edx + 2]
movzx eax, byte [edx - 1]
lea esi, [esi + 2]
shl cx, 8
or cx, ax
mov word [edx - 2], cx
sub ebx, 1
jne 0x5789e2
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
push str.Corrupt_PNG
push 0x652d7c
call sym.BZDPatcher.exe_SDL_SetError
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret