Function at 0x4264f0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x244
lea eax, [esp + 0x3c]
push ebx
push esi
mov ecx, dword [0x4d6e30]
push edi
push ebp
push 0
mov ebx, dword [ecx]
push eax
call dword [ebx + 0x10]
test eax, eax
je 0x42697b
lea eax, [esp + 0x10]
lea ecx, [esp + 0x50]
push eax
mov edx, dword [0x4d6e44]
push ecx
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0x10]
test eax, eax
je 0x42697b
mov eax, dword [0x4d6e44]
xor ecx, ecx
mov cl, byte [eax + 0xd]
mov dword [esp + 0x28], ecx
xor ecx, ecx
mov cl, byte [eax + 0x10]
mov dword [esp + 0x2c], ecx
xor ecx, ecx
mov cl, byte [eax + 0x13]
mov dword [esp + 0x30], ecx
xor ecx, ecx
mov cl, byte [eax + 0xe]
mov dword [esp + 0x38], ecx
xor ecx, ecx
mov cl, byte [eax + 0x11]
mov dword [esp + 0x3c], ecx
xor ecx, ecx
mov cl, byte [eax + 0x14]
mov eax, dword [0x4d6e34]
and eax, 0xff0000
mov dword [esp + 0x40], ecx
shr eax, 0x10
mov dword [esp + 0x34], eax
xor eax, eax
mov al, byte [0x4d6e35]
mov dword [esp + 0x1c], eax
mov eax, dword [0x4d6e34]
and eax, 0xff
mov dword [esp + 0x18], eax
mov eax, dword [0x4d6e34]
and eax, 0xffffff
cmp eax, 0xffffff
je 0x426643
lea edi, [esp + 0x54]
mov ebx, dword [esp + 0x10]
xor esi, esi
mov cl, byte [esp + 0x28]
mov si, word [ebx]
add edi, 2
mov eax, esi
add ebx, 2
sar eax, cl
and eax, dword [esp + 0x38]
imul eax, dword [esp + 0x34]
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov ebp, eax
mov eax, esi
shl bp, cl
mov cl, byte [esp + 0x30]
sar eax, cl
and eax, dword [esp + 0x40]
imul eax, dword [esp + 0x18]
cdq
and edx, 0xff
add eax, edx
sar eax, 8
shl ax, cl
or bp, ax
mov cl, byte [esp + 0x2c]
sar esi, cl
and esi, dword [esp + 0x3c]
imul esi, dword [esp + 0x1c]
mov eax, esi
cdq
and edx, 0xff
add eax, edx
sar eax, 8
shl ax, cl
or bp, ax
lea eax, [esp + 0x254]
mov word [edi - 2], bp
cmp edi, eax
jb 0x4265b5
lea eax, [esp + 0x54]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], 0
mov eax, dword [0x4d6e34]
shr eax, 0x18
cmp dword [0x4d6e48], 0
mov dword [esp + 0x20], eax
jle 0x426959
mov eax, dword [0x4ae0c8]
mov ecx, dword [0x4d6e54]
add eax, dword [esp + 0x14]
imul eax, dword [0x4d6e2c]
cdq
idiv dword [0x4d6e3c]
add ecx, eax
cmp dword [0x4d6e58], 0
je 0x4266b3
mov esi, dword [0x4ae0c0]
mov eax, dword [0x4d6e30]
movsx edx, word [eax + 0x1e]
sub esi, dword [esp + 0x14]
mov eax, dword [0x4ae0bc]
add esi, dword [0x4d6e48]
dec esi
imul esi, edx
lea esi, [esi + eax*2]
jmp 0x4266d1
mov eax, dword [0x4d6e30]
mov edx, dword [0x4ae0bc]
movsx esi, word [eax + 0x1e]
mov eax, dword [0x4ae0c0]
add eax, dword [esp + 0x14]
imul esi, eax
lea esi, [esi + edx*2]
add esi, dword [esp + 0x4c]
mov eax, dword [0x4d6e44]
movsx eax, word [eax + 0x1e]
imul eax, ecx
add eax, dword [esp + 0x50]
cmp dword [esp + 0x20], 0
mov dword [esp + 0x24], eax
jne 0x426737
xor edi, edi
cmp dword [0x4d6e4c], edi
jle 0x426945
mov eax, dword [0x4ae0c4]
xor ecx, ecx
add eax, edi
mov edx, dword [esp + 0x24]
mov ebx, dword [eax*4 + 0x4d4e28]
xor eax, eax
mov cl, byte [ebx + edx]
mov ebx, dword [esp + 0x10]
mov ax, word [ebx + ecx*2]
test eax, eax
je 0x426726
mov word [esi], ax
inc edi
add esi, 2
cmp edi, dword [0x4d6e4c]
jl 0x4266fe
jmp 0x426945
cmp dword [esp + 0x20], 0x80
jne 0x426825
cmp dword [0x4d6e5c], 0
je 0x42679f
xor edi, edi
cmp dword [0x4d6e4c], edi
jle 0x426945
mov eax, dword [0x4ae0c4]
xor ecx, ecx
add eax, edi
mov edx, dword [esp + 0x24]
mov ebx, dword [eax*4 + 0x4d4e28]
mov eax, dword [esp + 0x10]
mov cl, byte [ebx + edx]
xor edx, edx
mov dx, word [eax + ecx*2]
test edx, edx
je 0x42678e
mov eax, dword [esp + 0x14]
add eax, edi
test al, 1
je 0x42678e
mov word [esi], dx
inc edi
add esi, 2
cmp dword [0x4d6e4c], edi
jg 0x42675c
jmp 0x426945
mov cl, byte [esp + 0x30]
mov edi, 1
mov ebx, 1
mov eax, 1
shl edi, cl
mov cl, byte [esp + 0x2c]
shl ebx, cl
or edi, ebx
mov cl, byte [esp + 0x28]
shl eax, cl
or edi, eax
xor ecx, ecx
not edi
cmp dword [0x4d6e4c], ecx
jle 0x426945
mov eax, dword [0x4ae0c4]
mov edx, dword [esp + 0x24]
add eax, ecx
mov ebp, dword [esp + 0x10]
mov ebx, dword [eax*4 + 0x4d4e28]
xor eax, eax
mov al, byte [ebx + edx]
xor ebx, ebx
mov bx, word [ebp + eax*2]
test ebx, ebx
je 0x426814
mov dx, word [esi]
and ebx, edi
shr dx, 1
mov eax, edi
shr ebx, 1
shr eax, 1
and dx, ax
add dx, bx
mov word [esi], dx
inc ecx
add esi, 2
cmp ecx, dword [0x4d6e4c]
jl 0x4267d4
jmp 0x426945
mov dword [esp + 0x48], 0
cmp dword [0x4d6e4c], 0
jle 0x426945
mov eax, dword [0x4ae0c4]
xor ecx, ecx
add eax, dword [esp + 0x48]
mov edx, dword [esp + 0x24]
xor edi, edi
mov ebx, dword [eax*4 + 0x4d4e28]
mov eax, dword [esp + 0x10]
mov cl, byte [ebx + edx]
mov di, word [eax + ecx*2]
test edi, edi
je 0x42692e
mov al, byte [esp + 0x28]
mov edx, edi
mov cl, al
mov ebx, edi
xor ebp, ebp
mov byte [esp + 0x44], al
mov bp, word [esi]
mov al, byte [esp + 0x2c]
shr edx, cl
and edx, dword [esp + 0x38]
mov cl, al
shr ebx, cl
and ebx, dword [esp + 0x3c]
mov byte [esp + 0x1c], al
mov al, byte [esp + 0x30]
mov cl, al
mov byte [esp + 0x18], al
shr edi, cl
and edi, dword [esp + 0x40]
mov eax, ebp
mov cl, byte [esp + 0x44]
sar eax, cl
and eax, dword [esp + 0x38]
mov cl, byte [esp + 0x1c]
sub eax, edx
imul eax, dword [esp + 0x20]
shl edx, 8
add eax, edx
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov dword [esp + 0x34], eax
mov eax, ebp
sar eax, cl
and eax, dword [esp + 0x3c]
mov cl, byte [esp + 0x18]
sar ebp, cl
sub eax, ebx
and ebp, dword [esp + 0x40]
imul eax, dword [esp + 0x20]
shl ebx, 8
sub ebp, edi
shl edi, 8
add eax, ebx
cdq
imul ebp, dword [esp + 0x20]
and edx, 0xff
add eax, edx
sar eax, 8
mov ebx, eax
lea eax, [ebp + edi]
cdq
and edx, 0xff
add eax, edx
sar eax, 8
shl ax, cl
mov cl, byte [esp + 0x1c]
shl bx, cl
or ax, bx
mov edx, dword [esp + 0x34]
mov cl, byte [esp + 0x44]
shl dx, cl
or ax, dx
mov word [esi], ax
add esi, 2
inc dword [esp + 0x48]
mov eax, dword [esp + 0x48]
cmp dword [0x4d6e4c], eax
jg 0x42683a
inc dword [esp + 0x14]
mov eax, dword [esp + 0x14]
cmp eax, dword [0x4d6e48]
jl 0x426664
mov eax, dword [0x4d6e30]
mov ecx, eax
mov ebx, dword [eax]
call dword [ebx + 0x14]
mov ecx, dword [0x4d6e44]
mov eax, dword [ecx]
call dword [eax + 0x14]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x244
ret
push str.failed_the_Lock_sprite_texutre._sp_trans16src8
call fcn.0043d360
add esp, 4
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x244
ret