Function at 0x405cd0
Capabilities:
Encrypt data using rc4 ksa
Print debug messages

Disassembly:
push ebx
push esi
push edi
push ebp
sub esp, 0x70
mov eax, dword [esp + 0x88]
movsx ebx, word [eax + 2]
mov eax, dword [esp + 0x88]
movsx ebp, word [eax + 6]
sub ebp, ebx
mov eax, dword [esp + 0x88]
movsx esi, word [eax]
mov ecx, dword [esp + 0x88]
movsx eax, word [ecx + 4]
mov dword [esp + 0x2c], eax
sub dword [esp + 0x2c], esi
mov eax, ebp
cdq
and edx, 3
add eax, edx
and eax, 3
sub eax, edx
test eax, eax
je 0x405d26
mov edi, 4
sub edi, eax
add ebp, edi
push dword [esp + 0x84]
call dword [0x4ea5e0]
mov dword [esp + 0x34], eax
lea edi, [esp + 0x40]
mov esi, 0x4be6d8
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x44], ebp
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x48], eax
mov dword [esp + 0x6c], 0
push 0
push 0
lea eax, [esp + 0x74]
push eax
push 0
lea eax, [esp + 0x50]
push eax
push 0
call dword [0x4ea5f8]
mov dword [esp + 0x38], eax
test eax, eax
je 0x405d82
cmp dword [esp + 0x6c], 0
jne 0x405d95
push str.hBitmap_or_destBits_is_null_n
call dword [0x4ea6f8]
add esp, 0x70
pop ebp
pop edi
pop esi
pop ebx
ret
mov dword [esp + 0x30], ebp
mov edx, ebp
mov ecx, ebp
lea eax, [ecx + edx*2]
mov dword [esp + 0x30], eax
push dword [esp + 0x38]
push dword [esp + 0x38]
call dword [0x4ea5e4]
mov dword [esp + 0x3c], eax
push 0xcc0020
mov eax, dword [esp + 0x8c]
movsx ebx, word [eax]
push ebx
mov eax, dword [esp + 0x90]
movsx eax, word [eax + 2]
push eax
push dword [esp + 0x90]
push dword [esp + 0x3c]
push ebp
push 0
push 0
push dword [esp + 0x54]
call dword [0x4ea5e8]
mov eax, dword [esp + 0x88]
movsx edx, word [eax + 2]
mov ecx, dword [esp + 0x88]
movsx eax, word [ecx + 6]
mov dword [esp + 0x1c], eax
sub dword [esp + 0x1c], edx
mov eax, dword [esp + 0x94]
movsx esi, word [eax + 2]
mov ecx, dword [esp + 0x94]
movsx eax, word [ecx + 6]
mov dword [esp + 0x24], eax
sub dword [esp + 0x24], esi
mov dword [esp + 0x28], 0
cmp dword [esp + 0x2c], 0
jle 0x405fd8
mov eax, eax
lea eax, [eax]
mov ebp, dword [esp + 0x2c]
dec ebp
sub ebp, dword [esp + 0x28]
imul ebp, dword [esp + 0x30]
add ebp, dword [esp + 0x6c]
mov eax, dword [esp + 0x94]
movsx ecx, word [eax]
mov eax, dword [esp + 0x94]
movsx eax, word [eax + 4]
sub eax, ecx
imul eax, dword [esp + 0x28]
cdq
idiv dword [esp + 0x2c]
add eax, ecx
mov dword [esp + 0x20], eax
mov ecx, eax
imul ecx, dword [esp + 0x90]
mov dword [esp + 0x20], ecx
add ecx, dword [esp + 0x8c]
mov dword [esp + 0x20], ecx
imul eax, dword [esp + 0x9c]
add eax, dword [esp + 0x98]
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], 0
cmp dword [esp + 0x1c], 0
jle 0x405fc6
mov dword [esp + 0x14], 0
mov eax, dword [esp + 0x14]
cdq
idiv dword [esp + 0x1c]
mov ecx, dword [esp + 0x94]
movsx edi, word [ecx + 2]
add eax, edi
lea esi, [eax*4]
add esi, dword [esp + 0x20]
mov edx, dword [esp + 0x10]
movzx ecx, byte [edx + eax*4 + 1]
mov dword [esp + 0xc], ecx
mov edi, 0xff
sub edi, ecx
movzx edx, byte [esi]
imul edx, edi
mov eax, 0x80808081
mov ebx, edx
imul edx
add edx, ebx
shr ebx, 0x1f
sar edx, 7
add ebx, edx
movzx edx, byte [ebp]
imul edx, dword [esp + 0xc]
mov eax, 0x80808081
mov ecx, edx
imul edx
add edx, ecx
shr ecx, 0x1f
sar edx, 7
add ecx, edx
add bl, cl
mov byte [ebp], bl
movzx edx, byte [esi + 1]
imul edx, edi
mov eax, 0x80808081
mov ebx, edx
imul edx
add edx, ebx
shr ebx, 0x1f
sar edx, 7
add ebx, edx
movzx edx, byte [ebp + 1]
imul edx, dword [esp + 0xc]
mov eax, 0x80808081
mov ecx, edx
imul edx
add edx, ecx
shr ecx, 0x1f
sar edx, 7
add ecx, edx
add bl, cl
mov byte [ebp + 1], bl
movzx edx, byte [esi + 2]
imul edx, edi
mov eax, 0x80808081
mov ebx, edx
imul edx
add edx, ebx
shr ebx, 0x1f
sar edx, 7
add ebx, edx
movzx edx, byte [ebp + 2]
imul edx, dword [esp + 0xc]
mov eax, 0x80808081
mov ecx, edx
imul edx
add edx, ecx
shr ecx, 0x1f
sar edx, 7
add ecx, edx
add bl, cl
mov byte [ebp + 2], bl
add ebp, 3
mov eax, dword [esp + 0x14]
add eax, dword [esp + 0x24]
mov dword [esp + 0x14], eax
inc dword [esp + 0x18]
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x1c]
jl 0x405ec0
inc dword [esp + 0x28]
mov eax, dword [esp + 0x28]
cmp eax, dword [esp + 0x2c]
jl 0x405e40
push 0xcc0020
push 0
push 0
push dword [esp + 0x40]
push dword [esp + 0x3c]
mov eax, dword [esp + 0x9c]
movsx ebp, word [eax + 2]
mov eax, dword [esp + 0x9c]
movsx esi, word [eax + 6]
sub esi, ebp
push esi
mov eax, dword [esp + 0xa0]
movsx eax, word [eax]
push eax
push ebp
push dword [esp + 0xa4]
call dword [0x4ea5e8]
push dword [esp + 0x3c]
push dword [esp + 0x38]
call dword [0x4ea5e4]
push dword [esp + 0x38]
call dword [0x4ea5dc]
push dword [esp + 0x34]
call dword [0x4ea5f4]
add esp, 0x70
pop ebp
pop edi
pop esi
pop ebx
ret