Function at 0x100749fa
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x2c], 8
push edi
mov eax, dword [esi + 0x24]
mov edx, dword [esi + 0x1c]
mov ecx, dword [esi + 0x28]
mov edi, dword [esi + 0x2c]
mov ebx, dword [esi + 0x20]
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 0x3c]
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 0x38]
mov dword [ebp - 0xc], eax
mov eax, edx
and eax, 0x7fff
mov dword [ebp - 0x14], edx
mov dword [ebp - 4], ecx
mov dword [ebp - 8], edi
mov dword [ebp - 0x10], eax
mov edx, dword [esi + 0x88]
test edx, edx
jne 0x10074a5b
cmp dword [esi + 0x80], edx
je 0x10074e57
test ebx, ebx
je 0x10074e57
mov edi, dword [ebp - 0x14]
mov eax, 0x1000
add edi, ebx
sub eax, ebx
and edi, 0x7fff
mov ecx, edx
cmp edx, eax
cmovae ecx, eax
sub edx, ecx
mov dword [ebp - 0x24], ecx
add ebx, ecx
mov dword [esi + 0x88], edx
mov dword [ebp - 0x28], ebx
test ecx, ecx
je 0x10074af5
mov ebx, ecx
mov eax, 0x8000
mov ecx, ebx
sub eax, edi
cmp eax, ebx
cmovb ecx, eax
lea eax, [esi + 0x90]
push ecx
push dword [esi + 0x84]
add eax, edi
mov dword [ebp - 0x24], ecx
push eax
call sub.msvcrt.dll_memcpy
mov eax, 0x101
add esp, 0xc
cmp edi, eax
jae 0x10074add
sub eax, edi
cmp dword [ebp - 0x24], eax
cmovb eax, dword [ebp - 0x24]
push eax
push dword [esi + 0x84]
lea eax, [esi + 0x8090]
add eax, edi
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov eax, dword [ebp - 0x24]
add edi, eax
add dword [esi + 0x84], eax
and edi, 0x7fff
sub ebx, eax
jne 0x10074a8a
mov ebx, dword [ebp - 0x28]
mov edi, dword [ebp - 0x18]
mov eax, 0x8000
sub eax, ebx
cmp eax, edi
cmovb edi, eax
cmp dword [esi + 0x80], 0
mov dword [ebp - 0x18], edi
jne 0x10074b1c
cmp ebx, 0x1000
jb 0x10074e51
lea eax, [esi + 0x1926a]
mov dword [ebp - 0x34], eax
cmp ebx, 4
jb 0x10074d7e
jmp 0x10074b33
mov edi, dword [ebp - 0x18]
xor eax, eax
inc eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x10]
mov edx, dword [eax + esi + 0x90]
and edx, 0xffffff
mov ecx, edx
mov dword [ebp - 0x30], edx
shr ecx, 0x11
xor ecx, edx
and ecx, 0xfff
movzx eax, word [esi + ecx*2 + 0x29272]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x14]
movzx eax, ax
mov word [esi + ecx*2 + 0x29272], ax
mov ecx, dword [ebp - 0x20]
sub eax, ecx
movzx eax, ax
mov dword [ebp - 0x20], eax
cmp eax, edi
ja 0x10074caf
and ecx, 0x7fff
lea edi, [ecx + 0x90]
add edi, esi
mov eax, dword [edi]
and eax, 0xffffff
cmp eax, edx
jne 0x10074caf
mov ecx, dword [ebp - 0x10]
add ecx, 0x90
push 0x20
add ecx, esi
pop edx
add ecx, 2
add edi, 2
mov ax, word [ecx]
cmp ax, word [edi]
jne 0x10074bed
add ecx, 2
add edi, 2
mov ax, word [ecx]
cmp ax, word [edi]
jne 0x10074bed
add ecx, 2
add edi, 2
mov ax, word [ecx]
cmp ax, word [edi]
jne 0x10074bed
add ecx, 2
add edi, 2
mov ax, word [ecx]
cmp ax, word [edi]
jne 0x10074bed
sub edx, 1
jne 0x10074bb0
mov eax, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x28]
add eax, 0x90
mov dword [ebp - 0x24], edx
add eax, esi
mov edx, ecx
sub edx, eax
mov al, byte [ecx]
xor ecx, ecx
sar edx, 1
cmp al, byte [edi]
mov edi, dword [ebp - 0x20]
sete cl
cmp dword [ebp - 0x24], 0
lea eax, [ecx + edx*2]
jne 0x10074c23
mov eax, edi
neg eax
sbb eax, eax
and eax, 0x102
cmp eax, 3
jb 0x10074c9c
jne 0x10074c32
cmp edi, 0x2000
jae 0x10074c9c
mov ecx, dword [ebp - 4]
cmp eax, ebx
dec edi
mov edx, ebx
cmovb edx, eax
mov dword [ebp - 0x20], edi
push 3
mov dword [ecx + 1], edi
mov edi, dword [ebp - 8]
lea eax, [edx - 3]
mov dword [ebp - 0x24], edx
mov byte [ecx], al
mov al, byte [edi]
shr al, 1
or al, 0x80
mov byte [edi], al
mov eax, dword [ebp - 0x20]
and eax, 0x1ff
movzx ecx, byte [eax + 0x1009ec58]
mov eax, dword [ebp - 0x20]
shr eax, 8
cmp dword [ebp - 0x20], 0x200
movzx eax, byte [eax + 0x1009e658]
cmovb eax, ecx
mov ecx, dword [ebp - 4]
inc word [esi + eax*2 + 0x83d2]
movzx eax, word [edx*2 + 0x1009ea52]
inc word [esi + eax*2 + 0x8192]
pop eax
jmp 0x10074cc7
mov ecx, dword [ebp - 4]
xor eax, eax
inc eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x30]
mov byte [ecx], al
movzx eax, al
jmp 0x10074cb7
mov ecx, dword [ebp - 4]
movzx eax, dl
mov byte [ecx], dl
mov edi, dword [ebp - 8]
shr byte [edi], 1
inc word [esi + eax*2 + 0x8192]
xor eax, eax
inc eax
lea edx, [eax + ecx]
mov eax, dword [ebp - 0xc]
sub eax, 1
mov ecx, eax
cmove eax, dword [ebp - 0x2c]
test ecx, ecx
mov dword [ebp - 0xc], eax
mov eax, edx
cmovne eax, edi
mov edi, 0x8000
mov dword [ebp - 8], eax
lea eax, [edx + 1]
mov ecx, eax
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x18]
cmovne ecx, edx
mov edx, dword [ebp - 0x24]
add eax, edx
add dword [ebp - 0x1c], edx
add dword [ebp - 0x14], edx
cmp eax, edi
mov dword [ebp - 4], ecx
cmovb edi, eax
mov eax, dword [ebp - 0x10]
add eax, edx
mov dword [ebp - 0x18], edi
mov edi, dword [ebp - 8]
and eax, 0x7fff
mov dword [ebp - 0x10], eax
sub ebx, edx
lea eax, [esi + 0x1926a]
mov dword [ebp - 0x28], ebx
cmp ecx, eax
jbe 0x10074d75
mov eax, dword [ebp - 0x14]
xor edx, edx
mov dword [esi + 0x1c], eax
mov eax, dword [ebp - 0x18]
mov dword [esi + 0x24], eax
mov eax, dword [ebp - 0x1c]
mov dword [esi + 0x3c], eax
mov eax, dword [ebp - 0xc]
mov dword [esi + 0x28], ecx
mov ecx, esi
mov dword [esi + 0x20], ebx
mov dword [esi + 0x2c], edi
mov dword [esi + 0x38], eax
call fcn.1007451b
test eax, eax
jne 0x10074e7d
mov eax, dword [esi + 0x3c]
mov edi, dword [esi + 0x2c]
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 0x28]
mov dword [ebp - 4], eax
mov eax, dword [esi + 0x38]
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], eax
cmp ebx, 4
jae 0x10074b30
mov edi, dword [ebp - 8]
mov ecx, dword [ebp - 4]
test ebx, ebx
je 0x10074a3d
mov eax, dword [ebp - 0x10]
mov dl, byte [eax + esi + 0x90]
lea eax, [ecx + 1]
inc dword [ebp - 0x1c]
mov byte [ecx], dl
shr byte [edi], 1
mov ecx, dword [ebp - 0xc]
sub ecx, 1
mov edi, ecx
mov dword [ebp - 0xc], ecx
cmove edi, dword [ebp - 0x2c]
test ecx, ecx
mov dword [ebp - 0xc], edi
cmovne eax, dword [ebp - 8]
mov edi, eax
xor eax, eax
test ecx, ecx
mov dword [ebp - 8], edi
mov ecx, dword [ebp - 4]
sete al
inc eax
add ecx, eax
movzx eax, dl
mov edx, 0x8000
mov dword [ebp - 4], ecx
inc word [esi + eax*2 + 0x8192]
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
inc eax
cmp eax, edx
cmovb edx, eax
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x18], edx
and eax, 0x7fff
dec ebx
mov dword [ebp - 0x10], eax
cmp ecx, dword [ebp - 0x34]
jbe 0x10074e44
mov eax, dword [ebp - 0x14]
mov dword [esi + 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov dword [esi + 0x24], edx
xor edx, edx
mov dword [esi + 0x3c], eax
mov eax, dword [ebp - 0xc]
mov dword [esi + 0x28], ecx
mov ecx, esi
mov dword [esi + 0x20], ebx
mov dword [esi + 0x2c], edi
mov dword [esi + 0x38], eax
call fcn.1007451b
test eax, eax
jne 0x10074e7d
mov eax, dword [esi + 0x3c]
mov ecx, dword [esi + 0x28]
mov edi, dword [esi + 0x2c]
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 0x38]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], ecx
mov dword [ebp - 8], edi
test ebx, ebx
jne 0x10074d8f
jmp 0x10074a3d
mov edi, dword [ebp - 8]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x14]
mov dword [esi + 0x1c], eax
mov eax, dword [ebp - 0x18]
mov dword [esi + 0x24], eax
mov eax, dword [ebp - 0x1c]
mov dword [esi + 0x3c], eax
mov eax, dword [ebp - 0xc]
mov dword [esi + 0x38], eax
xor eax, eax
mov dword [esi + 0x20], ebx
inc eax
mov dword [esi + 0x28], ecx
mov dword [esi + 0x2c], edi
jmp 0x10074e82
not eax
shr eax, 0x1f
pop edi
pop esi
pop ebx
leave
ret