Function at 0x40fd70
Capabilities:
Print debug messages

Disassembly:
push 0xffffffffffffffff
push 0x445fb8
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x45accc]
xor eax, esp
mov dword [esp + 0x74], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x45accc]
xor eax, esp
push eax
lea eax, [esp + 0x8c]
mov dword fs:[0], eax
mov eax, dword [esp + 0xa0]
mov edi, ecx
mov ecx, dword [esp + 0xa8]
xor esi, esi
mov dword [esp + 0x28], eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x34], esi
call fcn.0041aec8
xor ecx, ecx
cmp eax, esi
setne cl
cmp ecx, esi
jne 0x40fddd
push 0x80004005
call fcn.00401460
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x20], eax
mov dword [esp + 0x94], esi
call fcn.0041aec8
xor ecx, ecx
cmp eax, esi
setne cl
cmp ecx, esi
jne 0x40fe0e
push 0x80004005
call fcn.00401460
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ebx, [eax + 0x10]
mov dword [esp + 0x18], ebx
mov byte [esp + 0x94], 1
mov ecx, dword [esp + 0x9c]
push ecx
mov ecx, edi
call fcn.0040fba0
mov ebp, eax
mov dword [esp + 0x2c], ebp
cmp ebp, 0xffffffff
jne 0x40febd
push esi
lea edx, [esp + 0x1c]
push str.__Error___Create_Handle_Fail__d__r_n
push edx
call fcn.004026d0
mov ebx, dword [esp + 0x24]
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push ecx
lea eax, [ebx - 0x10]
mov dword [esp + 0x28], esp
mov ebp, esp
push eax
call fcn.00404380
add eax, 0x10
mov dword [ebp], eax
mov eax, dword [edi + 0x18]
sub eax, 0x10
mov dword [esp + 0x1c], esp
mov ebp, esp
push eax
mov byte [esp + 0xa0], 2
call fcn.00404380
add eax, 0x10
mov dword [ebp], eax
add esp, 4
lea ecx, [edi + 0x14]
mov byte [esp + 0x9c], 1
call fcn.0040fc20
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
inc esi
cmp esi, 0x32
jl 0x40fe26
mov ebp, dword [esp + 0x2c]
cmp esi, 0x32
jne 0x40ff80
lea eax, [esp + 0x18]
push str.__Error___Create_Handle_Fail__r_n
push eax
call fcn.004026d0
mov esi, dword [esp + 0x20]
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push ecx
add esi, 0xfffffff0
mov dword [esp + 0x28], esp
mov ebx, esp
push esi
call fcn.00404380
add eax, 0x10
mov dword [ebx], eax
mov eax, dword [edi + 0x18]
sub eax, 0x10
mov dword [esp + 0x1c], esp
mov ebx, esp
push eax
mov byte [esp + 0xa0], 3
call fcn.00404380
add eax, 0x10
mov dword [ebx], eax
add esp, 4
lea ecx, [edi + 0x14]
mov byte [esp + 0x9c], 1
call fcn.0040fc20
mov byte [esp + 0x94], 0
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ff4b
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov dword [esp + 0x94], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ff76
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 0xffffff00
jmp 0x410464
mov esi, dword [esp + 0xac]
test esi, esi
jne 0x40ff90
lea eax, [esi + 2]
jmp 0x40ff9c
xor eax, eax
cmp byte [esp + 0xa4], al
setne al
mov ecx, dword [esp + 0x28]
push 0xa
push esi
push eax
push ecx
push 0x10
lea edx, [esp + 0x4c]
push edx
mov ecx, edi
call fcn.0040fb30
push 0
lea eax, [esp + 0x38]
push eax
push 0x50
lea ecx, [esp + 0x44]
push ecx
push 0x50
neg esi
mov edx, ecx
push edx
sbb esi, esi
and esi, dword [esp + 0x34]
push 0x4d014
push ebp
mov dword [esp + 0x6c], esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x28], eax
xor esi, esi
jmp 0x40fff4
mov ebp, dword [esp + 0x2c]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x410130
inc esi
push esi
lea eax, [esp + 0x1c]
push str.__Error___Close_Handle_Fail__d__r_n
push eax
mov dword [esp + 0x20], esi
call fcn.004026d0
mov ebx, dword [esp + 0x24]
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push ecx
mov ecx, dword [ebx - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
lea esi, [ebx - 0x10]
mov dword [esp + 0x34], esp
mov dword [esp + 0x20], esp
call eax
cmp dword [esi + 0xc], 0
lea edx, [esi + 0xc]
jl 0x410056
cmp eax, dword [esi]
jne 0x410056
mov ebp, esi
mov ecx, 1
lock xadd dword [edx], ecx
jmp 0x41008a
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 1
push ecx
mov ecx, eax
call edx
mov ebp, eax
test ebp, ebp
je 0x41019a
mov eax, dword [esi + 4]
mov dword [ebp + 4], eax
mov eax, dword [esi + 4]
inc eax
push eax
add esi, 0x10
push esi
push eax
lea ecx, [ebp + 0x10]
push ecx
call fcn.004313eb
add esp, 0x10
mov edx, dword [esp + 0x20]
add ebp, 0x10
mov dword [edx], ebp
mov esi, dword [edi + 0x18]
push ecx
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
sub esi, 0x10
mov dword [esp + 0x24], esp
mov byte [esp + 0x9c], 4
mov dword [esp + 0x24], esp
call edx
cmp dword [esi + 0xc], 0
lea edx, [esi + 0xc]
jl 0x4100ce
cmp eax, dword [esi]
jne 0x4100ce
mov ebp, esi
mov eax, 1
lock xadd dword [edx], eax
jmp 0x410102
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 1
push ecx
mov ecx, eax
call edx
mov ebp, eax
test ebp, ebp
je 0x41019a
mov eax, dword [esi + 4]
mov dword [ebp + 4], eax
mov eax, dword [esi + 4]
inc eax
push eax
add esi, 0x10
push esi
push eax
lea ecx, [ebp + 0x10]
push ecx
call fcn.004313eb
add esp, 0x10
mov edx, dword [esp + 0x24]
add ebp, 0x10
mov dword [edx], ebp
lea ecx, [edi + 0x14]
mov byte [esp + 0x9c], 1
call fcn.0040fc20
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, dword [esp + 0x14]
cmp esi, 0x32
jl 0x40fff0
cmp esi, 0x32
jne 0x41024d
lea eax, [esp + 0x18]
push str.__Error___Close_Handle_Fail_r_n
push eax
call fcn.004026d0
mov ebx, dword [esp + 0x20]
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push ecx
mov ecx, dword [ebx - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
lea esi, [ebx - 0x10]
mov dword [esp + 0x34], esp
mov dword [esp + 0x18], esp
call eax
cmp dword [esi + 0xc], 0
lea ecx, [esi + 0xc]
jl 0x410186
cmp eax, dword [esi]
jne 0x410186
mov ebp, esi
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x4101bb
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 1
push ecx
mov ecx, eax
call edx
mov ebp, eax
test ebp, ebp
jne 0x41019f
call fcn.004016b0
mov eax, dword [esi + 4]
mov dword [ebp + 4], eax
mov eax, dword [esi + 4]
inc eax
push eax
add esi, 0x10
push esi
push eax
lea ecx, [ebp + 0x10]
push ecx
call fcn.004313eb
add esp, 0x10
mov edx, dword [esp + 0x18]
add ebp, 0x10
mov dword [edx], ebp
mov esi, dword [edi + 0x18]
push ecx
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
sub esi, 0x10
mov dword [esp + 0x1c], esp
mov byte [esp + 0x9c], 5
mov dword [esp + 0x1c], esp
call edx
cmp dword [esi + 0xc], 0
lea edx, [esi + 0xc]
jl 0x4101ff
cmp eax, dword [esi]
jne 0x4101ff
mov ebp, esi
mov eax, 1
lock xadd dword [edx], eax
jmp 0x410234
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 1
push ecx
mov ecx, eax
call edx
mov ebp, eax
test ebp, ebp
jne 0x410218
call fcn.004016b0
mov eax, dword [esi + 4]
mov dword [ebp + 4], eax
mov eax, dword [esi + 4]
inc eax
push eax
add esi, 0x10
push esi
push eax
lea ecx, [ebp + 0x10]
push ecx
call fcn.004313eb
add esp, 0x10
mov edx, dword [esp + 0x1c]
add ebp, 0x10
mov dword [edx], ebp
lea ecx, [edi + 0x14]
mov byte [esp + 0x9c], 1
call fcn.0040fc20
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4103bf
push eax
lea eax, [esp + 0x1c]
push str._SCSI_COMMAND_ERROR___d__r_n
push eax
call fcn.004026d0
mov ebp, dword [esp + 0x24]
add esp, 0xc
push ebp
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push ecx
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
add ebp, 0xfffffff0
mov dword [esp + 0x34], esp
mov ebx, esp
call eax
cmp dword [ebp + 0xc], 0
lea ecx, [ebp + 0xc]
jl 0x4102a6
cmp eax, dword [ebp]
jne 0x4102a6
mov esi, ebp
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x4102db
mov ecx, dword [ebp + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 1
push ecx
mov ecx, eax
call edx
mov esi, eax
test esi, esi
jne 0x4102bf
call fcn.004016b0
mov eax, dword [ebp + 4]
mov dword [esi + 4], eax
mov eax, dword [ebp + 4]
inc eax
push eax
lea ecx, [ebp + 0x10]
push ecx
push eax
lea edx, [esi + 0x10]
push edx
call fcn.004313eb
add esp, 0x10
add esi, 0x10
mov dword [ebx], esi
mov esi, dword [edi + 0x18]
push ecx
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
sub esi, 0x10
mov byte [esp + 0x9c], 6
mov dword [esp + 0x2c], esp
mov dword [esp + 0x1c], esp
call edx
cmp dword [esi + 0xc], 0
lea edx, [esi + 0xc]
jl 0x41031b
cmp eax, dword [esi]
jne 0x41031b
mov ebx, esi
mov eax, 1
lock xadd dword [edx], eax
jmp 0x410350
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 1
push ecx
mov ecx, eax
call edx
mov ebx, eax
test ebx, ebx
jne 0x410334
call fcn.004016b0
mov eax, dword [esi + 4]
mov dword [ebx + 4], eax
mov eax, dword [esi + 4]
inc eax
push eax
add esi, 0x10
push esi
push eax
lea ecx, [ebx + 0x10]
push ecx
call fcn.004313eb
add esp, 0x10
mov edx, dword [esp + 0x1c]
add ebx, 0x10
mov dword [edx], ebx
lea ecx, [edi + 0x14]
mov byte [esp + 0x9c], 1
call fcn.0040fc20
mov byte [esp + 0x94], 0
lea eax, [ebp + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x41038b
mov ecx, dword [ebp]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebp
call eax
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov dword [esp + 0x94], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4103b6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x28]
jmp 0x410464
add ebx, 0xfffffff0
or edx, 0xffffffff
cmp dword [esp + 0x24], 0
mov byte [esp + 0x94], 0
lea ecx, [ebx + 0xc]
je 0x410428
movzx esi, byte [esp + 0x3a]
neg esi
lock xadd dword [ecx], edx
dec edx
cmp esi, 0xfe
je 0x41042d
test edx, edx
jg 0x4103f9
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov dword [esp + 0x94], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x410424
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
jmp 0x410464
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41043b
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov dword [esp + 0x94], edx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x410462
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x8c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x74]
xor ecx, esp
call fcn.00431b39
add esp, 0x84
ret 0x14