Function at 0x40a4f0
Capabilities:
Complete processing asynchronous io request

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov ecx, dword [ebp + 8]
push ebx
push esi
xor esi, esi
mov dword [ebp - 4], esi
mov dword [ebp - 8], esi
test ecx, ecx
jne 0x40a511
mov ebx, 0xc0000141
jmp 0x40a841
mov eax, dword [ecx + 8]
or eax, dword [ecx + 0xc]
je 0x40a507
mov ebx, dword [ecx + 0xf0]
mov eax, dword [ecx + 0xf4]
mov dword [ebp - 0x24], eax
test ebx, ebx
je 0x40a507
lea eax, [ecx + 0x170]
push edi
mov edi, dword [eax]
mov dword [ebp - 0x1c], eax
test edi, edi
je 0x40a83b
cmp edi, eax
je 0x40a83b
mov eax, dword [edi]
cmp dword [eax + 4], edi
jne 0x40a849
mov edx, dword [edi + 4]
cmp dword [edx], edi
jne 0x40a849
mov dword [edx], eax
mov dword [eax + 4], edx
cmp dword [edi + 0xc], esi
jl 0x40a835
cmp dword [edi + 0x9c], esi
je 0x40a835
lea eax, [ecx + 0x3ac]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x28], eax
mov dl, byte [ecx]
mov ecx, eax
call dword [sym.imp.HAL.dll_KfReleaseSpinLock]
mov ecx, dword [edi + 0x9c]
lea eax, [ebp - 4]
push eax
mov eax, dword [edi + 0x98]
add eax, 0xa4
add eax, edi
push eax
lea eax, [ebp - 8]
push eax
push ecx
push ecx
push dword [edi + 0x10]
mov ecx, ebx
push dword [edi + 0x20]
push dword [edi + 0x1c]
push dword [edi + 0x28]
push dword [edi + 0x24]
push dword [ebp - 0x24]
call dword [0x40c0ec]
call ebx
mov ecx, dword [ebp - 0x28]
mov ebx, eax
call dword [sym.imp.HAL.dll_KfAcquireSpinLock]
mov ecx, dword [ebp + 0xc]
mov byte [ecx], al
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
or ecx, dword [eax + 0xc]
jne 0x40a61a
push edi
call fcn.004059ae
mov eax, dword [ebp - 4]
mov ebx, 0xc0000141
test eax, eax
je 0x40a840
xor ecx, ecx
add eax, 0x38
xchg dword [eax], ecx
mov eax, dword [ebp - 4]
push esi
mov dword [eax + 0x18], ebx
mov eax, dword [ebp - 4]
mov dword [eax + 0x1c], esi
push dword [ebp - 4]
call fcn.0040290c
jmp 0x40a840
mov ecx, 0xc000021b
cmp ebx, ecx
jne 0x40a62a
mov eax, esi
mov dword [ebp - 8], eax
jmp 0x40a637
mov eax, dword [ebp - 8]
test ebx, ebx
jne 0x40a637
test eax, eax
jne 0x40a637
mov ebx, ecx
mov ecx, dword [edi + 0x9c]
cmp eax, ecx
jae 0x40a671
cmp dword [ebp - 4], esi
je 0x40a671
sub ecx, eax
mov dword [edi + 0x9c], ecx
mov eax, dword [ebp - 8]
add dword [edi + 0x98], eax
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax]
cmp dword [ecx + 4], eax
jne 0x40a849
mov dword [edi], ecx
mov dword [edi + 4], eax
mov dword [ecx + 4], edi
mov dword [eax], edi
jmp 0x40a677
push edi
call fcn.004059ae
mov edx, dword [ebp - 4]
mov dword [ebp - 0x10], edx
test edx, edx
je 0x40a840
mov eax, dword [edx + 0x60]
mov dword [ebp - 0x18], esi
mov ecx, dword [eax + 4]
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x2c], eax
mov eax, dword [edx + 4]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x24], eax
test eax, eax
jne 0x40a6ab
mov dword [edx + 0x18], esi
mov ebx, esi
jmp 0x40a80c
mov edi, dword [eax + 0x14]
mov dword [ebp - 0xc], edi
test ecx, ecx
jne 0x40a6ba
mov dword [ebp - 0x14], edi
jmp 0x40a6c4
cmp edi, ecx
jbe 0x40a6c4
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x14], ecx
test byte [eax + 6], 5
je 0x40a6cf
mov eax, dword [eax + 0xc]
jmp 0x40a6e0
push 0x20
push esi
push esi
push 1
push esi
push eax
call dword [sym.imp.ntoskrnl.exe_MmMapLockedPagesSpecifyCache]
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x20], eax
test eax, eax
je 0x40a6a1
mov eax, dword [ebp - 0x1c]
mov edi, dword [eax]
cmp edi, eax
je 0x40a7f5
mov ebx, dword [edi + 0xc]
test ebx, ebx
jns 0x40a736
mov ecx, dword [edi]
cmp dword [ecx + 4], edi
jne 0x40a849
mov eax, dword [edi + 4]
cmp dword [eax], edi
jne 0x40a849
mov dword [eax], ecx
push edi
mov dword [ecx + 4], eax
call fcn.004059ae
mov edx, dword [ebp - 0x10]
xor ecx, ecx
lea eax, [edx + 0x58]
mov dword [eax + 4], eax
mov dword [eax], eax
lea eax, [edx + 0x38]
xchg dword [eax], ecx
mov dword [edx + 0x18], ebx
jmp 0x40a80c
mov ebx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0xc]
mov eax, ebx
mov dword [ebp - 0x14], eax
cmp ebx, ecx
jbe 0x40a74d
mov eax, ecx
mov dword [ebp - 0x14], ecx
mov ecx, dword [edi + 0x9c]
cmp eax, ecx
jbe 0x40a75c
mov eax, ecx
mov dword [ebp - 0x14], eax
push eax
mov eax, dword [edi + 0x98]
add eax, 0xa4
add eax, edi
push eax
push edx
call sub.ntoskrnl.exe_memcpy
mov eax, dword [ebp - 0x14]
add esp, 0xc
add dword [ebp - 0x18], eax
sub ebx, eax
mov ecx, dword [edi + 0x9c]
cmp eax, ecx
jae 0x40a796
sub ecx, eax
add dword [edi + 0x98], eax
mov dword [edi + 0x9c], ecx
jmp 0x40a798
je 0x40a7d3
mov eax, dword [ebp - 0x24]
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
test eax, eax
je 0x40a7f2
mov ecx, dword [eax + 0x14]
mov dword [ebp - 0xc], ecx
cmp ecx, ebx
jbe 0x40a7b3
mov ecx, ebx
mov dword [ebp - 0xc], ebx
test byte [eax + 6], 5
je 0x40a7be
mov edx, dword [eax + 0xc]
jmp 0x40a73f
push 0x20
push esi
push esi
push 1
push esi
push eax
call dword [sym.imp.ntoskrnl.exe_MmMapLockedPagesSpecifyCache]
mov edx, eax
jmp 0x40a73c
test byte [ebp - 0x2c], 0x80
jne 0x40a7f2
mov eax, dword [edi]
cmp dword [eax + 4], edi
jne 0x40a849
mov ecx, dword [edi + 4]
cmp dword [ecx], edi
jne 0x40a849
mov dword [ecx], eax
push edi
mov dword [eax + 4], ecx
call fcn.004059ae
mov edx, dword [ebp - 0x10]
lea eax, [edx + 0x58]
xor ecx, ecx
mov dword [eax + 4], eax
mov dword [eax], eax
lea eax, [edx + 0x38]
xchg dword [eax], ecx
mov dword [edx + 0x18], esi
mov ebx, esi
mov esi, dword [ebp - 0x18]
mov edi, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x28]
mov dword [edx + 0x1c], esi
mov dl, byte [edi]
call dword [sym.imp.HAL.dll_KfReleaseSpinLock]
mov ecx, dword [ebp - 4]
xor dl, dl
call dword [sym.imp.ntoskrnl.exe_IofCompleteRequest]
mov ecx, dword [ebp - 0x28]
call dword [sym.imp.HAL.dll_KfAcquireSpinLock]
mov byte [edi], al
jmp 0x40a840
push edi
call fcn.004059ae
mov ebx, 0xc0000141
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret 8
push 3
pop ecx
int 0x29
int3