Function at 0x10152100
Capabilities:
Print debug messages

Disassembly:
sub esp, 0x114
push ebx
mov ebx, dword [esp + 0x11c]
xor eax, eax
mov ecx, ebx
mov dword [esp + 0x10], eax
mov dword [esp + 8], eax
mov dword [esp + 4], eax
mov dword [ecx], eax
push ebp
push esi
push edi
mov dword [ecx + 4], eax
mov ecx, 0x41
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
cmp dword [esp + 0x13c], 0xffffffff
je 0x10152424
mov esi, dword [esp + 0x134]
cmp esi, 8
jb 0x101522a8
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
push edx
push eax
push 3
push 0x50
call fcn.10152090
add esp, 0x10
test eax, eax
je 0x10152424
mov esi, dword [esp + 0x14]
mov ecx, 0x14
xor eax, eax
mov edi, esi
mov edx, dword [esp + 0x138]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x134]
mov byte [esi + 3], al
mov byte [esi + 4], al
mov byte [esi + 5], al
mov al, byte [esp + 0x130]
mov dword [esi + 0xc], ecx
movsx edi, al
xor cl, cl
mov word [esi], 0x2c
test edi, edi
mov byte [esi + 6], al
mov byte [esi + 7], 0x18
mov byte [esi + 8], 1
mov dword [esi + 0x10], 0xf
mov dword [esi + 0x14], edx
mov dword [esi + 0x18], 0x30
jle 0x101521ea
mov ebp, dword [esp + 0x12c]
xor eax, eax
mov dl, byte [eax + ebp]
inc cl
mov byte [esp + 0x18], cl
mov byte [eax + esi + 0x1c], dl
mov eax, dword [esp + 0x18]
and eax, 0xff
cmp eax, edi
jl 0x101521d0
mov ecx, dword [esp + 0x13c]
lea eax, [esp + 0x1c]
push 0
push eax
push 0x50
push esi
push 0x50
push esi
push 0x4d014
push ecx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov byte [ebx], al
mov dl, byte [esi + 2]
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov byte [ebx + 1], dl
mov cl, byte [esi + 0x32]
mov byte [ebx + 2], cl
mov cl, byte [esi + 2]
test cl, cl
jne 0x10152246
test eax, eax
je 0x1015224a
mov edx, dword [esp + 0x10]
push edx
call fcn.10034678
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret
test eax, eax
jne 0x1015226d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 4], eax
push eax
lea eax, [esp + 0x24]
push str._ReadCMD_:_Cmd_fail._Windows_Error_Code_ld_n
push eax
call fcn.1003399c
add esp, 0xc
lea ecx, [esp + 0x20]
push ecx
call edi
xor edx, edx
xor eax, eax
mov dl, byte [esi + 2]
mov al, byte [esi + 0x22]
push edx
xor ecx, ecx
mov cl, byte [esi + 0x1d]
xor edx, edx
mov dl, byte [esi + 0x1c]
push eax
push ecx
push edx
lea eax, [esp + 0x30]
push str._ReadCMD_:_Cmd_fail_0x_lx_0x_lx_0x_lx_._ScsiStatus0x_x_n
push eax
call fcn.1003399c
add esp, 0x18
lea ecx, [esp + 0x20]
push ecx
call edi
mov edx, dword [esp + 0x10]
push edx
jmp 0x1015241c
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
push ecx
push 3
push 0x250
call fcn.10152090
add esp, 0x10
test eax, eax
je 0x10152424
mov edi, dword [esp + 0x14]
mov ecx, 0x94
mov ebp, edi
xor eax, eax
rep stosd dword es:[edi], eax
mov byte [ebp + 3], al
mov byte [ebp + 4], al
mov byte [ebp + 5], al
mov al, byte [esp + 0x130]
movsx edi, al
xor cl, cl
mov word [ebp], 0x2c
test edi, edi
mov byte [ebp + 6], al
mov byte [ebp + 7], 0x18
mov byte [ebp + 8], 1
mov dword [ebp + 0xc], esi
mov dword [ebp + 0x10], 0xf
mov dword [ebp + 0x14], 0x50
mov dword [ebp + 0x18], 0x30
jle 0x10152344
mov esi, dword [esp + 0x12c]
xor eax, eax
mov dl, byte [eax + esi]
inc cl
mov byte [esp + 0x18], cl
mov byte [eax + ebp + 0x1c], dl
mov eax, dword [esp + 0x18]
and eax, 0xff
cmp eax, edi
jl 0x10152323
mov esi, dword [esp + 0x134]
mov eax, dword [ebp + 0xc]
mov edx, dword [esp + 0x13c]
lea ecx, [esp + 0x1c]
add eax, 0x50
push 0
push ecx
push eax
push ebp
push 0x2c
push ebp
push 0x4d004
push edx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov byte [ebx], al
mov cl, byte [ebp + 2]
mov edi, dword [esp + 0x138]
mov byte [ebx + 1], cl
mov dl, byte [ebp + 0x32]
mov ecx, esi
mov byte [ebx + 2], dl
mov edx, ecx
lea esi, [ebp + 0x50]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov cl, byte [ebp + 2]
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
test cl, cl
jne 0x101523bf
test eax, eax
je 0x101523c3
mov eax, dword [esp + 0x10]
push eax
call fcn.10034678
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret
test eax, eax
jne 0x101523e6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 0x24]
push str._ReadCMD_:_Cmd_fail._Windows_Error_Code_ld_n
push ecx
mov dword [ebx + 4], eax
call fcn.1003399c
add esp, 0xc
lea edx, [esp + 0x20]
push edx
call esi
xor eax, eax
xor ecx, ecx
mov al, byte [ebp + 2]
mov cl, byte [ebp + 0x22]
push eax
xor edx, edx
mov dl, byte [ebp + 0x1d]
xor eax, eax
mov al, byte [ebp + 0x1c]
push ecx
push edx
push eax
lea ecx, [esp + 0x30]
push str._ReadCMD_:_Cmd_fail_0x_lx_0x_lx_0x_lx_._ScsiStatus0x_x_n
push ecx
call fcn.1003399c
add esp, 0x18
lea edx, [esp + 0x20]
push edx
call esi
mov eax, dword [esp + 0x10]
push eax
call fcn.10034678
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x114
ret