Function at 0x100331c0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0xc8
mov eax, dword [0x1026a5dc]
xor eax, esp
mov dword [esp + 0xc4], eax
mov eax, dword [esp + 0xcc]
push ebx
mov ebx, ecx
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0xd4]
mov dword [esp + 0x40], eax
push ebp
mov eax, dword [ebx]
push esi
push edi
mov dword [esp + 0x44], edx
mov dword [esp + 0x38], ebx
mov dword [eax + 8], 0
call fcn.100324a0
mov edi, dword [ebx]
test eax, eax
jne 0x1003321c
mov edx, dword [edi + 8]
mov ecx, ebx
push eax
call fcn.10031ca0
jmp 0x10033717
mov edi, dword [edi + 8]
mov dword [esp + 0x10], edi
cmp edi, 3
jne 0x1003324c
cmp dword [ebx + 0x47ec], edi
je 0x10033242
cmp dword [ebx + 0x47e8], 0
jne 0x1003324c
cmp dword [ebx + 0x47e4], 0
jne 0x1003324c
mov dword [esp + 0x20], 1
jmp 0x1003326c
test edi, edi
jg 0x10033260
push 0
mov edx, edi
mov ecx, ebx
call fcn.10031ca0
jmp 0x10033717
mov dword [esp + 0x20], 0
mov dword [esp + 0x10], edi
mov ecx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
lea esi, [ebx + 0x46a0]
xorps xmm0, xmm0
mov dword [esp + 0x14], esi
movups xmmword [esp + 0x28], xmm0
lea ebp, [esp + 0x5c]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x24], ecx
mov eax, dword [ebx]
mov eax, dword [eax]
add eax, 3
push eax
call ecx
add esp, 4
mov dword [esi + 0x34], eax
test eax, eax
je 0x100336f0
mov eax, dword [ebx + 0x4684]
cdq
idiv dword [esi]
mov dword [ebp + 0x10], 0
mov dword [esp + 0x18], eax
mov dword [ebp], eax
mov eax, dword [ebx + 0x4688]
cdq
idiv dword [esi + 4]
xor edx, edx
mov esi, eax
mov eax, dword [esp + 0x18]
mov ecx, esi
mov dword [ebp + 4], esi
sar ecx, 1
dec eax
mov dword [ebp + 0xc], ecx
mov ecx, dword [ebx]
mov ecx, dword [ecx]
add eax, ecx
mov ecx, dword [esp + 0x18]
div ecx
mov dword [ebp + 8], eax
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 0x28]
mov dword [ebp - 4], eax
mov dword [ebp - 8], eax
cmp ecx, 1
jne 0x10033318
cmp esi, ecx
jne 0x1003330c
mov eax, 0x10032860
jmp 0x1003333b
cmp esi, 2
jne 0x10033336
mov eax, 0x10032870
jmp 0x1003333b
cmp ecx, 2
jne 0x10033336
cmp esi, 1
jne 0x10033329
mov eax, 0x10032aa0
jmp 0x1003333b
cmp esi, 2
jne 0x10033336
mov eax, dword [ebx + 0x4814]
jmp 0x1003333b
mov eax, 0x10032da0
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x24]
add esi, 0x48
mov dword [ebp - 0xc], eax
add ebp, 0x20
mov eax, dword [esp + 0x1c]
inc eax
mov dword [esp + 0x14], esi
mov dword [esp + 0x1c], eax
cmp eax, edi
jl 0x10033294
mov esi, dword [ebx]
mov ecx, 4
push 1
mov eax, dword [esi + 4]
mov ebp, dword [esi]
mov edx, ebp
push eax
mov dword [esp + 0x24], eax
call fcn.1002d3f0
add esp, 8
test eax, eax
je 0x100333a2
imul ebp, dword [esp + 0x1c]
lea eax, [ebp*4 + 1]
push eax
call dword [esp + 0x28]
mov esi, dword [ebx]
mov ebp, eax
add esp, 4
mov dword [esp + 0x1c], ebp
test ebp, ebp
jne 0x100333aa
mov edx, dword [esi + 8]
jmp 0x100336f5
xor ecx, ecx
mov dword [esp + 0x24], ecx
cmp dword [esi + 4], ecx
jbe 0x100336ac
nop dword [eax]
mov eax, dword [esi]
imul eax, ecx
lea ecx, [eax*4]
add ecx, ebp
xor ebp, ebp
mov dword [esp + 0x14], ecx
test edi, edi
jle 0x10033479
lea edi, [ebx + 0x46bc]
mov ebx, dword [esp + 0x10]
lea esi, [esp + 0x68]
nop word [eax + eax]
mov eax, dword [esp + 0x20]
mov edx, ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], eax
mov eax, dword [esi - 8]
sar eax, 1
cmp dword [esi], eax
jl 0x10033419
mov ebx, dword [esp + 0x18]
mov eax, dword [esi - 0x10]
mov ecx, dword [esi - 0x14]
mov dword [esp + 0x20], ebx
mov ebx, edx
jmp 0x1003341f
mov eax, dword [esi - 0x14]
mov ecx, dword [esi - 0x10]
push dword [esi - 0xc]
push dword [esi - 4]
push ecx
push eax
push dword [edi + 0x18]
call dword [esi - 0x18]
mov dword [esp + ebp*4 + 0x3c], eax
add esp, 0x14
mov eax, dword [esi]
inc eax
mov dword [esi], eax
cmp eax, dword [esi - 8]
jl 0x1003345c
inc dword [esi + 4]
mov eax, dword [esi + 4]
mov ecx, dword [esi - 0x10]
mov dword [esi], 0
mov dword [esi - 0x14], ecx
cmp eax, dword [edi]
jge 0x1003345c
mov eax, dword [edi + 4]
add eax, ecx
mov dword [esi - 0x10], eax
inc ebp
add esi, 0x20
add edi, 0x48
cmp ebp, ebx
jl 0x100333f0
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x38]
mov edi, dword [esp + 0x10]
mov esi, dword [ebx]
mov eax, dword [esi + 8]
cmp eax, 3
jne 0x100334fd
cmp dword [esp + 0x20], 0
je 0x100334dc
xor ebp, ebp
cmp dword [esi], ebp
jbe 0x10033694
mov edi, dword [esp + 0x2c]
add ecx, 2
mov esi, dword [esp + 0x28]
mov edx, edi
mov eax, dword [esp + 0x30]
sub esi, edi
sub eax, edi
mov edi, eax
nop dword [eax]
movzx eax, byte [esi + edx]
lea ecx, [ecx + 4]
mov byte [ecx - 6], al
lea edx, [edx + 1]
movzx eax, byte [edx - 1]
inc ebp
mov byte [ecx - 5], al
movzx eax, byte [edi + edx - 1]
mov byte [ecx - 4], al
mov byte [ecx - 3], 0xff
mov eax, dword [ebx]
cmp ebp, dword [eax]
jb 0x100334b0
jmp 0x10033690
mov eax, dword [ebx + 0x4810]
push 4
push dword [esi]
push dword [esp + 0x38]
push dword [esp + 0x38]
push dword [esp + 0x38]
push ecx
call eax
add esp, 0x18
jmp 0x10033694
cmp eax, 4
jne 0x1003366b
mov eax, dword [ebx + 0x47e8]
test eax, eax
jne 0x100335bd
mov dword [esp + 0x18], eax
cmp dword [esi], eax
jbe 0x10033694
mov edx, dword [esp + 0x34]
lea esi, [ecx + 2]
mov ecx, dword [esp + 0x2c]
mov ebp, edx
mov eax, dword [esp + 0x28]
sub ecx, edx
mov edi, dword [esp + 0x18]
sub eax, edx
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x30]
sub ecx, edx
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], ecx
nop dword [eax + eax]
movzx ecx, byte [eax + ebp]
lea esi, [esi + 4]
movzx edx, byte [ebp]
lea ebp, [ebp + 1]
imul ecx, edx
inc edi
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 6], al
mov eax, dword [esp + 0x14]
movzx ecx, byte [eax + ebp - 1]
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 5], al
mov eax, dword [esp + 0x3c]
movzx ecx, byte [eax + ebp - 1]
imul ecx, edx
mov byte [esi - 3], 0xff
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 4], al
mov eax, dword [ebx]
cmp edi, dword [eax]
mov eax, dword [esp + 0x40]
jb 0x10033550
jmp 0x10033690
mov ecx, dword [esi]
mov esi, dword [esp + 0x14]
mov edx, dword [ebx + 0x4810]
push 4
push ecx
push dword [esp + 0x38]
push dword [esp + 0x38]
push dword [esp + 0x38]
push esi
cmp eax, 2
jne 0x10033664
call edx
mov eax, dword [ebx]
xor ebp, ebp
add esp, 0x18
cmp dword [eax], ebp
jbe 0x10033694
mov edi, dword [esp + 0x34]
add esi, 2
nop word [eax + eax]
movzx eax, byte [esi - 2]
lea esi, [esi + 4]
movzx edx, byte [edi + ebp]
not al
movzx ecx, al
inc ebp
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 6], al
movzx eax, byte [esi - 5]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 5], al
movzx eax, byte [esi - 4]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 4], al
mov eax, dword [ebx]
cmp ebp, dword [eax]
jb 0x10033600
jmp 0x10033690
call edx
add esp, 0x18
jmp 0x10033694
xor edx, edx
cmp dword [esi], edx
jbe 0x10033694
mov edi, dword [esp + 0x28]
inc ecx
mov al, byte [edx + edi]
lea ecx, [ecx + 4]
mov byte [ecx - 3], al
inc edx
mov byte [ecx - 4], al
mov byte [ecx - 5], al
mov byte [ecx - 2], 0xff
mov eax, dword [ebx]
cmp edx, dword [eax]
jb 0x10033676
mov edi, dword [esp + 0x10]
mov esi, dword [ebx]
mov ecx, dword [esp + 0x24]
mov ebp, dword [esp + 0x1c]
inc ecx
mov dword [esp + 0x24], ecx
cmp ecx, dword [esi + 4]
jb 0x100333c0
mov edx, dword [esi + 8]
mov ecx, ebx
push 0
call fcn.10031ca0
mov eax, dword [ebx]
add esp, 4
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x4c]
mov eax, dword [eax]
mov dword [ecx], eax
mov eax, dword [ebx]
mov ecx, dword [esp + 0x48]
mov eax, dword [eax + 4]
mov dword [ecx], eax
test edx, edx
je 0x100336ec
mov eax, dword [ebx]
xor ecx, ecx
cmp dword [eax + 8], 3
setge cl
lea ecx, [ecx*2 + 1]
mov dword [edx], ecx
mov eax, ebp
jmp 0x1003371c
mov edx, dword [ebx]
mov edx, dword [edx + 8]
push 0
mov ecx, ebx
call fcn.10031ca0
mov ecx, dword [0x102c23c0]
mov eax, dword fs:[0x2c]
mov eax, dword [eax + ecx*4]
mov dword [eax + 0xc], str.outofmem
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0xd4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.100e8209
add esp, 0xc8
ret