Function at 0x10153110
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0xc0
push ebx
push ebp
push esi
push edi
push 0x400
call fcn.101d175d
mov ebp, dword [esp + 0xe4]
mov dword [esp + 0x20], eax
add esp, 4
xor esi, esi
mov cl, byte [ebp + 0x7c]
mov eax, 1
cmp cl, 2
mov dword [esp + 0x4c], esi
mov dword [esp + 0x14], eax
mov dword [esp + 0x48], esi
mov dword [esp + 0x38], eax
mov byte [ebp + 0x11c], al
mov dword [esp + 0x20], esi
jb 0x1015315f
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0xd4]
push eax
call sym.ITEuDllvMgr.dll_VDR_CheckSYSReady
add esp, 4
test eax, eax
jne 0x10153177
mov dword [esp + 0x14], esi
mov dl, byte [ebp + 0xf6]
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x50]
rep stosd dword es:[edi], eax
lea esi, [ebp + 0x113]
mov byte [esp + 0x13], dl
xor al, al
lea edi, [esp + 0x50]
mov ecx, esi
cmp al, 0x20
jae 0x101531a8
mov bl, byte [ecx - 0x87]
jmp 0x101531aa
mov bl, byte [ecx]
inc al
mov byte [edi], bl
inc ecx
inc edi
cmp al, 0x40
jb 0x1015319c
test dl, dl
jne 0x10153272
cmp byte [ebp + 0xf0], 1
jne 0x101531e2
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.101d1786
add esp, 4
mov eax, 0x12
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc0
ret
mov al, byte [ebp + 0x2b]
test al, al
mov byte [esp + 0x13], al
jne 0x101531f2
mov byte [esp + 0x13], 0x20
mov bl, byte [ebp + 8]
xor cl, cl
and bl, 0xc0
lea edx, [esp + 0x50]
mov edi, esi
cmp cl, 0x20
jae 0x1015320d
mov al, byte [edi - 0x87]
jmp 0x1015320f
mov al, byte [edi]
cmp bl, 0x40
mov byte [edx], al
jne 0x1015322b
mov al, byte [ebp + 0x7c]
mov byte [esp + 0x13], bl
cmp al, 3
je 0x10153229
cmp al, 4
je 0x10153229
cmp al, 6
jb 0x1015322b
mov byte [edx], cl
inc cl
inc edi
inc edx
cmp cl, 0x40
jb 0x10153200
mov cl, byte [esp + 0x50]
mov al, byte [esp + 0x51]
cmp cl, al
jne 0x1015325f
push ebp
mov byte [esp + 0x17], 2
mov byte [esp + 0x54], 0
call fcn.1015aa10
add esp, 4
test eax, eax
setne dl
inc edx
mov byte [esp + 0x51], dl
jmp 0x10153272
mov al, byte [esp + 0x70]
test al, al
je 0x1015326d
cmp al, byte [esp + 0x71]
jne 0x10153272
mov byte [esp + 0x13], 0x20
mov al, byte [ebp + 0x7c]
mov esi, 1
cmp al, 3
mov dword [esp + 0x30], esi
je 0x10153286
cmp al, 4
jne 0x1015328e
mov dword [esp + 0x30], 2
mov cl, byte [ebp + 8]
and cl, 0xc0
cmp cl, 0x40
jne 0x10153310
cmp al, 3
je 0x101532d9
cmp al, 6
jae 0x101532d9
cmp al, 4
jne 0x10153310
mov edx, dword [esp + 0xd4]
push edx
push 0
push esi
call sym.ITEuDllvMgr.dll_VDR_ConfigFlag4SAMReliable
add esp, 0xc
test eax, eax
jne 0x10153310
mov eax, dword [esp + 0x1c]
push eax
call fcn.101d1786
add esp, 4
mov eax, 0x35
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc0
ret
mov ecx, dword [esp + 0xd4]
push ecx
push esi
push esi
call sym.ITEuDllvMgr.dll_VDR_ConfigFlag4SAMReliable
add esp, 0xc
test eax, eax
jne 0x1015330c
mov edx, dword [esp + 0x1c]
push edx
call fcn.101d1786
add esp, 4
mov eax, 0x35
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc0
ret
mov dword [esp + 0x4c], esi
mov eax, dword [esp + 0xd4]
mov ecx, dword [esp + 0xdc]
push eax
push ecx
call sym.ITEuDllvMgr.dll_VDR_BlockErase
mov ebx, eax
add esp, 8
cmp ebx, 0x3f
jne 0x1015333a
mov byte [ebp + 0x11c], al
jmp 0x1015391e
mov al, byte [ebp + 0xf3]
test al, al
jne 0x1015334d
cmp ebx, 1
jne 0x1015391e
mov edx, dword [ebp + 0x64]
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x90]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0x60]
cmp al, 0xad
mov dword [esp + 0x28], eax
jne 0x1015339b
mov bl, byte [esp + 0x2b]
mov cl, byte [esp + 0x2a]
cmp ah, 0xde
jne 0x10153387
cmp cl, 0x94
jne 0x10153387
cmp bl, 0xd2
jne 0x10153387
cmp dl, 4
je 0x101533a4
cmp ah, 0xd7
jne 0x1015339b
cmp cl, 0x94
jne 0x1015339b
cmp bl, 0xda
jne 0x1015339b
cmp dl, 0x74
je 0x101533a4
test byte [ebp + 0x254], 1
je 0x101533db
mov eax, dword [esp + 0x20]
test eax, eax
je 0x101533db
mov eax, dword [esp + 0xd4]
lea edx, [esp + 0x90]
push ebp
push edx
push eax
call sym.ITEuDllvMgr.dll_VDR_Enhance_SLC_Program
add esp, 0xc
test eax, eax
jne 0x101533d3
mov ebx, 0x41
jmp 0x1015391e
mov dword [esp + 0x48], 1
mov al, byte [ebp + 0x7c]
mov esi, 0xd
cmp al, 3
jne 0x101533ee
mov esi, 0x60d
jmp 0x10153402
cmp al, 6
jb 0x101533f9
mov esi, 0x30f
jmp 0x10153402
cmp al, 4
jne 0x10153402
mov esi, 0x30d
movzx cx, byte [0x10248e19]
xor eax, eax
lea edx, [esp + 0x34]
mov dword [esp + 0x44], eax
mov dword [esp + 0x34], eax
or esi, ecx
lea eax, [esp + 0x44]
push edx
lea ecx, [esp + 0x44]
push eax
mov eax, dword [esp + 0xe4]
lea edx, [esp + 0x44]
push ecx
push edx
push eax
push ebp
mov dword [esp + 0x38], esi
mov byte [esp + 0x58], 0
mov byte [esp + 0x54], 0
call sym.ITEuDllvMgr.dll_RawAddress2CCBAddress
mov al, byte [ebp + 0xf0]
add esp, 0x18
cmp al, 1
jne 0x10153506
mov ecx, dword [ebp + 0x68]
push ecx
call fcn.101d175d
mov ecx, dword [ebp + 0x68]
mov edi, eax
mov edx, ecx
mov eax, 0x5a5a5a5a
shr ecx, 2
mov dword [esp + 0x2c], edi
add esp, 4
rep stosd dword es:[edi], eax
mov ecx, edx
mov byte [esp + 0x18], 0
and ecx, 3
rep stosb byte es:[edi], al
mov al, byte [esp + 0x13]
test al, al
jbe 0x101534f9
mov eax, dword [esp + 0x18]
and eax, 0xff
movzx ax, byte [esp + eax + 0x50]
cmp ax, word [esp + 0x34]
jae 0x101534f9
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x40]
push eax
mov eax, dword [esp + 0x40]
push ecx
push edx
push eax
push ebp
call sym.ITEuDllvMgr.dll_CCBAddress2RawAddress
mov edx, dword [esp + 0xe8]
mov cl, byte [ebp + 0xe]
mov edi, dword [esp + 0x3c]
push edx
push esi
xor dx, dx
push ebp
push 9
mov dl, cl
push edi
push edx
push eax
push ecx
call sym.ITEuDllvMgr.dll_VDR_WriteBlock
mov ebx, eax
add esp, 0x34
cmp ebx, 1
jne 0x101535c1
mov al, byte [esp + 0x18]
mov cl, byte [esp + 0x13]
inc al
cmp al, cl
mov byte [esp + 0x18], al
jb 0x1015348c
mov eax, dword [esp + 0x28]
push eax
call fcn.101d1786
add esp, 4
mov al, byte [ebp + 0x7c]
cmp al, 5
je 0x101537ae
cmp al, 6
jae 0x10153600
cmp al, 3
jne 0x101535cf
cmp byte [ebp + 0xe], 0x10
jne 0x101535cf
mov al, byte [ebp + 0x28]
mov bl, 0xe
cmp al, 6
mov byte [esp + 0x14], bl
jne 0x1015353e
mov bl, 0x10
mov byte [esp + 0x14], bl
mov cl, byte [ebp + 8]
and cl, 0xc0
cmp cl, 0x80
jne 0x1015354f
mov bl, 2
mov byte [esp + 0x14], bl
mov edx, dword [esp + 0x14]
and edx, 0xff
shl edx, 9
push edx
call fcn.101d175d
mov cl, bl
add esp, 4
shr cl, 1
mov dword [esp + 0x28], eax
je 0x1015358f
and ecx, 0xff
mov edx, ecx
mov esi, dword [esp + 0xd8]
mov edi, eax
mov ecx, 0x100
add eax, 0x400
dec edx
rep movsd dword es:[edi], dword [esi]
jne 0x10153577
mov eax, dword [esp + 0xd4]
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0xe0]
push ecx
mov ecx, dword [esp + 0x1c]
xor dx, dx
push ebp
push 0
mov dl, bl
push esi
push edx
push eax
push ecx
call sym.ITEuDllvMgr.dll_VDR_WriteBlock
jmp 0x101536a9
push edi
call fcn.101d1786
add esp, 4
jmp 0x101538f4
mov edx, dword [esp + 0xd4]
mov eax, dword [esp + 0xd8]
mov ecx, dword [esp + 0xdc]
push edx
push esi
push ebp
push 0
push eax
mov eax, dword [esp + 0x44]
push eax
push ecx
push eax
call sym.ITEuDllvMgr.dll_VDR_WriteBlock
add esp, 0x20
mov ebx, eax
jmp 0x101536b4
cmp al, 5
je 0x101537ae
mov eax, dword [esp + 0x14]
test eax, eax
je 0x101537ae
mov dl, byte [ebp + 0xe]
mov byte [ebp + 0xf9], dl
mov al, byte [ebp + 0x7c]
mov ecx, 0x222
cmp al, 6
jb 0x1015362e
mov ecx, 0x244
xor eax, eax
xor edx, edx
mov al, byte [ebp + 0xf9]
shl eax, 9
div ecx
mov bl, al
mov byte [esp + 0x14], bl
mov esi, dword [esp + 0x14]
and esi, 0xff
mov ecx, esi
shl ecx, 9
push ecx
call fcn.101d175d
add esp, 4
mov dword [esp + 0x28], eax
test bl, bl
jbe 0x1015367d
mov edx, esi
mov esi, dword [esp + 0xd8]
mov edi, eax
mov ecx, 0x80
add eax, 0x200
dec edx
rep movsd dword es:[edi], dword [esi]
jne 0x10153665
mov edx, dword [esp + 0xd4]
mov esi, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
push edx
mov edx, dword [esp + 0xe0]
push ebp
push esi
push eax
push 0x80
push 0
push ecx
push edx
call sym.ITEuDllvMgr.dll_VDR_ColWriteBlock
push esi
mov ebx, eax
call fcn.101d1786
add esp, 0x24
mov eax, dword [esp + 0x30]
and eax, 0xffff
shl eax, 9
mov dword [esp + 0x14], eax
push eax
mov eax, dword [esp + 0xdc]
push eax
push str.ROOT
call fcn.10165270
add esp, 0xc
cmp ebx, 1
jne 0x101538f4
mov al, byte [ebp + 0x7c]
mov cl, byte [ebp + 0xe]
mov edx, dword [ebp + 0x68]
cmp al, 5
mov byte [esp + 0x27], cl
mov dword [esp + 0x28], edx
jne 0x1015370c
mov al, byte [ebp + 0xf9]
mov byte [ebp + 0xe], al
and eax, 0xff
shl eax, 9
mov dword [ebp + 0x68], eax
mov eax, dword [ebp + 0x68]
push eax
call fcn.101d175d
mov ecx, dword [ebp + 0x68]
mov esi, eax
mov edx, ecx
xor eax, eax
mov edi, esi
add esp, 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
cmp byte [ebp + 0xf0], 1
je 0x101537d1
mov al, byte [esp + 0x13]
mov byte [esp + 0x18], 1
cmp al, 1
jbe 0x1015384a
mov edi, dword [esp + 0xdc]
mov ecx, dword [esp + 0xd4]
mov dx, word [ebp + 0x78]
mov al, byte [ebp + 0xe]
push ecx
push edx
mov edx, dword [esp + 0x20]
xor cx, cx
push ebp
push 9
mov cl, al
push esi
push ecx
and edx, 0xff
xor ecx, ecx
mov cl, byte [esp + edx + 0x68]
add ecx, edi
push ecx
push eax
call sym.ITEuDllvMgr.dll_VDR_WriteBlock
add esp, 0x20
cmp eax, 1
mov dword [esp + 0x38], eax
jne 0x1015384a
mov al, byte [esp + 0x18]
mov cl, byte [esp + 0x13]
inc al
cmp al, cl
mov byte [esp + 0x18], al
jb 0x10153754
jmp 0x1015384a
mov eax, dword [esp + 0xd4]
push ebp
push eax
call sym.ITEuDllvMgr.dll_Init_SegTable
add esp, 8
test eax, eax
jne 0x1015361d
mov ebx, 0x37
jmp 0x101536b4
mov al, byte [esp + 0x13]
mov byte [esp + 0x18], 0
test al, al
jbe 0x1015384a
mov edi, dword [esp + 0xd4]
mov edx, dword [esp + 0x18]
and edx, 0xff
movzx ax, byte [esp + edx + 0x50]
cmp ax, word [esp + 0x34]
jbe 0x10153838
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x3c]
push eax
mov eax, dword [esp + 0x48]
push eax
push ecx
push edx
push ebp
call sym.ITEuDllvMgr.dll_CCBAddress2RawAddress
mov dx, word [ebp + 0x78]
mov cl, byte [ebp + 0xe]
push edi
push edx
xor dx, dx
push ebp
push 9
mov dl, cl
push esi
push edx
push eax
push ecx
call sym.ITEuDllvMgr.dll_VDR_WriteBlock
add esp, 0x34
cmp eax, 1
mov dword [esp + 0x38], eax
jne 0x1015384a
mov al, byte [esp + 0x18]
mov cl, byte [esp + 0x13]
inc al
cmp al, cl
mov byte [esp + 0x18], al
jb 0x101537e5
push esi
call fcn.101d1786
mov al, byte [esp + 0x2b]
mov ecx, dword [esp + 0x2c]
mov byte [ebp + 0xe], al
mov eax, dword [esp + 0xe8]
add esp, 4
mov dword [ebp + 0x68], ecx
test eax, eax
je 0x101538e9
mov al, byte [ebp + 0x7c]
cmp al, 5
je 0x101538a1
cmp al, 6
jae 0x101538a1
mov edx, dword [esp + 0xd4]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
push edx
mov edx, dword [esp + 0x34]
push eax
mov eax, dword [esp + 0xe4]
push ebp
push ecx
push edx
push eax
call sym.ITEuDllvMgr.dll_VDR_ReadPage
add esp, 0x18
jmp 0x101538c9
mov ecx, dword [esp + 0xd4]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
push ecx
mov ecx, dword [esp + 0xe0]
push edx
push eax
push 1
push 0x40
push 1
push ecx
call sym.ITEuDllvMgr.dll_VDR_RootFindRead
add esp, 0x1c
mov ebx, eax
cmp ebx, 1
jne 0x101538f4
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0xd8]
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x101538e9
xor ebx, ebx
jmp 0x101538f4
mov eax, dword [esp + 0x38]
cmp eax, 1
je 0x101538f4
mov ebx, eax
mov eax, dword [esp + 0x48]
test eax, eax
je 0x1015391e
mov ecx, dword [esp + 0xd4]
lea eax, [esp + 0x90]
push ebp
push eax
push ecx
call sym.ITEuDllvMgr.dll_VDR_Disable_SLC_Program
add esp, 0xc
test eax, eax
jne 0x1015391e
mov ebx, 0x42
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x10153943
mov edx, dword [esp + 0xd4]
push edx
push 0
push 1
call sym.ITEuDllvMgr.dll_VDR_ConfigFlag4SAMReliable
add esp, 0xc
test eax, eax
jne 0x10153943
mov ebx, 0x35
mov eax, dword [esp + 0x1c]
push eax
call fcn.101d1786
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc0
ret