Function at 0x409b00
Capabilities:
Print debug messages

Disassembly:
sub esp, 0x87c
mov eax, dword [0x42c2f0]
xor eax, esp
mov dword [esp + 0x874], eax
push ebx
push ebp
push esi
push edi
xor ebx, ebx
push 0x103
lea eax, [esp + 0x56d]
mov esi, ecx
push ebx
push eax
mov dword [esp + 0x28], esi
mov dword [esp + 0x1c], ebx
mov byte [esp + 0x574], bl
call fcn.00412200
push 0x103
lea ecx, [esp + 0x471]
push ebx
push ecx
mov byte [esp + 0x478], bl
call fcn.00412200
mov ebp, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov edi, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
add esp, 0x18
mov byte [esi], bl
mov dword [esp + 0x14], ebx
lea ecx, [ecx]
cmp ebx, 0x10
jge 0x409e08
push ebx
lea edx, [esp + 0x56c]
push str..PhysicalDrive_d
push edx
call fcn.0040fac5
add esp, 0xc
push 0
push 0
push 3
push 0
push 3
push 0xc0000000
lea eax, [esp + 0x580]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x409be6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 0x56c]
push ecx
lea edx, [esp + 0x468]
push str.R_D_I_W_A_R_e1____C_F__.failed__szDriveName:_s__dwErrCode:_lu_n
push edx
call fcn.0040fac5
add esp, 0x10
lea eax, [esp + 0x460]
push eax
call ebp
jmp 0x409df6
xor eax, eax
push eax
lea ecx, [esp + 0x1c]
push ecx
push 0x18
lea edx, [esp + 0x2c]
push edx
push eax
push eax
push 0x74080
push esi
mov byte [esp + 0x40], 0
mov dword [esp + 0x41], eax
mov dword [esp + 0x45], eax
mov dword [esp + 0x49], eax
mov dword [esp + 0x4d], eax
mov dword [esp + 0x51], eax
mov word [esp + 0x55], ax
mov byte [esp + 0x57], al
mov dword [esp + 0x38], eax
call edi
test eax, eax
jne 0x409c42
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x56c]
push eax
push str.R_D_I_W_A_R_e2____D_I_C_S_G_V_.failed__szDriveName:_s__dwErrCode:_lu_n
jmp 0x409d61
mov bl, byte [esp + 0x23]
test bl, bl
ja 0x409c7a
lea eax, [esp + 0x568]
push eax
movzx ecx, bl
push ecx
lea edx, [esp + 0x468]
push str.R_D_I_W_A_R_e3____stVersionParams.bIDEDeviceMap__d____0__szDriveName:_s_n
push edx
call fcn.0040fac5
add esp, 0x10
lea eax, [esp + 0x460]
push eax
call ebp
jmp 0x409deb
push 0x20f
lea ecx, [esp + 0x675]
push 0
push ecx
mov byte [esp + 0x67c], 0
call fcn.00412200
xor eax, eax
add esp, 0xc
mov dword [esp + 0x440], eax
mov dword [esp + 0x444], eax
mov dword [esp + 0x448], eax
mov dword [esp + 0x44c], eax
mov dword [esp + 0x450], eax
mov dword [esp + 0x454], eax
mov dword [esp + 0x458], eax
mov byte [esp + 0x45c], al
mov al, byte [esp + 0x14]
push 0
mov cl, al
shr bl, cl
mov dl, al
and dl, 1
mov byte [esp + 0x44c], al
lea eax, [esp + 0x1c]
push eax
push 0x210
or dl, 0xfa
shl dl, 4
and bl, 0x10
lea ecx, [esp + 0x67c]
push ecx
neg bl
push 0x20
mov byte [esp + 0x459], dl
sbb bl, bl
lea edx, [esp + 0x450]
push edx
and bl, 0xb5
push 0x7c088
add bl, 0xec
push esi
mov byte [esp + 0x461], 1
mov byte [esp + 0x462], 1
mov byte [esp + 0x466], bl
mov dword [esp + 0x45c], 0x200
call edi
test eax, eax
jne 0x409d7d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x56c]
push eax
push str.R_D_I_W_A_R_e4____D_I_C_S_R_D_D_.failed__szDriveName:_s__dwErrCode:_lu_n
lea ecx, [esp + 0x46c]
push ecx
call fcn.0040fac5
add esp, 0x10
lea edx, [esp + 0x460]
push edx
call ebp
jmp 0x409deb
xor eax, eax
nop
movzx ecx, word [esp + eax*2 + 0x680]
mov dword [esp + eax*4 + 0x38], ecx
add eax, 1
cmp eax, 0x100
jl 0x409d80
mov ebx, dword [esp + 0x1c]
mov ecx, ebx
lea eax, [esp + 0x38]
call fcn.004098f0
mov eax, ebx
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x409db0
sub eax, edx
push eax
lea edx, [esp + 0x56c]
push edx
lea eax, [esp + 0x468]
push str.R_D_I_W_A_R_OK____succeed__szDriveName:_s__nSnLength:_d_n
push eax
call fcn.0040fac5
add esp, 0x10
lea ecx, [esp + 0x460]
push ecx
call ebp
mov dword [esp + 0x10], 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [esp + 0x14]
add ebx, 1
cmp dword [esp + 0x10], 0
mov dword [esp + 0x14], ebx
je 0x409b70
mov ecx, dword [esp + 0x884]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040fbc6
add esp, 0x87c
ret