Function at 0x10051c20
Capabilities:
Encrypt data using rc4 ksa
Read file on windows

Disassembly:
sub esp, 0x108
mov eax, dword [0x10106040]
xor eax, esp
mov dword [esp + 0x104], eax
mov eax, dword [esp + 0x10c]
push ebx
mov ebx, ecx
mov dword [esp + 0x34], eax
push ebp
push esi
push edi
mov eax, dword [ebx + 0x10]
mov dword [esp + 0x1c], edx
test eax, eax
je 0x10051c67
push eax
push 0x80
lea eax, [esp + 0x50]
push 1
push eax
call fcn.100b63fb
add esp, 0x10
jmp 0x10051c7d
mov eax, dword [ebx + 0x14]
lea edi, [esp + 0x48]
mov esi, eax
mov ecx, 0x20
sub eax, 0xffffff80
rep movsd dword es:[edi], dword [esi]
mov dword [ebx + 0x14], eax
cmp dword [esp + 0x48], 0x20534444
jne 0x10052238
cmp dword [esp + 0x4c], 0x7c
jne 0x10052238
mov eax, dword [esp + 0x50]
and eax, 0x1007
cmp eax, 0x1007
jne 0x10052238
cmp dword [esp + 0x94], 0x20
jne 0x10052238
mov edx, dword [esp + 0x98]
test dl, 0x44
je 0x10052238
mov eax, dword [esp + 0xb4]
test eax, 0x1000
je 0x10052238
mov edi, dword [esp + 0x58]
mov esi, edx
mov ebp, dword [esp + 0x54]
and edx, 1
shr esi, 2
and esi, 1
mov dword [ebx], edi
mov dword [ebx + 4], ebp
mov dword [ebx + 8], 4
test eax, 0x400000
je 0x10051d0f
cmp dword [esp + 0x64], 1
mov dword [esp + 0x30], 1
ja 0x10051d17
mov dword [esp + 0x30], 0
mov eax, dword [esp + 0xb8]
xor ecx, ecx
cmp edi, ebp
sete cl
shr eax, 9
and ecx, eax
lea eax, [ecx*4 + 1]
add eax, ecx
lea ecx, [edi + 3]
mov dword [esp + 0x18], eax
lea eax, [ebp + 3]
shr ecx, 2
shr eax, 2
imul eax, ecx
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x1c]
mov dword [eax], edi
mov eax, dword [ebx + 4]
mov dword [ecx], eax
xor ecx, ecx
mov eax, dword [ebx + 8]
mov dword [ecx], eax
test esi, esi
je 0x100520b1
mov ebp, dword [esp + 0x9c]
shr ebp, 0x18
mov dword [esp + 0x2c], ebp
cmp ebp, 0x31
jb 0x10052238
cmp ebp, 0x35
ja 0x10052238
mov edi, dword [ebx + 4]
imul edi, dword [ebx]
imul edi, dword [esp + 0x18]
shl edi, 2
push edi
mov dword [esp + 0x38], edi
call fcn.100bb798
mov esi, eax
add esp, 4
xor eax, eax
mov dword [esp + 0x14], esi
mov dword [esp + 0x20], eax
cmp dword [esp + 0x18], eax
jbe 0x100521de
nop dword [eax]
xor ecx, ecx
mov dword [esp + 0x1c], ecx
cmp dword [esp + 0x24], ecx
jle 0x10052020
mov eax, ecx
mov ebp, 4
cdq
idiv dword [esp + 0x44]
mov eax, ecx
mov dword [esp + 0x28], ebp
mov edi, edx
mov ecx, dword [esp + 0x2c]
cdq
idiv dword [esp + 0x44]
shl edi, 2
mov esi, eax
shl esi, 2
mov dword [esp + 0x38], esi
cmp ecx, 0x31
jne 0x10051e66
mov ecx, dword [ebx + 0x10]
test ecx, ecx
je 0x10051e32
push ecx
push 8
lea eax, [esp + 0xd0]
push 1
push eax
call fcn.100b63fb
add esp, 0x10
lea edx, [esp + 0xc8]
lea ecx, [esp + 0xd0]
call fcn.10051610
jmp 0x10051f82
mov edx, dword [ebx + 0x14]
mov eax, dword [edx]
mov ecx, dword [edx + 4]
mov dword [esp + 0xc8], eax
lea eax, [edx + 8]
mov dword [esp + 0xcc], ecx
lea edx, [esp + 0xc8]
lea ecx, [esp + 0xd0]
mov dword [ebx + 0x14], eax
call fcn.10051610
jmp 0x10051f82
mov eax, dword [ebx + 0x10]
cmp ecx, 0x34
jae 0x10051eeb
test eax, eax
je 0x10051e89
push eax
push 8
lea eax, [esp + 0xd0]
push 1
push eax
call fcn.100b63fb
add esp, 0x10
jmp 0x10051ea5
mov edx, dword [ebx + 0x14]
mov eax, dword [edx]
mov ecx, dword [edx + 4]
mov dword [esp + 0xc8], eax
lea eax, [edx + 8]
mov dword [esp + 0xcc], ecx
mov dword [ebx + 0x14], eax
xor edx, edx
lea esi, [esp + 0xd3]
nop
mov eax, edx
movzx ecx, dl
sar eax, 3
and ecx, 7
movzx eax, byte [esp + eax + 0xc8]
shr eax, cl
and eax, 0xf
imul eax, eax, 0xff
add eax, 8
mov ecx, eax
shr ecx, 4
add ecx, eax
shr ecx, 4
mov byte [esi + edx], cl
add edx, ebp
cmp edx, 0x3d
jl 0x10051eb0
mov esi, dword [esp + 0x38]
jmp 0x10051f35
test eax, eax
je 0x10051f06
push eax
push 8
lea eax, [esp + 0xd0]
push 1
push eax
call fcn.100b63fb
add esp, 0x10
jmp 0x10051f22
mov edx, dword [ebx + 0x14]
mov eax, dword [edx]
mov ecx, dword [edx + 4]
mov dword [esp + 0xc8], eax
lea eax, [edx + 8]
mov dword [esp + 0xcc], ecx
mov dword [ebx + 0x14], eax
lea edx, [esp + 0xc8]
lea ecx, [esp + 0xd0]
call fcn.100518a0
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x10051f53
push eax
push 8
lea eax, [esp + 0xd0]
push 1
push eax
call fcn.100b63fb
add esp, 0x10
jmp 0x10051f6f
mov edx, dword [ebx + 0x14]
mov eax, dword [edx]
mov ecx, dword [edx + 4]
mov dword [esp + 0xc8], eax
lea eax, [edx + 8]
mov dword [ebx + 0x14], eax
mov dword [esp + 0xcc], ecx
lea edx, [esp + 0xc8]
lea ecx, [esp + 0xd0]
call fcn.10051a30
mov ecx, dword [ebx]
lea eax, [edi + 4]
cmp eax, ecx
jbe 0x10051f8f
mov ebp, ecx
sub ebp, edi
mov edx, dword [ebx + 4]
lea eax, [esi + 4]
cmp eax, edx
jbe 0x10051fa5
sub edx, esi
mov dword [esp + 0x28], edx
test edx, edx
jle 0x10052005
jmp 0x10051fa9
mov edx, dword [esp + 0x28]
lea eax, [ecx*4]
shl ebp, 2
mov dword [esp + 0x3c], eax
lea esi, [esp + 0xd0]
mov eax, ecx
imul eax, dword [esp + 0x20]
add eax, dword [esp + 0x38]
imul eax, ecx
mov ecx, dword [esp + 0x14]
add eax, edi
lea edi, [ecx + eax*4]
mov eax, dword [esp + 0x3c]
nop dword [eax]
test ebp, ebp
jle 0x10051ff7
push ebp
push esi
push edi
call fcn.100ab8d0
mov edx, dword [esp + 0x34]
add esp, 0xc
mov eax, dword [esp + 0x3c]
add edi, eax
add esi, 0x10
sub edx, 1
mov dword [esp + 0x28], edx
jne 0x10051fe0
mov ecx, dword [esp + 0x1c]
inc ecx
mov dword [esp + 0x1c], ecx
cmp ecx, dword [esp + 0x24]
jl 0x10051dd0
mov ebp, dword [esp + 0x2c]
mov eax, dword [esp + 0x20]
cmp dword [esp + 0x30], 0
je 0x10052099
xor eax, eax
cmp ebp, 0x31
setne al
cmp dword [esp + 0x64], 1
lea eax, [eax*8 + 8]
mov dword [esp + 0x1c], eax
jbe 0x10052095
mov esi, 3
mov edi, eax
lea ebp, [esi - 2]
nop dword [eax + eax]
mov edx, dword [ebx]
mov ecx, esi
mov eax, dword [ebx + 4]
shr edx, cl
shr eax, cl
cmp edx, 1
mov ecx, edi
cmovl edx, ebp
cmp eax, 1
cmovl eax, ebp
imul ecx, eax
mov eax, dword [ebx + 0x10]
imul ecx, edx
test eax, eax
je 0x10052084
push 1
push ecx
push eax
call fcn.100b033b
add esp, 0xc
jmp 0x10052087
add dword [ebx + 0x14], ecx
inc esi
lea eax, [esi - 2]
cmp eax, dword [esp + 0x64]
jb 0x10052050
mov ebp, dword [esp + 0x2c]
mov eax, dword [esp + 0x20]
inc eax
mov dword [esp + 0x20], eax
cmp eax, dword [esp + 0x18]
jl 0x10051dc0
mov edi, dword [esp + 0x34]
jmp 0x100521da
mov dword [ebx + 8], 3
mov eax, 3
test edx, edx
je 0x100520cd
mov dword [ebx + 8], 4
mov eax, 4
mov esi, dword [esp + 0x18]
mov dword [ecx], eax
mov edi, dword [ebx + 4]
imul edi, dword [ebx]
imul edi, dword [ebx + 8]
imul edi, esi
push edi
mov dword [esp + 0x38], edi
call fcn.100bb798
xor ecx, ecx
add esp, 4
mov dword [esp + 0x24], ecx
mov ebp, eax
mov dword [esp + 0x14], ebp
test esi, esi
je 0x100521bd
mov esi, dword [ebx + 4]
imul esi, dword [ebx]
imul esi, dword [ebx + 8]
mov eax, esi
imul eax, ecx
mov ecx, dword [ebx + 0x10]
add eax, ebp
test ecx, ecx
je 0x10052128
push ecx
push esi
push 1
push eax
call fcn.100b63fb
add esp, 0x10
jmp 0x10052138
push esi
push dword [ebx + 0x14]
push eax
call fcn.100ab8d0
add esp, 0xc
add dword [ebx + 0x14], esi
cmp dword [esp + 0x30], 0
je 0x100521a6
mov ebp, dword [esp + 0x64]
mov edi, 1
cmp ebp, edi
jbe 0x100521a2
lea eax, [ebx + 0x14]
nop
mov esi, dword [ebx]
mov ecx, edi
mov edx, dword [ebx + 4]
shr esi, cl
shr edx, cl
lea ecx, [ebx + 0x14]
cmp esi, 1
jge 0x1005216a
mov esi, 1
mov eax, ecx
cmp edx, 1
jge 0x10052176
mov edx, 1
mov eax, ecx
mov ecx, dword [ebx + 8]
imul ecx, edx
mov edx, dword [ebx + 0x10]
imul ecx, esi
test edx, edx
je 0x1005219b
push 1
push ecx
push edx
call fcn.100b033b
mov ebp, dword [esp + 0x70]
lea eax, [ebx + 0x14]
add esp, 0xc
jmp 0x1005219d
add dword [eax], ecx
inc edi
cmp edi, ebp
jb 0x10052150
mov ebp, dword [esp + 0x14]
mov ecx, dword [esp + 0x24]
inc ecx
mov dword [esp + 0x24], ecx
cmp ecx, dword [esp + 0x18]
jl 0x10052101
mov edi, dword [esp + 0x34]
xor edx, edx
test edi, edi
jle 0x100521da
mov esi, dword [ebx + 8]
mov cl, byte [edx + ebp]
mov al, byte [edx + ebp + 2]
mov byte [edx + ebp], al
mov byte [edx + ebp + 2], cl
add edx, esi
cmp edx, edi
jl 0x100521c6
mov esi, dword [esp + 0x14]
mov eax, dword [ebx + 4]
imul eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x40]
mov dword [ebx + 4], eax
mov dword [ecx], eax
xor eax, eax
mov edx, dword [ebx + 8]
cmp edx, 4
jne 0x1005221a
mov ecx, 3
cmp edi, ecx
jle 0x10052234
test eax, eax
jne 0x10052234
cmp byte [ecx + esi], 0xff
sbb eax, eax
add ecx, 4
neg eax
cmp ecx, edi
jl 0x10052202
cmp edx, 4
je 0x10052234
push dword [ebx + 4]
mov ecx, esi
push dword [ebx]
push 4
call fcn.1004a790
add esp, 0xc
mov esi, eax
mov eax, dword [ebx + 8]
xor ecx, ecx
mov dword [ecx], eax
mov eax, esi
jmp 0x1005223a
xor eax, eax
mov ecx, dword [esp + 0x114]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.100a9d10
add esp, 0x108
ret