Function at 0x10057c80
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd0
mov eax, dword [0x1026500c]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, ecx
mov dword [ebp - 0xc8], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xcc], eax
push esi
mov eax, dword [ebx]
push edi
mov dword [ebp - 0xc4], edx
mov dword [ebp - 0xc0], ebx
mov dword [eax + 8], 0
call fcn.10057050
mov esi, dword [ebx]
test eax, eax
jne 0x10057cda
mov edx, dword [esi + 8]
mov ecx, ebx
push eax
call fcn.100565b0
jmp 0x10058305
mov esi, dword [esi + 8]
mov dword [ebp - 0x94], esi
cmp esi, 3
jne 0x10057d0e
cmp dword [ebx + 0x47ec], esi
je 0x10057d02
cmp dword [ebx + 0x47e8], 0
jne 0x10057d0e
cmp dword [ebx + 0x47e4], 0
jne 0x10057d0e
mov dword [ebp - 0xa8], 1
jmp 0x10057d32
test esi, esi
jg 0x10057d22
push 0
mov edx, esi
mov ecx, ebx
call fcn.100565b0
jmp 0x10058305
mov dword [ebp - 0xa8], 0
mov dword [ebp - 0x94], esi
mov ecx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
lea edi, [ebp - 0x80]
xorps xmm0, xmm0
mov dword [ebp - 0x98], edi
lea edx, [ebx + 0x46a0]
mov dword [ebp - 0xa4], 0
movups xmmword [ebp - 0xb8], xmm0
mov dword [ebp - 0xa0], edx
mov dword [ebp - 0x9c], ecx
mov eax, dword [ebx]
mov eax, dword [eax]
add eax, 3
push eax
call ecx
mov ecx, dword [ebp - 0xa0]
add esp, 4
mov dword [ecx + 0x34], eax
test eax, eax
je 0x100582de
mov eax, dword [ebx + 0x4684]
cdq
idiv dword [ecx]
mov dword [edi], eax
mov dword [ebp - 0x90], eax
mov eax, dword [ebx + 0x4688]
cdq
idiv dword [ecx + 4]
mov edx, dword [ebp - 0x98]
mov edi, eax
mov eax, dword [ebp - 0x90]
mov ecx, edi
dec eax
sar ecx, 1
mov dword [edx + 0xc], ecx
mov ecx, dword [ebx]
mov dword [edx + 4], edi
xor edx, edx
mov ecx, dword [ecx]
add eax, ecx
div dword [ebp - 0x90]
mov ecx, dword [ebp - 0x98]
mov edx, dword [ebp - 0xa0]
mov dword [ecx + 8], eax
mov eax, dword [edx + 0x28]
mov dword [ecx - 4], eax
mov dword [ecx - 8], eax
mov eax, dword [ebp - 0x90]
mov dword [ecx + 0x10], 0
cmp eax, 1
jne 0x10057e08
cmp edi, eax
jne 0x10057dfc
mov eax, 0x10057310
jmp 0x10057e2b
cmp edi, 2
jne 0x10057e26
mov eax, 0x10057320
jmp 0x10057e2b
cmp eax, 2
jne 0x10057e26
cmp edi, 1
jne 0x10057e19
mov eax, 0x10057550
jmp 0x10057e2b
cmp edi, 2
jne 0x10057e26
mov eax, dword [ebx + 0x4814]
jmp 0x10057e2b
mov eax, 0x10057870
mov dword [ecx - 0xc], eax
add edx, 0x48
mov eax, dword [ebp - 0xa4]
add ecx, 0x20
inc eax
mov dword [ebp - 0x98], ecx
mov dword [ebp - 0xa4], eax
mov edi, ecx
mov ecx, dword [ebp - 0x9c]
mov dword [ebp - 0xa0], edx
cmp eax, esi
jl 0x10057d67
mov eax, dword [ebx]
mov ecx, dword [eax]
mov edi, dword [eax + 4]
test ecx, ecx
js 0x100582d7
je 0x10057e8e
mov eax, 0x7fffffff
cdq
idiv ecx
cmp eax, 4
jl 0x100582d7
lea eax, [ecx*4]
test eax, eax
js 0x100582d7
test edi, edi
js 0x100582d7
je 0x10057eaf
mov eax, 0x7fffffff
cdq
idiv edi
lea edx, [ecx*4]
cmp edx, eax
jg 0x100582d7
imul edi, ecx
shl edi, 2
lea eax, [edi + 1]
push eax
call dword [ebp - 0x9c]
mov ecx, dword [ebx]
mov edi, eax
add esp, 4
test edi, edi
je 0x100582d9
xor edx, edx
mov dword [ebp - 0x90], edx
cmp dword [ecx + 4], edx
jbe 0x1005827e
mov dword [ebp - 0x98], edi
nop word [eax + eax]
mov eax, dword [ecx]
imul eax, edx
mov dword [ebp - 0x9c], 0
lea edi, [edi + eax*4]
mov dword [ebp - 0xa4], edi
test esi, esi
jle 0x10057ff2
lea edi, [ebx + 0x46bc]
mov ebx, dword [ebp - 0x94]
lea esi, [ebp - 0x74]
nop
mov eax, dword [ebp - 0x98]
mov edx, ebx
mov ecx, dword [ebp - 0xa8]
mov dword [ebp - 0xa0], eax
mov dword [ebp - 0x98], eax
mov eax, dword [esi - 8]
sar eax, 1
mov dword [ebp - 0x94], ecx
mov dword [ebp - 0xa8], ecx
cmp dword [esi], eax
jl 0x10057f71
mov ebx, dword [ebp - 0xa0]
mov eax, dword [esi - 0x10]
mov ecx, dword [esi - 0x14]
mov dword [ebp - 0x98], ebx
mov ebx, dword [ebp - 0x94]
mov dword [ebp - 0xa8], ebx
mov ebx, edx
jmp 0x10057f77
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 ecx, dword [ebp - 0x9c]
add esp, 0x14
mov dword [ebp + ecx*4 - 0xb8], eax
mov eax, dword [esi]
inc eax
mov dword [esi], eax
cmp eax, dword [esi - 8]
jl 0x10057fbd
inc dword [esi + 4]
mov eax, dword [esi + 4]
mov edx, dword [esi - 0x10]
mov dword [esi], 0
mov dword [esi - 0x14], edx
cmp eax, dword [edi]
jge 0x10057fbd
mov eax, dword [edi + 4]
add eax, edx
mov dword [esi - 0x10], eax
inc ecx
add esi, 0x20
add edi, 0x48
mov dword [ebp - 0x9c], ecx
cmp ecx, ebx
jl 0x10057f20
mov edi, dword [ebp - 0xa4]
mov edx, dword [ebp - 0x90]
mov dword [ebp - 0x94], ebx
mov ebx, dword [ebp - 0xc0]
mov esi, dword [ebp - 0x94]
mov ecx, dword [ebx]
mov eax, dword [ecx + 8]
cmp eax, 3
jne 0x1005808f
cmp dword [ebp - 0xa8], 0
je 0x10058068
xor edi, edi
cmp dword [ecx], edi
jbe 0x10058266
mov ecx, dword [ebp - 0xa4]
mov edx, dword [ebp - 0xb4]
add ecx, 2
mov esi, dword [ebp - 0xb8]
mov eax, dword [ebp - 0xb0]
sub esi, edx
sub eax, edx
mov dword [ebp - 0x9c], 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 edi
mov byte [ecx - 5], al
mov eax, dword [ebp - 0x9c]
movzx eax, byte [eax + edx - 1]
mov byte [ecx - 4], al
mov byte [ecx - 3], 0xff
mov eax, dword [ebx]
cmp edi, dword [eax]
jb 0x10058036
jmp 0x1005825a
mov eax, dword [ebx + 0x4810]
push 4
push dword [ecx]
push dword [ebp - 0xb0]
push dword [ebp - 0xb4]
push dword [ebp - 0xb8]
push edi
call eax
add esp, 0x18
jmp 0x10058260
cmp eax, 4
jne 0x10058231
mov eax, dword [ebx + 0x47e8]
test eax, eax
jne 0x1005816e
mov dword [ebp - 0x9c], eax
cmp dword [ecx], eax
jbe 0x10058266
mov edx, dword [ebp - 0xac]
add edi, 2
mov ecx, dword [ebp - 0xb4]
mov esi, edx
mov eax, dword [ebp - 0xb8]
sub ecx, edx
mov dword [ebp - 0xa4], ecx
sub eax, edx
mov ecx, dword [ebp - 0xb0]
sub ecx, edx
mov dword [ebp - 0xbc], eax
mov dword [ebp - 0xa0], ecx
nop dword [eax]
movzx ecx, byte [eax + esi]
lea edi, [edi + 4]
movzx edx, byte [esi]
lea esi, [esi + 1]
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [edi - 6], al
mov eax, dword [ebp - 0xa4]
movzx ecx, byte [eax + esi - 1]
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [edi - 5], al
mov eax, dword [ebp - 0xa0]
movzx ecx, byte [eax + esi - 1]
imul ecx, edx
mov byte [edi - 3], 0xff
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
mov ecx, dword [ebp - 0x9c]
shr eax, 8
inc ecx
mov byte [edi - 4], al
mov eax, dword [ebx]
mov dword [ebp - 0x9c], ecx
cmp ecx, dword [eax]
mov eax, dword [ebp - 0xbc]
jb 0x100580f0
jmp 0x1005825a
mov ecx, dword [ecx]
mov edx, dword [ebx + 0x4810]
push 4
push ecx
push dword [ebp - 0xb0]
push dword [ebp - 0xb4]
push dword [ebp - 0xb8]
push edi
cmp eax, 2
jne 0x1005822a
call edx
mov eax, dword [ebx]
add esp, 0x18
mov dword [ebp - 0xbc], 0
cmp dword [eax], 0
jbe 0x10058260
mov esi, dword [ebp - 0xbc]
add edi, 2
nop dword [eax + eax]
mov eax, dword [ebp - 0xac]
lea edi, [edi + 4]
movzx edx, byte [esi + eax]
inc esi
movzx eax, byte [edi - 6]
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 [edi - 6], al
movzx eax, byte [edi - 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 [edi - 5], al
movzx eax, byte [edi - 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 [edi - 4], al
mov eax, dword [ebx]
cmp esi, dword [eax]
jb 0x100581c0
jmp 0x1005825a
call edx
add esp, 0x18
jmp 0x10058260
xor edx, edx
cmp dword [ecx], edx
jbe 0x10058260
mov esi, dword [ebp - 0xb8]
lea ecx, [edi + 1]
mov al, byte [edx + esi]
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 0x10058240
mov esi, dword [ebp - 0x94]
mov edx, dword [ebp - 0x90]
mov ecx, dword [ebx]
inc edx
mov edi, dword [ebp - 0x98]
mov dword [ebp - 0x90], edx
cmp edx, dword [ecx + 4]
jb 0x10057ef0
mov edx, dword [ecx + 8]
mov ecx, ebx
push 0
call fcn.100565b0
mov eax, dword [ebx]
add esp, 4
mov ecx, dword [ebp - 0xc4]
mov eax, dword [eax]
mov dword [ecx], eax
mov eax, dword [ebx]
mov ecx, dword [ebp - 0xc8]
mov eax, dword [eax + 4]
mov dword [ecx], eax
mov eax, dword [ebp - 0xcc]
test eax, eax
je 0x100582c4
mov ecx, dword [ebx]
xor edx, edx
cmp dword [ecx + 8], 3
setge dl
lea edx, [edx*2 + 1]
mov dword [eax], edx
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.10077e95
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebx]
mov edx, dword [ecx + 8]
jmp 0x100582e3
mov edx, dword [ebx]
mov edx, dword [edx + 8]
push 0
mov ecx, ebx
call fcn.100565b0
mov ecx, dword [0x10265504]
mov eax, dword fs:[0x2c]
mov eax, dword [eax + ecx*4]
mov dword [eax + 0xc], str.outofmem
mov ecx, dword [ebp - 8]
add esp, 4
xor ecx, ebp
xor eax, eax
pop edi
pop esi
pop ebx
call fcn.10077e95
mov esp, ebp
pop ebp
ret