Function at 0x4716d5
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x474
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
push ebx
mov dword [ebp - 0x14], ebx
call dword [sym.imp.USER32.dll_GetDC]
push 0x42c
mov dword [ebp - 4], eax
lea eax, [ebp - 0x474]
push ebx
push eax
call fcn.005251f0
mov esi, dword [sym.imp.GDI32.dll_GetDIBits]
add esp, 0xc
push ebx
lea eax, [ebp - 0x474]
push eax
push ebx
push ebx
push ebx
push dword [edi + 4]
mov dword [ebp - 0x474], 0x28
push dword [ebp - 4]
call esi
cmp word [ebp - 0x466], 0x20
je 0x4718a5
cmp word [ebp - 0x466], 8
jne 0x471877
mov eax, dword [ebp - 0x460]
cmp eax, 1
mov dword [ebp - 0xc], eax
jb 0x4719e8
push eax
call fcn.0051fd80
push dword [ebp - 0xc]
mov dword [ebp + 8], eax
push ebx
push eax
call fcn.005251f0
add esp, 0x10
push ebx
lea eax, [ebp - 0x474]
push eax
push dword [ebp + 8]
push dword [ebp - 0x46c]
push ebx
push dword [edi + 4]
push dword [ebp - 4]
call esi
push 0x2c
pop esi
push esi
lea eax, [ebp - 0x48]
push ebx
push eax
call fcn.005251f0
mov eax, dword [ebp - 0x470]
add esp, 0xc
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x46c]
push ebx
push ebx
mov dword [ebp - 0x40], eax
lea eax, [ebp - 8]
push eax
push ebx
lea eax, [ebp - 0x48]
push eax
push dword [ebp - 4]
mov dword [ebp - 0x48], esi
mov word [ebp - 0x3c], 1
mov word [ebp - 0x3a], 0x20
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 8], ebx
call dword [sym.imp.GDI32.dll_CreateDIBSection]
cmp eax, ebx
mov dword [ebp - 0x14], eax
je 0x47189d
cmp dword [ebp - 8], ebx
je 0x47189d
push eax
push dword [ebp - 4]
call dword [sym.imp.GDI32.dll_SelectObject]
movzx ecx, word [ebp - 0x466]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x460]
xor edx, edx
shr ecx, 3
div ecx
xor edx, edx
cmp eax, ebx
mov dword [ebp - 0xc], eax
jbe 0x471862
mov eax, dword [ebp + 8]
movzx ecx, byte [edx + eax]
mov eax, dword [ebp - 8]
lea ecx, [ebp + ecx*4 - 0x44c]
cmp byte [ecx], 0xc0
lea esi, [eax + edx*4]
jne 0x471848
cmp byte [ecx + 1], 0xc0
jne 0x471848
cmp byte [ecx + 2], 0xc0
jne 0x471848
mov byte [esi], bl
mov byte [esi + 1], bl
mov byte [esi + 2], bl
mov byte [esi + 3], bl
jmp 0x47185c
mov byte [esi + 3], 0xff
mov al, byte [ecx + 2]
mov byte [esi + 2], al
mov al, byte [ecx + 1]
mov byte [esi + 1], al
mov al, byte [ecx]
mov byte [esi], al
inc edx
cmp edx, dword [ebp - 0xc]
jb 0x471816
push dword [ebp - 0x10]
push dword [ebp - 4]
call dword [sym.imp.GDI32.dll_SelectObject]
push dword [ebp + 8]
call fcn.00520947
pop ecx
push dword [ebp - 4]
push ebx
call dword [sym.imp.USER32.dll_ReleaseDC]
mov esi, dword [ebp - 0x14]
cmp esi, ebx
je 0x4719e8
push dword [edi + 4]
call dword [sym.imp.GDI32.dll_DeleteObject]
mov dword [edi + 4], esi
jmp 0x4719e8
push dword [ebp + 8]
jmp 0x4719d8
mov eax, dword [ebp - 0x460]
cmp eax, 4
mov dword [ebp - 0xc], eax
jb 0x4719e8
push eax
call fcn.0051fd80
push dword [ebp - 0xc]
mov dword [ebp - 8], eax
push ebx
push eax
call fcn.005251f0
add esp, 0x10
push ebx
lea eax, [ebp - 0x474]
push eax
push dword [ebp - 8]
push dword [ebp - 0x46c]
push ebx
push dword [edi + 4]
push dword [ebp - 4]
call esi
push ebx
push ebx
lea eax, [ebp - 0x18]
push eax
push ebx
lea eax, [ebp - 0x474]
push eax
push dword [ebp - 4]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x464], ebx
call dword [sym.imp.GDI32.dll_CreateDIBSection]
cmp eax, ebx
mov dword [ebp - 0x14], eax
je 0x4719d5
cmp dword [ebp - 0x18], ebx
je 0x4719d5
push eax
push dword [ebp - 4]
call dword [sym.imp.GDI32.dll_SelectObject]
movzx ecx, word [ebp - 0x466]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x460]
shr ecx, 3
xor edx, edx
div ecx
cmp eax, ebx
jbe 0x4719a0
mov edx, dword [ebp - 8]
mov dword [ebp - 0x10], 0xfffffffd
sub dword [ebp - 0x10], edx
lea ecx, [edx + 3]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x10]
lea esi, [eax + ecx]
add esi, dword [ebp - 0x18]
mov al, byte [ecx]
mov byte [esi + 3], al
movzx edx, byte [ecx]
movzx eax, byte [ecx - 1]
imul eax, edx
cdq
mov edi, 0xff
idiv edi
mov byte [esi + 2], al
movzx edx, byte [ecx - 2]
movzx eax, byte [ecx]
imul eax, edx
cdq
idiv edi
mov byte [esi + 1], al
movzx edx, byte [ecx]
movzx eax, byte [ecx - 3]
imul eax, edx
cdq
idiv edi
add ecx, 4
dec dword [ebp - 0xc]
mov byte [esi], al
jne 0x471953
mov edi, dword [ebp + 8]
push dword [ebp - 0x1c]
push dword [ebp - 4]
call dword [sym.imp.GDI32.dll_SelectObject]
push dword [ebp - 8]
call fcn.00520947
pop ecx
push dword [ebp - 4]
push ebx
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [edi + 4]
cmp eax, ebx
je 0x4719e8
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [ebp - 0x14]
mov dword [edi + 4], eax
jmp 0x4719e8
push dword [ebp - 8]
call fcn.00520947
pop ecx
push dword [ebp - 4]
push ebx
call dword [sym.imp.USER32.dll_ReleaseDC]
pop edi
pop esi
pop ebx
leave
ret 4