Function at 0x437295
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x15c
push esi
mov esi, dword [ebp + 0x2c]
cmp esi, 8
jbe 0x4372ae
xor eax, eax
jmp 0x4375d1
mov eax, dword [ebp + 0xc]
xor edx, edx
div esi
xor edx, edx
mov ecx, eax
mov eax, dword [ebp + 0x10]
div esi
push ebx
mov ebx, dword [ebp + 0x24]
mov dword [ebp - 0x3c], ecx
inc ecx
push edi
xor edi, edi
mov dword [ebp - 0x18], eax
cmp dword [ebp + 0x28], edi
lea edx, [eax + 1]
push 4
cmove ecx, edi
cmove edx, edi
imul ebx, esi
mov eax, ebx
mov dword [ebp - 0x38], ebx
imul eax, dword [ebp - 0x3c]
add eax, ecx
mov ecx, ebx
imul ecx, dword [ebp - 0x18]
mov dword [ebp - 0x30], eax
add ecx, edx
mov dword [ebp - 0x50], ecx
imul ecx, eax
push ecx
mov dword [ebp - 0x48], ecx
call dword [sym.imp.msvcrt.dll_calloc]
mov dword [ebp - 0x1c], eax
mov edx, edi
mov eax, dword [ebp - 0x18]
mov dword [ebp - 8], edi
pop ecx
pop ecx
test eax, eax
je 0x437565
mov ecx, dword [ebp + 0xc]
imul ecx, esi
mov dword [ebp - 0x28], edi
shl ecx, 2
mov dword [ebp - 0x58], ecx
cmp dword [ebp - 0x3c], 0
mov ecx, edi
mov dword [ebp - 0x10], ecx
jbe 0x437550
mov eax, esi
mov dword [ebp - 0x2c], edi
shl eax, 2
mov dword [ebp - 0x44], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x34], eax
test esi, esi
je 0x437380
mov eax, dword [ebp - 0x44]
lea ebx, [ebp - 0x15c]
mov edi, esi
mov esi, dword [ebp - 0x34]
push eax
push esi
push ebx
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp + 0xc]
add esp, 0xc
shl eax, 2
add esi, eax
mov eax, dword [ebp - 0x44]
add ebx, eax
dec edi
jne 0x437359
mov esi, dword [ebp + 0x2c]
mov ebx, dword [ebp - 0x38]
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
mov eax, edi
mov dword [ebp - 4], eax
test ebx, ebx
je 0x437532
lea esi, [ebx + 1]
mov ebx, esi
imul esi, edx
imul ebx, ecx
inc esi
mov dword [ebp - 0x54], ebx
mov ebx, dword [ebp - 0x38]
mov dword [ebp - 0x40], esi
xor edx, edx
mov ecx, edi
div dword [ebp + 0x24]
mov edi, dword [ebp + 0x2c]
imul eax, edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x54]
inc eax
mov dword [ebp - 0x4c], esi
add eax, ecx
cmp dword [ebp + 0x28], 0
mov dword [ebp - 0x14], eax
jne 0x4373d8
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x28]
add eax, ecx
add edx, dword [ebp - 4]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x4c], edx
mov eax, ecx
xor edx, edx
div dword [ebp + 0x24]
add eax, dword [ebp - 0x5c]
mov ecx, dword [ebp + eax*4 - 0x15c]
mov dword [ebp - 0x20], ecx
test ecx, 0xff000000
jne 0x43741d
mov eax, dword [ebp - 0xc]
xor edx, edx
mov esi, edi
shr esi, 1
div esi
xor edx, edx
mov ecx, eax
mov eax, dword [ebp - 4]
div esi
push 0xffffffffffffffff
xor cl, al
mov eax, 0xffc0c0c0
test cl, 1
pop ecx
cmovne ecx, eax
jmp 0x4374d3
cmp dword [ebp + 0x34], 0
je 0x4374d6
mov eax, ecx
shr eax, 0x18
mov dword [ebp - 0x24], eax
cmp eax, 0xff
jae 0x4374d6
mov eax, dword [ebp - 0xc]
xor edx, edx
mov esi, edi
shr esi, 1
div esi
xor edx, edx
mov ecx, eax
mov eax, dword [ebp - 4]
div esi
push 0xffffffffffffffff
xor cl, al
mov eax, 0xffc0c0c0
test cl, 1
pop ebx
cmovne ebx, eax
mov eax, 0xff
mov edx, eax
mov esi, ebx
sub edx, dword [ebp - 0x24]
mov ecx, ebx
sar esi, 0x10
and esi, eax
sar ecx, 8
mov eax, dword [ebp - 0x20]
and ecx, 0xff
shr eax, 0x10
and eax, 0xff
imul esi, edx
imul eax, dword [ebp - 0x24]
imul ecx, edx
add esi, eax
mov eax, dword [ebp - 0x20]
shr eax, 8
and eax, 0xff
shl esi, 8
imul eax, dword [ebp - 0x24]
and esi, 0xffff00ff
add ecx, eax
mov eax, dword [ebp - 0x20]
or esi, ecx
movzx ecx, al
imul ecx, dword [ebp - 0x24]
and esi, 0xffffff00
movzx eax, bl
mov ebx, dword [ebp - 0x38]
imul eax, edx
add ecx, eax
shr ecx, 8
or ecx, esi
or ecx, 0xff000000
mov esi, dword [ebp - 0x40]
mov eax, dword [ebp + 0x14]
cmp dword [ebp - 0x10], eax
jne 0x4374f7
mov eax, dword [ebp + 0x18]
cmp dword [ebp - 8], eax
jne 0x4374f7
mov eax, ecx
and ecx, 0xff808080
or eax, 0x1010100
shr eax, 1
or ecx, eax
mov edx, dword [ebp - 0x4c]
imul edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x1c]
add edx, dword [ebp - 0x14]
mov dword [eax + edx*4], ecx
mov ecx, dword [ebp - 0xc]
inc ecx
mov dword [ebp - 0xc], ecx
cmp ecx, ebx
jb 0x4373b5
mov eax, dword [ebp - 4]
inc eax
inc esi
mov dword [ebp - 4], eax
mov dword [ebp - 0x40], esi
push 0
pop edi
cmp eax, ebx
jb 0x4373a2
mov esi, dword [ebp + 0x2c]
mov ecx, dword [ebp - 0x10]
add dword [ebp - 0x2c], ebx
mov eax, esi
mov edx, dword [ebp - 8]
inc ecx
shl eax, 2
add dword [ebp - 0x34], eax
mov dword [ebp - 0x10], ecx
cmp ecx, dword [ebp - 0x3c]
jb 0x437347
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x58]
inc edx
add dword [ebp + 8], ecx
add dword [ebp - 0x28], ebx
mov dword [ebp - 8], edx
cmp edx, eax
jb 0x437327
cmp dword [ebp + 0x30], 0
mov eax, dword [ebp + 0x1c]
mov ebx, dword [ebp - 0x30]
mov esi, dword [ebp - 0x50]
mov dword [eax], ebx
mov eax, dword [ebp + 0x20]
mov dword [eax], esi
je 0x4375b3
cmp dword [ebp - 0x48], 0
jbe 0x4375b3
mov ebx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x48]
mov ecx, dword [ebx + edi*4]
mov edx, ecx
shr edx, 0x10
and edx, 0xff
movzx eax, cl
shl eax, 0x10
and ecx, 0xff00ff00
or edx, eax
or edx, ecx
mov dword [ebx + edi*4], edx
inc edi
cmp edi, esi
jb 0x437587
mov ebx, dword [ebp - 0x30]
mov esi, dword [ebp - 0x50]
mov edi, dword [ebp - 0x1c]
push edi
push 0x20
push 1
push esi
push ebx
call dword [sym.imp.GDI32.dll_CreateBitmap]
push edi
mov esi, eax
call dword [sym.imp.msvcrt.dll_free]
pop ecx
pop edi
mov eax, esi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret