Function at 0x100020a0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x38
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x4c]
xor ebx, ebx
push edi
mov dword [esp + 0x30], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], ebx
xor ebp, ebp
mov dword [esp + 0x14], ebx
call sym.GEAR32PO.OCX_GPb_bits_per_pixel_get
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x4c], eax
mov esi, dword [ecx + 4]
mov edx, dword [ecx + 0xc]
cmp esi, edx
jg 0x1000235e
cmp eax, 0x18
je 0x1000213e
cmp eax, 0x20
je 0x10002135
mov ebx, dword [ecx]
mov eax, dword [ecx + 8]
cmp ebx, eax
jg 0x10002346
lea eax, [esp + 0x30]
push eax
push esi
push ebx
push edi
call fcn.10004cc0
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x50]
and ecx, 0xff
mov eax, dword [edx + 8]
add ebp, ecx
mov ecx, dword [esp + 0x10]
inc ebx
inc ecx
cmp ebx, eax
mov dword [esp + 0x10], ecx
jle 0x10002102
jmp 0x10002346
cmp eax, 0x18
jne 0x10002237
mov ebx, dword [ecx]
mov eax, dword [ecx + 8]
cmp ebx, eax
jg 0x10002346
mov eax, dword [esp + 0x58]
dec eax
mov dword [esp + 0x34], eax
jmp 0x1000215a
mov eax, dword [esp + 0x34]
cmp eax, 0xf
ja case.0x1000216b.5
xor ecx, ecx
mov cl, byte [eax + 0x10002468]
jmp dword [ecx*4 + 0x10002450]
push esi
push ebx
push edi
call sym.GEAR32PO.OCX_GPb_DIB_pointer_get
push eax
call fcn.10005750
jmp 0x10002212
push esi
push ebx
push edi
call sym.GEAR32PO.OCX_GPb_DIB_pointer_get
push eax
call fcn.100056d0
jmp 0x10002212
push esi
push ebx
push edi
call sym.GEAR32PO.OCX_GPb_DIB_pointer_get
push eax
call fcn.10005550
jmp 0x10002212
lea edx, [esp + 0x38]
push edx
push esi
push ebx
push edi
call sym.GEAR32PO.OCX_GPb_DIB_pointer_get
push eax
call fcn.100053f0
mov eax, dword [esp + 0x3a]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
and eax, 0xff
add ecx, eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x39]
and ecx, 0xff
add edx, ecx
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x38]
and edx, 0xff
add eax, edx
mov dword [esp + 0x1c], eax
jmp case.0x1000216b.5
lea eax, [esp + 0x38]
push eax
push esi
push ebx
push edi
call sym.GEAR32PO.OCX_GPb_DIB_pointer_get
push eax
call fcn.100053f0
lea ecx, [esp + 0x38]
push ecx
call fcn.1001cce0
and eax, 0xff
add ebp, eax
mov edx, dword [esp + 0x50]
mov ecx, dword [esp + 0x10]
inc ebx
inc ecx
mov eax, dword [edx + 8]
mov dword [esp + 0x10], ecx
cmp ebx, eax
jle 0x10002156
jmp 0x10002346
cmp eax, 0x20
jne 0x10002346
mov ebx, dword [ecx]
mov eax, dword [ecx + 8]
cmp ebx, eax
jg 0x10002346
mov eax, dword [esp + 0x58]
cmp eax, 0x40
ja 0x10002287
je 0x10002274
cmp eax, 0x20
jne 0x1000232d
push esi
push ebx
push edi
call sym.GEAR32PO.OCX_GPb_DIB_pointer_get
push eax
call fcn.10005590
jmp 0x10002326
push esi
push ebx
push edi
call sym.GEAR32PO.OCX_GPb_DIB_pointer_get
push eax
call fcn.100055d0
jmp 0x10002326
cmp eax, 0x80
je 0x10002318
cmp eax, 0x100
je 0x10002308
cmp eax, 0x1e0
jne 0x1000232d
lea eax, [esp + 0x40]
push eax
push esi
push ebx
push edi
call sym.GEAR32PO.OCX_GPb_DIB_pointer_get
push eax
call fcn.10005440
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
and ecx, 0xff
add edx, ecx
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x41]
and edx, 0xff
add eax, edx
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x42]
and eax, 0xff
add ecx, eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x43]
and ecx, 0xff
add eax, ecx
mov dword [esp + 0x2c], eax
jmp 0x1000232d
push esi
push ebx
push edi
call sym.GEAR32PO.OCX_GPb_DIB_pointer_get
push eax
call fcn.10005650
jmp 0x10002326
push esi
push ebx
push edi
call sym.GEAR32PO.OCX_GPb_DIB_pointer_get
push eax
call fcn.10005610
and eax, 0xff
add ebp, eax
mov edx, dword [esp + 0x50]
mov ecx, dword [esp + 0x10]
inc ebx
inc ecx
mov eax, dword [edx + 8]
mov dword [esp + 0x10], ecx
cmp ebx, eax
jle 0x1000224d
mov ecx, dword [esp + 0x50]
inc esi
mov eax, dword [ecx + 0xc]
cmp esi, eax
mov eax, dword [esp + 0x4c]
jle 0x100020eb
mov ebx, dword [esp + 0x10]
cmp eax, 0x18
je 0x10002371
cmp eax, 0x20
jne 0x10002439
cmp eax, 0x18
jne 0x100023d0
mov edx, dword [esp + 0x58]
lea eax, [edx - 1]
cmp eax, 0xf
ja case.0x10002389.5
xor ecx, ecx
mov cl, byte [eax + 0x1000248c]
jmp dword [ecx*4 + 0x10002478]
mov eax, ebp
cdq
idiv ebx
mov edx, dword [esp + 0x54]
mov byte [edx], al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret 0x10
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x54]
cdq
idiv ebx
mov byte [ecx + 2], al
mov eax, dword [esp + 0x18]
cdq
idiv ebx
mov byte [ecx + 1], al
mov eax, dword [esp + 0x1c]
cdq
idiv ebx
mov byte [ecx], al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret 0x10
cmp eax, 0x20
jne case.0x10002389.5
mov eax, dword [esp + 0x58]
cmp eax, 0x40
ja 0x100023ef
je 0x10002439
cmp eax, 0x20
je 0x10002439
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret 0x10
cmp eax, 0x80
je 0x10002439
cmp eax, 0x100
je 0x10002439
cmp eax, 0x1e0
jne case.0x10002389.5
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x54]
cdq
idiv ebx
mov byte [ecx], al
mov eax, dword [esp + 0x24]
cdq
idiv ebx
mov byte [ecx + 1], al
mov eax, dword [esp + 0x28]
cdq
idiv ebx
mov byte [ecx + 2], al
mov eax, dword [esp + 0x2c]
cdq
idiv ebx
mov byte [ecx + 3], al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret 0x10
mov eax, ebp
mov ecx, dword [esp + 0x54]
cdq
idiv ebx
mov byte [ecx], al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret 0x10