Function at 0x40a810
Capabilities:
Check for peb beingdebugged flag
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x4836a1
mov eax, dword fs:[0]
push eax
sub esp, 0x54
mov eax, dword [0x4ace78]
xor eax, esp
mov dword [esp + 0x50], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4ace78]
xor eax, esp
push eax
lea eax, [esp + 0x68]
mov dword fs:[0], eax
mov eax, dword [esp + 0x78]
mov edi, dword [esp + 0x7c]
xor ebx, ebx
mov dword [esp + 0x18], ebx
mov ecx, dword [str.AHCIJEFOUG]
mov edx, dword [0x48c8d8]
mov dword [esp + 0x1c], eax
mov eax, dword [0x48c8dc]
mov dword [esp + 0x4c], ecx
mov ecx, dword [0x48c8e0]
mov dword [esp + 0x54], eax
mov ax, word [0x48c8e8]
mov dword [esp + 0x50], edx
mov edx, dword [0x48c8e4]
mov dword [esp + 0x58], ecx
movzx ecx, word [esp + 0x4c]
mov dword [esp + 0x5c], edx
movzx edx, word [esp + 0x4e]
mov word [esp + 0x60], ax
movzx eax, word [esp + 0x50]
mov dword [esp + 0x20], ecx
movzx ecx, word [esp + 0x52]
mov dword [esp + 0x28], eax
movzx eax, word [esp + 0x56]
mov dword [esp + 0x24], edx
movzx edx, word [esp + 0x54]
mov dword [esp + 0x2c], ecx
movzx ecx, word [esp + 0x58]
mov dword [esp + 0x34], eax
movzx eax, word [esp + 0x5c]
mov dword [esp + 0x30], edx
movzx edx, word [esp + 0x5a]
mov dword [esp + 0x38], ecx
movzx ecx, word [esp + 0x5e]
mov dword [esp + 0x40], eax
mov eax, edi
mov dword [esp + 0x3c], edx
mov dword [esp + 0x70], ebx
mov dword [esp + 0x44], ecx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40a8f3
sub eax, edx
sar eax, 1
lea edx, [esp + 0x20]
mov ebp, eax
xor esi, esi
mov dword [esp + 0x14], edx
mov edi, edi
xor ecx, ecx
cmp ebp, ebx
jle 0x40a943
mov eax, dword [edx]
movzx edx, word [edi + ecx*2]
add eax, edx
mov edx, ecx
shr edx, 1
movzx edx, word [edi + edx*2]
add eax, edx
add eax, esi
add eax, ecx
cdq
mov ebx, 0xc7
idiv ebx
inc ecx
cmp ecx, ebp
mov eax, edx
jl 0x40a918
mov edx, dword [esp + 0x14]
mov dword [edx], eax
xor ebx, ebx
inc esi
add edx, 4
cmp esi, 0xa
mov dword [esp + 0x14], edx
jl 0x40a910
call fcn.0044ba42
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40a96a
push 0x80004005
call fcn.00401280
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
mov ebp, dword [esp + 0x1c]
add eax, 0x10
mov dword [ebp], eax
mov dword [esp + 0x70], ebx
mov dword [esp + 0x18], 1
xor edi, edi
jmp 0x40a990
mov esi, dword [esp + edi*4 + 0x20]
and esi, 0x8000000f
jns 0x40a9a1
dec esi
or esi, 0xfffffff0
inc esi
mov dword [esp + edi*4 + 0x20], esi
call fcn.0044ba42
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
je 0x40a960
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
push esi
lea ecx, [esp + 0x18]
push 0x48c8cc
push ecx
mov dword [esp + 0x7c], 1
call fcn.00403ae0
mov esi, dword [esp + 0x20]
mov eax, dword [esi - 0xc]
add esp, 0xc
push eax
push esi
mov ecx, ebp
call fcn.00403a20
lea eax, [esi - 0x10]
mov byte [esp + 0x70], bl
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40aa10
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
inc edi
cmp edi, 0xa
jl 0x40a990
push 0x48c8c8
push 4
mov ecx, ebp
call fcn.004018c0
mov eax, ebp
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.0046b9a8
add esp, 0x60
ret