Function at 0x1015ca30
Capabilities:
Encrypt data using rc4 ksa
Print debug messages
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xb84
push ebx
push ebp
mov ebp, dword [esp + 0xb94]
push esi
mov esi, dword [esp + 0xba0]
push edi
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x98]
mov byte [ebp + 0x11c], 1
rep stosd dword es:[edi], eax
mov al, byte [ebp + 0x113]
push esi
push eax
lea ecx, [esp + 0xa0]
push str.__d__SDK_:_ISP_path___s_n
push ecx
mov byte [esp + 0x2b], 0
call fcn.1003399c
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
add esp, 0x10
lea edx, [esp + 0x98]
push edx
call ebx
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x98]
lea edx, [esp + 0x98]
rep stosd dword es:[edi], eax
mov al, byte [ebp + 0x11d]
xor ecx, ecx
mov cl, byte [ebp + 0x113]
push eax
push ecx
push str.__d__SDK_:_MP_retry_count___d_n
push edx
call fcn.1003399c
add esp, 0x10
lea eax, [esp + 0x98]
push eax
call ebx
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x98]
xor edx, edx
mov dl, byte [ebp + 0x7b]
rep stosd dword es:[edi], eax
mov al, byte [ebp + 0x7c]
xor ecx, ecx
mov cl, byte [ebp + 0xf0]
push ecx
xor ecx, ecx
mov cl, byte [ebp + 0x113]
push edx
push eax
push ecx
lea edx, [esp + 0xa8]
push str.__d__SDK_:_CtrlType___d__ISPType___d__MP_case___d_n
push edx
call fcn.1003399c
add esp, 0x18
lea eax, [esp + 0x98]
push eax
call ebx
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x98]
xor edx, edx
mov dl, byte [ebp + 0x112]
rep stosd dword es:[edi], eax
mov al, byte [ebp + 0x110]
xor ecx, ecx
mov cl, byte [ebp + 0x26f]
push ecx
xor ecx, ecx
mov cl, byte [ebp + 0x113]
push edx
push eax
push ecx
push str.__d__SDK_:_bOptimumVB___d__bDisIL___d__bMPset___d_n
lea edx, [esp + 0xac]
push edx
call fcn.1003399c
add esp, 0x18
lea eax, [esp + 0x98]
push eax
call ebx
mov al, byte [ebp + 0x26f]
test al, al
je 0x1015cc7f
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x98]
xor edx, edx
mov dl, byte [ebp + 0x271]
rep stosd dword es:[edi], eax
mov al, byte [ebp + 0x270]
xor ecx, ecx
mov cl, byte [ebp + 0x272]
push ecx
xor ecx, ecx
mov cl, byte [ebp + 0x113]
push edx
push eax
push ecx
lea edx, [esp + 0xa8]
push str.__d__SDK_:_Para0__0x_lx__Para1__0x_lx__Para2__0x_lx_n
push edx
call fcn.1003399c
add esp, 0x18
lea eax, [esp + 0x98]
push eax
call ebx
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x98]
xor edx, edx
mov dl, byte [ebp + 0x275]
rep stosd dword es:[edi], eax
mov al, byte [ebp + 0x274]
xor ecx, ecx
mov cl, byte [ebp + 0x276]
push ecx
push edx
xor ecx, ecx
xor edx, edx
mov cl, byte [ebp + 0x273]
mov dl, byte [ebp + 0x113]
push eax
push ecx
push edx
lea eax, [esp + 0xac]
push str.__d__SDK_:_AS_T__0x_lx__SS_T__0x_lx__WrPrt__0x_lx__Voltage__0x_lx_n
push eax
call fcn.1003399c
add esp, 0x1c
lea ecx, [esp + 0x98]
push ecx
call ebx
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x98]
xor edx, edx
mov dl, byte [ebp + 0x279]
rep stosd dword es:[edi], eax
mov al, byte [ebp + 0x278]
push edx
xor ecx, ecx
push eax
mov cl, byte [ebp + 0x27a]
xor edx, edx
mov dl, byte [ebp + 0x277]
xor eax, eax
mov al, byte [ebp + 0x113]
push ecx
push edx
push eax
lea ecx, [esp + 0xac]
push str.__d__SDK_:_AS_T_R__0x_lx__SS_T_R__0x_lx__P1_R__0x_lx__WrPrt_R__0x_lx_n
push ecx
call fcn.1003399c
add esp, 0x1c
lea edx, [esp + 0x98]
push edx
call ebx
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x98]
xor edx, edx
mov dl, byte [ebp + 0x113]
rep stosd dword es:[edi], eax
mov al, byte [ebp + 0xf]
xor ecx, ecx
mov cl, byte [ebp + 0xf3]
push eax
push ecx
push edx
lea eax, [esp + 0xa4]
push str.__d__SDK_:_NoReadStatus___d__PlaneNO___d_n
push eax
call fcn.1003399c
add esp, 0x14
lea ecx, [esp + 0x98]
push ecx
call ebx
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x98]
xor edx, edx
mov dl, byte [ebp + 0x111]
rep stosd dword es:[edi], eax
mov al, byte [ebp + 0x7a]
push edx
xor ecx, ecx
xor edx, edx
mov cx, word [ebp + 0x78]
mov dl, byte [ebp + 0x113]
push eax
push ecx
push edx
lea eax, [esp + 0xa8]
push str.__d__SDK_:_PageAttribute__0x_lx__WBTVBx___d__ResVbs___d_n
push eax
call fcn.1003399c
add esp, 0x18
lea ecx, [esp + 0x98]
push ecx
call ebx
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x98]
xor edx, edx
mov dl, byte [ebp + 0xa]
rep stosd dword es:[edi], eax
mov al, byte [ebp + 0xb]
xor ecx, ecx
mov cl, byte [ebp + 0x113]
push edx
push eax
push ecx
lea edx, [esp + 0xa4]
push str.__d__SDK_:_ChNo___d__CeNo___d_n
push edx
call fcn.1003399c
add esp, 0x14
lea eax, [esp + 0x98]
push eax
call ebx
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x98]
xor edx, edx
mov dx, word [ebp + 0x22]
rep stosd dword es:[edi], eax
mov ax, word [ebp + 0xc]
xor ecx, ecx
mov cl, byte [ebp + 0xe]
push ecx
xor ecx, ecx
mov cl, byte [ebp + 0x113]
push edx
push eax
push ecx
lea edx, [esp + 0xa8]
push str.__d__SDK_:_BlkPage_RealBlkPage___0x_lx__0x_lx___PageSec__0x_lx_n
push edx
call fcn.1003399c
add esp, 0x18
lea eax, [esp + 0x98]
push eax
call ebx
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x98]
xor edx, edx
mov dl, byte [ebp + 0x113]
rep stosd dword es:[edi], eax
xor ecx, ecx
lea eax, [esp + 0x98]
mov cl, byte [ebp + 0x2b]
push ecx
push edx
push str.__d__SDK_:_TablePhyPageNo__0x_lx_n
push eax
call fcn.1003399c
add esp, 0x10
lea ecx, [esp + 0x98]
push ecx
call ebx
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x98]
xor edx, edx
mov dx, word [ebp + 0x109]
rep stosd dword es:[edi], eax
mov al, byte [ebp + 0x113]
push edx
push eax
lea ecx, [esp + 0xa0]
push str.__d__SDK_:_Resblk4Ed3__0x_lx_n
push ecx
call fcn.1003399c
add esp, 0x10
lea edx, [esp + 0x98]
push edx
call ebx
cmp byte [esi], 0
jne 0x1015ce2f
pop edi
pop esi
pop ebp
mov eax, 0x2d
pop ebx
add esp, 0xb84
ret
mov al, byte [ebp + 0x78]
mov cl, byte [0x10248ea5]
and al, 0x70
cmp al, cl
jae 0x1015ce95
and word [ebp + 0x78], 0xff8f
mov ax, word [ebp + 0x78]
movzx dx, byte [0x10248ea5]
or edx, eax
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x98]
rep stosd dword es:[edi], eax
mov word [ebp + 0x78], dx
xor ecx, ecx
mov cl, byte [ebp + 0x113]
and edx, 0xffff
push edx
push ecx
lea edx, [esp + 0xa0]
push str.__d__SDK_:_New_PageAttribute__0x_lx_n
push edx
call fcn.1003399c
add esp, 0x10
lea eax, [esp + 0x98]
push eax
call ebx
mov ecx, 0x28
xor eax, eax
lea edi, [esp + 0x1dc]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x1dc]
push ecx
call fcn.1015dd60
mov al, byte [esp + 0x1e0]
add esp, 4
test al, al
je 0x1015cfdd
mov al, byte [esp + 0x266]
test al, al
je 0x1015cfc3
mov al, byte [ebp + 9]
mov byte [esp + 0x10], 0
test al, al
jbe 0x1015cfc3
mov eax, dword [ebp + 0x70]
xor esi, esi
cmp eax, esi
mov dword [esp + 0x24], esi
jbe 0x1015cf67
push esi
push ebp
call sym.ITEuDllvMgr.dll_FLH_BlockIsGap
add esp, 8
test eax, eax
jne 0x1015cf5f
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0xba0]
and edx, 0xff
mov eax, edx
shl eax, 0x10
add eax, esi
mov al, byte [eax + ecx]
test al, al
je 0x1015cf5f
cmp al, 0x80
jae 0x1015cf5f
push esi
push edx
xor edx, edx
mov ecx, 0x41
mov dl, byte [ebp + 0x113]
xor eax, eax
lea edi, [esp + 0xa0]
push edx
rep stosd dword es:[edi], eax
lea eax, [esp + 0xa4]
push str.__d__SDK__Ce_d__BadBlock__0x_lx_n
push eax
call fcn.1003399c
add esp, 0x14
lea ecx, [esp + 0x98]
push ecx
call ebx
inc dword [esp + 0x24]
mov eax, dword [ebp + 0x70]
inc esi
cmp esi, eax
jb 0x1015cef0
mov edx, dword [esp + 0x24]
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x98]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x10]
push edx
and eax, 0xff
lea ecx, [esp + 0x9c]
push eax
xor eax, eax
mov al, byte [ebp + 0x113]
push eax
push str.__d__SDK__Ce_d__Total_BadBlock__0x_lx_n
push ecx
call fcn.1003399c
add esp, 0x14
lea edx, [esp + 0x98]
push edx
call ebx
mov al, byte [esp + 0x10]
mov cl, byte [ebp + 9]
inc al
cmp al, cl
mov byte [esp + 0x10], al
jb 0x1015cee3
mov al, byte [esp + 0x1dc]
test al, al
je 0x1015cfdd
mov ax, word [esp + 0x278]
mov word [ebp + 0x109], ax
mov cl, byte [ebp + 2]
xor esi, esi
shr ecx, 2
and ecx, 3
mov dword [esp + 0x84], 0x800
mov dword [esp + 0x88], 0x1000
mov dword [esp + 0x8c], 0x2000
mov dword [esp + 0x90], 0x4000
mov dword [esp + 0x94], esi
mov eax, dword [esp + ecx*4 + 0x84]
mov ecx, 0x10
shr eax, 9
mov byte [esp + 0x22], al
xor eax, eax
lea edi, [esp + 0x44]
rep stosd dword es:[edi], eax
mov cl, byte [ebp + 0x7c]
mov al, 5
cmp cl, al
jne 0x1015d1b1
mov byte [esp + 0x44], al
mov al, byte [ebp + 0xe]
mov byte [esp + 0x78], al
mov byte [esp + 0x68], al
mov cl, al
mov al, byte [esp + 0x204]
test al, al
mov byte [esp + 0x45], 0xe0
mov byte [esp + 0x46], 0x85
mov byte [esp + 0x47], 1
mov word [esp + 0x48], si
mov word [esp + 0x79], si
mov byte [esp + 0x14], cl
je 0x1015d0bc
mov eax, dword [esp + 0x205]
xor cl, cl
test al, al
mov byte [esp + 0x14], cl
mov byte [esp + 0x47], al
jbe 0x1015d0df
and eax, 0xff
mov edi, eax
mov dx, word [esp + esi*2 + 0x206]
mov al, byte [esp + esi + 0x246]
mov word [esp + esi*2 + 0x48], dx
mov byte [esp + esi + 0x68], al
add cl, al
inc esi
dec edi
jne 0x1015d098
mov byte [esp + 0x14], cl
jmp 0x1015d0df
mov al, byte [ebp + 0xf0]
test al, al
je 0x1015d0df
lea eax, [esp + 0x44]
push ebp
push eax
call sym.ITEuDllvMgr.dll_DG_ArrangeSegmentPara
mov cl, byte [esp + 0x80]
add esp, 8
mov byte [esp + 0x14], cl
cmp cl, byte [esp + 0x22]
je 0x1015d0ea
mov byte [esp + 0x1b], 1
mov esi, dword [esp + 0x14]
mov dl, byte [esp + 0x14]
and esi, 0xff
mov ecx, 0x41
mov eax, esi
lea edi, [esp + 0x98]
shl eax, 9
mov dword [ebp + 0x68], eax
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x79]
mov byte [ebp + 0xe], dl
and ecx, 0xffff
push esi
push ecx
lea edx, [esp + 0xa0]
push str._SDK_:_StartCol__0x_lx__New_PageSec__0x_lx_n
push edx
call fcn.1003399c
add esp, 0x10
lea eax, [esp + 0x98]
push eax
call ebx
mov al, byte [esp + 0x47]
mov byte [esp + 0x10], 0
test al, al
jbe 0x1015d1a6
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x98]
xor edx, edx
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x10]
xor ecx, ecx
and eax, 0xff
mov cl, byte [esp + eax + 0x68]
mov dx, word [esp + eax*2 + 0x48]
push ecx
inc eax
push edx
push eax
lea eax, [esp + 0xa4]
push str._SDK_:__Seg__d__ColAddr__0x_lx__SecNo___d_n
push eax
call fcn.1003399c
add esp, 0x14
lea ecx, [esp + 0x98]
push ecx
call ebx
mov al, byte [esp + 0x10]
mov cl, byte [esp + 0x47]
inc al
cmp al, cl
mov byte [esp + 0x10], al
jb 0x1015d14b
cmp byte [esp + 0x14], 4
jb 0x1015d301
mov ecx, 0x20
xor eax, eax
lea edi, [esp + 0x27c]
rep stosd dword es:[edi], eax
cmp byte [ebp + 0x7c], 6
jb 0x1015d36d
mov al, byte [esp + 0x204]
test al, al
je 0x1015d20b
mov ecx, dword [esp + 0x205]
test cl, cl
mov byte [esp + 0x2bc], cl
mov byte [esp + 0x14], cl
jbe 0x1015d227
and ecx, 0xff
lea esi, [esp + 0x206]
lea edi, [esp + 0x27c]
shr ecx, 1
rep movsd dword es:[edi], dword [esi]
adc ecx, ecx
rep movsw word es:[edi], word [esi]
jmp 0x1015d227
lea ecx, [esp + 0x27c]
push ebp
push ecx
call sym.ITEuDllvMgr.dll_DG_ArrangeSegmentPara_Ext
mov dl, byte [esp + 0x2c4]
add esp, 8
mov byte [esp + 0x14], dl
mov al, byte [ebp + 0xf0]
test al, al
je 0x1015d236
mov byte [esp + 0x1b], 1
mov al, byte [esp + 0x14]
mov cl, byte [esp + 0x22]
cmp al, cl
je 0x1015d247
mov byte [esp + 0x1b], 1
mov cl, byte [esp + 0x14]
mov esi, dword [esp + 0x14]
mov byte [ebp + 0xe], cl
and esi, 0xff
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x98]
mov edx, esi
rep stosd dword es:[edi], eax
push esi
lea eax, [esp + 0x9c]
shl edx, 9
push str._SDK_:_New_PageSec__0x_lx_n
push eax
mov dword [ebp + 0x68], edx
call fcn.1003399c
add esp, 0xc
lea ecx, [esp + 0x98]
push ecx
call ebx
mov al, byte [esp + 0x2bc]
mov byte [esp + 0x10], 0
test al, al
jbe 0x1015d2fa
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x98]
xor edx, edx
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x10]
and eax, 0xff
mov dx, word [esp + eax*2 + 0x27c]
inc eax
push edx
push eax
lea eax, [esp + 0xa0]
push str._SDK_:__Seg__d__ColAddr__0x_lx__n
push eax
call fcn.1003399c
add esp, 0x10
lea ecx, [esp + 0x98]
push ecx
call ebx
mov al, byte [esp + 0x10]
mov cl, byte [esp + 0x2bc]
inc al
cmp al, cl
mov byte [esp + 0x10], al
jb 0x1015d2a0
cmp byte [esp + 0x14], 4
jae 0x1015d341
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x98]
push esi
lea edx, [esp + 0x9c]
push str._MP_CreateSystem_:_Not_enough_pagesec__d__to_do_MP._n
rep stosd dword es:[edi], eax
push edx
call fcn.1003399c
add esp, 0xc
lea eax, [esp + 0x98]
push eax
call ebx
pop edi
pop esi
pop ebp
mov eax, 0x3c
pop ebx
add esp, 0xb84
ret
mov eax, dword [esp + 0xb98]
mov cl, byte [esp + 0x1b]
lea edx, [esp + 0x27c]
mov byte [esp + 0x2bd], cl
push edx
push eax
call fcn.10169b50
add esp, 8
cmp eax, 1
jne 0x1015dcab
mov al, byte [ebp + 0xb]
cmp al, 1
jbe 0x1015d3c8
xor dl, dl
test al, al
mov byte [esp + 0x10], dl
jbe 0x1015d3c8
mov cl, byte [ebp + 9]
mov esi, dword [esp + 0xba0]
xor al, al
test cl, cl
mov byte [esp + 0x1c], al
jbe 0x1015d3bb
mov ecx, dword [esp + 0x10]
and ecx, 0xff
mov edi, dword [esp + 0x1c]
and edi, 0xff
lea edi, [ecx + edi*4]
shl edi, 0xe
inc al
mov byte [edi + esi], 1
cmp al, byte [ebp + 9]
mov byte [esp + 0x1c], al
jb 0x1015d39c
mov al, byte [ebp + 0xb]
inc dl
cmp dl, al
mov byte [esp + 0x10], dl
jb 0x1015d37e
mov al, byte [ebp + 0x7c]
cmp al, 3
je 0x1015d3d3
cmp al, 6
jb 0x1015d435
mov cl, byte [ebp + 8]
and cl, 0xc0
cmp cl, 0x80
je 0x1015d435
mov al, byte [ebp + 0xb]
xor dl, dl
test al, al
mov byte [esp + 0x10], dl
jbe 0x1015d435
mov esi, dword [esp + 0xba0]
mov cl, byte [ebp + 9]
xor al, al
test cl, cl
mov byte [esp + 0x1c], al
jbe 0x1015d428
mov ecx, dword [esp + 0x10]
and ecx, 0xff
mov edi, dword [esp + 0x1c]
and edi, 0xff
lea edi, [ecx + edi*4]
shl edi, 0xe
inc al
mov byte [edi + esi], 1
cmp al, byte [ebp + 9]
mov byte [esp + 0x1c], al
jb 0x1015d409
mov al, byte [ebp + 0xb]
inc dl
cmp dl, al
mov byte [esp + 0x10], dl
jb 0x1015d3f2
mov al, byte [esp + 0x1dc]
test al, al
je 0x1015d458
mov eax, dword [esp + 0x270]
test eax, eax
je 0x1015d458
mov dword [ebp + 0x10c], eax
mov byte [ebp + 0x110], 1
mov al, byte [ebp + 0x7a]
test al, al
je 0x1015d466
mov byte [ebp + 0x110], 0
push 0x800
mov byte [esp + 0x27], 0
mov byte [esp + 0x26], 0
call fcn.101d175d
push 0x80d4
mov dword [esp + 0x44], eax
call fcn.101d175d
mov dword [esp + 0x2c], eax
mov ecx, 0x126
xor eax, eax
lea edi, [esp + 0x304]
rep stosd dword es:[edi], eax
mov al, byte [ebp + 0x11d]
add esp, 8
test al, al
mov byte [esp + 0x792], 0xff
je 0x1015d4c3
mov al, byte [ebp + 0xf0]
test al, al
je 0x1015d4c3
mov byte [esp + 0x792], 0x80
mov dl, byte [esp + 0x1b]
lea eax, [esp + 0x2fc]
push eax
push ebp
mov byte [esp + 0x79b], dl
call fcn.101670b0
lea ecx, [esp + 0x304]
push ecx
push ebp
call fcn.10167130
add esp, 0x10
cmp eax, 1
mov dword [esp + 0x14], eax
jne 0x1015d6f6
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x98]
xor edx, edx
mov dl, byte [ebp + 0xf6]
rep stosd dword es:[edi], eax
mov al, byte [ebp + 0x113]
push edx
push eax
lea ecx, [esp + 0xa0]
push str.__d__SDK_:_new_TablePhyPages__0x_lx_n
push ecx
call fcn.1003399c
add esp, 0x10
lea edx, [esp + 0x98]
push edx
call ebx
mov al, byte [ebp + 0xf6]
mov byte [esp + 0x10], 0
test al, al
jbe 0x1015d5a8
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x98]
xor edx, edx
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x10]
mov dl, byte [ebp + 0x113]
and eax, 0xff
xor ecx, ecx
mov cl, byte [esp + eax + 0x351]
push ecx
push eax
push edx
lea eax, [esp + 0xa4]
push str.__d__SDK_:_Table__d___0x_lx_n
push eax
call fcn.1003399c
add esp, 0x14
lea ecx, [esp + 0x98]
push ecx
call ebx
mov al, byte [esp + 0x10]
mov cl, byte [ebp + 0xf6]
inc al
cmp al, cl
mov byte [esp + 0x10], al
jb 0x1015d548
mov bl, byte [ebp + 0x77]
mov dl, byte [esp + 0x351]
mov al, byte [esp + 0x352]
mov cl, 1
cmp cl, bl
mov bl, byte [ebp + 2]
sbb ecx, ecx
and bl, 0xc0
neg ecx
inc ecx
xor edi, edi
cmp bl, 0x40
mov byte [ebp + 0xf1], dl
mov byte [ebp + 0xf2], al
jne 0x1015d5e0
mov edi, 1
mov esi, dword [ebp + 0x70]
xor edx, edx
mov eax, esi
div ecx
test edi, edi
mov word [esp + 0x2fc], ax
je 0x1015d60c
shr ax, 1
mov word [esp + 0x2fe], ax
mov word [esp + 0x300], 1
jmp 0x1015d620
mov word [esp + 0x2fe], 1
mov word [esp + 0x300], 2
cmp bl, 0x80
je 0x1015d634
mov al, byte [ebp + 0xf]
mov byte [esp + 0x302], 0
cmp al, 1
jne 0x1015d63c
mov byte [esp + 0x302], 1
mov dl, byte [ebp + 7]
mov eax, esi
test dl, 1
je 0x1015d65f
mov eax, dword [esp + 0x2fc]
xor edx, edx
mov dx, word [ebp + 0x20]
and eax, 0xffff
shr eax, 1
add eax, edx
imul eax, ecx
mov dword [esp + 0x304], eax
xor eax, eax
mov dword [esp + 0x308], eax
mov dword [esp + 0x30c], eax
mov byte [esp + 0x1c], al
mov al, byte [ebp + 9]
test al, al
jbe 0x1015d6e4
mov eax, dword [ebp + 0x70]
xor edi, edi
test eax, eax
jbe 0x1015d6d3
mov ebx, dword [esp + 0x1c]
mov esi, dword [esp + 0xba0]
push edi
push ebp
call sym.ITEuDllvMgr.dll_FLH_BlockIsGap
add esp, 8
test eax, eax
jne 0x1015d6bb
mov ecx, ebx
and ecx, 0xff
shl ecx, 0x10
add ecx, edi
mov al, byte [ecx + esi]
test al, al
je 0x1015d6c5
cmp al, 0x80
jae 0x1015d6c5
mov eax, dword [ebp + 0x70]
inc edi
cmp edi, eax
jb 0x1015d695
jmp 0x1015d6d3
and ebx, 0xff
mov byte [esp + ebx + 0x308], 1
mov al, byte [esp + 0x1c]
mov cl, byte [ebp + 9]
inc al
cmp al, cl
mov byte [esp + 0x1c], al
jb 0x1015d681
mov al, byte [ebp + 0x10b]
test al, al
je 0x1015d747
mov dword [esp + 0x14], 0x36
mov esi, dword [esp + 0xb98]
xor bl, bl
mov byte [esp + 0x10], bl
mov eax, dword [esp + 0x10]
and eax, 0xff
mov cl, byte [esp + eax + 0x22]
test cl, cl
je 0x1015d737
lea edx, [esp + eax*4 + 0x19c]
push esi
push edx
call sym.ITEuDllvMgr.dll_SwapDWORD
add esp, 4
push eax
call sym.ITEuDllvMgr.dll_VDR_BlockErase
add esp, 8
cmp eax, 0x3f
je 0x1015dc89
inc bl
cmp bl, 2
mov byte [esp + 0x10], bl
jb 0x1015d703
jmp 0x1015dc90
mov esi, dword [esp + 0x24]
mov ebx, dword [esp + 0xba0]
mov edi, dword [esp + 0xb98]
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x1e0]
push 1
push eax
lea ecx, [esp + 0x308]
push esi
push ecx
push ebx
push ebp
push edi
call fcn.10161470
add esp, 0x20
cmp eax, 1
mov dword [esp + 0x14], eax
jne 0x1015d6f6
lea edx, [esp + 0x27c]
lea eax, [esp + 0x44]
push edx
push eax
push ebx
push ebp
push esi
push edi
call fcn.10163f40
add esp, 0x18
test eax, eax
jne 0x1015d7b3
mov dword [esp + 0x14], 0x2c
jmp 0x1015d6f6
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x19c]
sub ecx, eax
lea edi, [esp + 0x1a4]
mov dword [esp + 0x1c], ecx
lea ecx, [esp + 0x1a4]
sub ecx, eax
lea esi, [eax + 0x10]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x34], 2
lea ecx, [esi - 0x10]
push ebp
push ecx
lea ebx, [edi - 8]
call sym.ITEuDllvMgr.dll_SDKFAddress2RawAddress
lea edx, [esi - 8]
push ebp
push edx
mov dword [ebx], eax
call sym.ITEuDllvMgr.dll_SDKFAddress2RawAddress
push ebp
push esi
mov dword [edi], eax
call sym.ITEuDllvMgr.dll_SDKFAddress2RawAddress
mov ecx, dword [esp + 0x34]
lea edx, [esi + 8]
add ecx, esi
push ebp
push edx
mov dword [ecx], eax
call sym.ITEuDllvMgr.dll_SDKFAddress2RawAddress
mov ecx, dword [esp + 0x34]
push ebx
add ecx, esi
mov dword [ecx], eax
call sym.ITEuDllvMgr.dll_SwapDWORD
mov edx, dword [esp + 0x40]
mov dword [ebx], eax
lea ebx, [edx + esi]
push ebx
call sym.ITEuDllvMgr.dll_SwapDWORD
push edi
mov dword [ebx], eax
call sym.ITEuDllvMgr.dll_SwapDWORD
mov dword [edi], eax
mov eax, dword [esp + 0x40]
lea ebx, [eax + esi]
push ebx
call sym.ITEuDllvMgr.dll_SwapDWORD
mov dword [ebx], eax
mov eax, dword [esp + 0x64]
add esp, 0x30
add esi, 4
add edi, 4
dec eax
mov dword [esp + 0x34], eax
jne 0x1015d7e3
mov eax, dword [esp + 0x1b4]
mov byte [esp + 0x34], 4
cmp eax, 0xffffffff
jne 0x1015d893
mov ecx, dword [esp + 0x1ac]
mov edx, dword [esp + 0x1b0]
mov byte [esp + 0x34], 2
mov dword [esp + 0x1b4], ecx
mov dword [esp + 0x1b8], edx
mov eax, dword [esp + 0xb98]
lea ecx, [esp + 0x19c]
push eax
push ecx
call sym.ITEuDllvMgr.dll_VDR_WriteSysAddr
add esp, 8
test eax, eax
jne 0x1015d8bc
mov dword [esp + 0x14], 0x28
jmp 0x1015d6f6
cmp byte [ebp + 0xf0], 1
jne 0x1015d934
mov ecx, 8
xor eax, eax
lea edi, [ebp + 0x8c]
rep stosd dword es:[edi], eax
mov ecx, 8
lea edi, [ebp + 0x133]
rep stosd dword es:[edi], eax
mov al, byte [ebp + 0xf6]
xor cl, cl
test al, al
mov byte [esp + 0x1c], cl
jbe 0x1015d970
mov eax, dword [esp + 0x1c]
cmp cl, 0x20
jae 0x1015d90f
and eax, 0xff
mov dl, byte [esp + eax + 0x351]
mov byte [eax + ebp + 0x8c], dl
jmp 0x1015d922
and eax, 0xff
mov dl, byte [esp + eax + 0x351]
mov byte [eax + ebp + 0x113], dl
mov al, byte [ebp + 0xf6]
inc cl
cmp cl, al
mov byte [esp + 0x1c], cl
jb 0x1015d8f1
jmp 0x1015d970
mov al, byte [ebp + 8]
and al, 0xc0
cmp al, 0x40
jne 0x1015d970
mov al, byte [ebp + 0x7c]
cmp al, 3
je 0x1015d94c
cmp al, 4
je 0x1015d94c
cmp al, 6
jb 0x1015d970
xor al, al
lea ecx, [ebp + 0x113]
cmp al, 0x20
jae 0x1015d960
mov byte [ecx - 0x87], al
jmp 0x1015d962
mov byte [ecx], al
inc al
inc ecx
cmp al, 0x40
jb 0x1015d954
mov byte [ebp + 0xf6], 0x40
mov esi, dword [esp + 0x3c]
lea ecx, [esp + 0x1dc]
push ecx
push ebp
push esi
call fcn.1015faf0
mov edi, dword [esp + 0x30]
mov byte [esi + 0x6f], 0
mov dword [esi + 0x88], 0x60606060
mov byte [esi + 0x8c], 0x82
mov byte [esi + 0x8d], 2
xor eax, eax
xor ecx, ecx
mov dword [esp + 0x4c], 0x400
mov al, byte [edi + 0x80b5]
mov cx, word [ebp + 0xf4]
imul eax, ecx
xor edx, edx
mov ebx, dword [esp + 0x27c]
mov dl, byte [ebp + 0x111]
add esp, 0xc
mov dword [esp + 0x1c], edx
mov edx, dword [ebp + 0x68]
shr edx, 9
imul eax, edx
mov edx, dword [esp + 0x274]
mov dword [esp + 0x38], eax
mov ecx, dword [edi + 0x80bc]
add edx, ebx
cmp ecx, edx
jae 0x1015da02
mov dword [esp + 0x14], 0x11
jmp 0x1015d6f6
mov edx, dword [esp + 0x1c]
inc edx
imul edx, eax
lea eax, [edx + 0x400]
cmp ecx, eax
ja 0x1015da21
mov dword [esp + 0x14], 0x40
jmp 0x1015d6f6
sub ecx, edx
sub ecx, 0x400
test ebx, ebx
mov dword [esp + 0x30], ecx
je 0x1015da35
mov dword [esp + 0x30], ebx
mov eax, dword [esp + 0x274]
mov dword [esp + 0x28], 0
test eax, eax
je 0x1015da4c
mov dword [esp + 0x28], eax
lea ecx, [esp + 0x28]
push ecx
call sym.ITEuDllvMgr.dll_SwapDWORD
lea edx, [esp + 0x2c]
mov dword [esi + 0xa0], eax
push edx
call sym.ITEuDllvMgr.dll_SwapDWORD
mov dword [esi + 0xa4], eax
lea eax, [esp + 0x38]
push eax
call sym.ITEuDllvMgr.dll_SwapDWORD
mov dword [esi + 0x94], eax
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x34]
lea eax, [esp + 0x38]
add edx, ecx
push eax
mov dword [esp + 0x3c], edx
call sym.ITEuDllvMgr.dll_SwapDWORD
lea ecx, [esp + 0x3c]
mov dword [esi + 0xa8], eax
push ecx
call sym.ITEuDllvMgr.dll_SwapDWORD
lea edx, [esp + 0x54]
mov dword [esi + 0xac], eax
push edx
call sym.ITEuDllvMgr.dll_SwapDWORD
mov dword [esi + 0xb0], eax
lea eax, [esp + 0x50]
push eax
call sym.ITEuDllvMgr.dll_SwapDWORD
mov dword [esi + 0xb4], eax
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x44]
lea eax, [esp + 0x48]
add edx, ecx
push eax
mov dword [esp + 0x4c], edx
call sym.ITEuDllvMgr.dll_SwapDWORD
mov dword [esi + 0xb8], eax
mov ecx, dword [edi + 0x80bc]
mov eax, dword [esp + 0x58]
lea edx, [esp + 0x4c]
sub ecx, eax
push edx
mov dword [esp + 0x50], ecx
call sym.ITEuDllvMgr.dll_SwapDWORD
mov ebx, dword [esp + 0xbbc]
mov dword [esi + 0xbc], eax
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x4c]
add esp, 0x24
add ecx, eax
mov dword [edi + 0x80bc], ecx
mov byte [esp + 0x10], 0
mov edi, dword [esp + 0x10]
push ebp
push edi
push esi
push ebx
call sym.ITEuDllvMgr.dll_FLH_WriteCISTable
add esp, 0x10
test eax, eax
je 0x1015dbf4
mov al, byte [esp + 0x10]
inc al
cmp al, 2
mov byte [esp + 0x10], al
jb 0x1015db27
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0xba0]
lea edx, [esp + 0x19c]
push ecx
mov ecx, dword [esp + 0xba8]
push edx
push eax
push ebp
push ecx
push ebx
call fcn.101612a0
add esp, 0x18
cmp eax, 1
mov dword [esp + 0x14], eax
jne 0x1015d6f6
lea edx, [esp + 0x1dc]
lea eax, [esp + 0x27c]
push edx
lea ecx, [esp + 0x48]
push eax
mov eax, dword [esp + 0x2c]
lea edx, [esp + 0x304]
push ecx
push edx
push eax
lea ecx, [esp + 0x7a8]
push ebp
push ecx
call fcn.10160310
mov edi, dword [esp + 0xbb4]
add esp, 0x1c
xor bl, bl
mov byte [esp + 0x10], bl
mov esi, dword [esp + 0x10]
push ebp
lea edx, [esp + 0x798]
push esi
push edx
push edi
call sym.ITEuDllvMgr.dll_FLH_WriteRootTable
add esp, 0x10
test eax, eax
je 0x1015dc27
and esi, 0xff
inc bl
cmp bl, 2
mov byte [esp + 0x10], bl
mov byte [esp + esi + 0x22], 1
jb 0x1015dbc1
jmp 0x1015dc5a
and edi, 0xff
lea edx, [esp + edi*4 + 0x1a4]
push edx
call sym.ITEuDllvMgr.dll_SwapDWORD
push eax
mov eax, dword [esp + 0xba8]
push eax
push ebp
push ebx
call fcn.10163ce0
add esp, 0x14
mov dword [esp + 0x14], 0x2a
jmp 0x1015d6f6
and esi, 0xff
lea eax, [esp + esi*4 + 0x19c]
push eax
call sym.ITEuDllvMgr.dll_SwapDWORD
mov ecx, dword [esp + 0xba4]
push eax
push ecx
push ebp
push edi
call fcn.10163ce0
add esp, 0x14
mov dword [esp + 0x14], 0x29
jmp 0x1015d6f6
push edi
call fcn.1014f0c0
add esp, 4
cmp eax, 1
mov dword [esp + 0x14], eax
je 0x1015dc74
mov byte [ebp + 0x11c], al
jmp 0x1015dc90
push str._MP_CreateSystem_:_Create_System_Success._n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov dword [esp + 0x14], 1
jmp 0x1015dc90
mov byte [ebp + 0x11c], 0x3f
mov eax, dword [esp + 0x3c]
push eax
call fcn.101d1786
mov ecx, dword [esp + 0x28]
push ecx
call fcn.101d1786
mov eax, dword [esp + 0x1c]
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xb84
ret