Function at 0x4a0478
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push edi
xor edi, edi
cmp dword [ebp + 0x14], 2
mov dword [ebp - 4], edi
jne 0x4a049f
cmp dword [ebp + 0x18], 3
jg 0x528b11
cmp dword [ebp + 0x18], edi
jl 0x528b11
push ebx
mov ebx, dword [ebp + 8]
push esi
lea esi, [ebx + 0x18]
push esi
mov dword [ebp - 0xc], esi
call fcn.004a03f1
mov eax, dword [ebx + 0x90]
cmp eax, edi
jne 0x528b1b
mov dword [ebp - 4], edi
cmp dword [ebx + 0x94], edi
jne 0x528b31
mov dword [ebp - 8], edi
push 0x64546553
push 0x38
push edi
call sym.ntoskrnl.exe_ExAllocatePoolWithTag
mov esi, eax
cmp esi, edi
je 0x528b72
mov eax, dword [ebx + 0x58]
mov ebx, dword [ebx + 0x5c]
lea ecx, [ebp + 0xc]
push ecx
add eax, 0xa0
push eax
push ebx
push eax
push edi
push dword [ebp + 0x1c]
push dword [ebp + 0xc]
push dword [sym.ntoskrnl.exe_SeTokenObjectType]
push dword [ebp + 0x1c]
call sym.ntoskrnl.exe_ObCreateObject
mov ebx, dword [ebp + 0xc]
xor edi, edi
cmp eax, edi
mov dword [ebp + 0x1c], eax
jl 0x528b92
lea eax, [ebx + 0x10]
push eax
call fcn.0040c42a
mov eax, dword [ebp + 0x14]
mov dword [ebx + 0x80], eax
mov eax, dword [ebp + 0x18]
push esi
mov byte [ebx + 0x8c], 0
mov dword [ebx + 0x84], eax
mov dword [ebx + 0x30], esi
call sym.ntoskrnl.exe_ExInitializeResourceLite
mov eax, dword fs:[0x124]
dec dword [eax + 0xd4]
mov esi, dword [ebp + 8]
push 1
push dword [esi + 0x30]
call sym.ntoskrnl.exe_ExAcquireResourceSharedLite
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
mov dword [ebx + 0x18], ecx
mov eax, dword [eax + 4]
mov dword [ebx + 0x1c], eax
mov eax, dword [esi + 0x40]
mov dword [ebx + 0x40], eax
mov eax, dword [esi + 0x44]
mov dword [ebx + 0x44], eax
mov eax, dword [esi + 0x28]
mov dword [ebx + 0x28], eax
mov eax, dword [esi + 0x2c]
mov dword [ebx + 0x2c], eax
mov eax, dword [ebp + 8]
mov edi, ebx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov ecx, dword [eax + 0x5c]
and dword [ebx + 0x60], 0
mov dword [ebx + 0x5c], ecx
mov ecx, dword [eax + 0x64]
mov dword [ebx + 0x64], ecx
mov ecx, dword [eax + 0x4c]
mov dword [ebx + 0x4c], ecx
mov ecx, dword [eax + 0x50]
mov dword [ebx + 0x50], ecx
mov ecx, dword [eax + 0x54]
mov dword [ebx + 0x54], ecx
mov ecx, dword [eax + 0x58]
mov dword [ebx + 0x58], ecx
mov ecx, dword [eax + 0x88]
and ecx, 0xffffffdf
mov dword [ebx + 0x88], ecx
mov ecx, dword [ebp - 4]
mov dword [ebx + 0x90], ecx
mov ecx, dword [ebp - 8]
mov dword [ebx + 0x94], ecx
mov ecx, dword [eax + 0x48]
mov dword [ebx + 0x48], ecx
mov ecx, dword [eax + 0x38]
mov dword [ebx + 0x38], ecx
mov ecx, dword [eax + 0x3c]
mov dword [ebx + 0x3c], ecx
mov ecx, dword [eax + 0x20]
mov dword [ebx + 0x20], ecx
mov ecx, dword [eax + 0x24]
mov dword [ebx + 0x24], ecx
mov ecx, dword [eax + 0x98]
mov dword [ebx + 0x98], ecx
mov ecx, dword [eax + 0x9c]
mov dword [ebx + 0x9c], ecx
mov ecx, dword [eax + 0x58]
mov edx, ecx
shr ecx, 2
lea esi, [eax + 0xa0]
lea edi, [ebx + 0xa0]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebx
sub ecx, eax
add ecx, dword [eax + 0x68]
mov dword [ebx + 0x68], ecx
xor ecx, ecx
cmp dword [eax + 0x4c], ecx
jbe 0x4a0654
mov edx, dword [eax + 0x68]
mov edx, dword [edx + ecx*8]
mov esi, dword [ebx + 0x68]
sub edx, eax
add edx, ebx
mov dword [esi + ecx*8], edx
inc ecx
cmp ecx, dword [eax + 0x4c]
jb 0x4a063e
mov ecx, dword [eax + 0x6c]
test ecx, ecx
jne 0x4d607a
and dword [ebx + 0x6c], 0
cmp dword [eax + 0x54], 0
jbe 0x4a2a7c
mov ecx, dword [eax + 0x74]
sub ecx, eax
add ecx, ebx
mov dword [ebx + 0x74], ecx
mov ecx, dword [eax + 0x70]
movzx esi, byte [ecx + 1]
mov eax, dword [eax + 0x7c]
test eax, eax
lea esi, [esi*4 + 8]
je 0x4a0692
movzx eax, word [eax + 2]
add esi, eax
push 0x64546553
push esi
push 1
call sym.ntoskrnl.exe_ExAllocatePoolWithTag
test eax, eax
mov dword [ebp + 0x18], eax
mov dword [ebx + 0x78], eax
je 0x528bdb
mov edx, dword [ebp + 8]
mov ecx, esi
mov esi, dword [edx + 0x78]
mov edi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [edx + 0x7c]
test eax, eax
je 0x504131
sub eax, dword [edx + 0x78]
add eax, dword [ebp + 0x18]
mov dword [ebx + 0x7c], eax
mov esi, dword [edx + 0x70]
mov ecx, dword [edx + 0x30]
sub esi, dword [edx + 0x78]
call sym.ntoskrnl.exe_ExReleaseResourceLite
mov eax, dword fs:[0x124]
inc dword [eax + 0xd4]
jne 0x4a0700
lea ecx, [eax + 0x34]
cmp dword [ecx], ecx
jne 0x528c18
mov eax, dword [ebp + 0x18]
add eax, esi
cmp byte [ebp + 0x10], 0
mov dword [ebx + 0x70], eax
je 0x4a0714
push ebx
call fcn.004c19e1
lea eax, [ebx + 0x38]
mov ecx, dword [eax]
or ecx, dword [eax + 4]
je 0x4a0726
push 1
push eax
call fcn.00413ff9
mov eax, dword [ebp + 0x20]
mov dword [eax], ebx
mov eax, dword [ebp + 0x1c]
pop esi
pop ebx
pop edi
leave
ret 0x1c
and dword [ebx + 0x74], 0
jmp 0x4a0677
sub ecx, eax
add ecx, ebx
mov dword [ebx + 0x6c], ecx
xor ecx, ecx
cmp dword [eax + 0x50], ecx
ja 0x528bc0
jmp 0x4a0663
and dword [ebx + 0x7c], 0
jmp 0x4a06d9
mov eax, 0xc00000a5
jmp 0x4a0730
push eax
lea eax, [ebp - 4]
push eax
call fcn.00562193
cmp eax, edi
jge 0x4a04c1
mov edi, eax
jmp 0x528b53
push 0x20206553
push 0xc
push 1
call sym.ntoskrnl.exe_ExAllocatePoolWithTag
cmp eax, edi
mov dword [ebp - 8], eax
jne 0x528b60
push dword [ebp - 4]
call fcn.0056223c
mov edi, 0xc000009a
push esi
call fcn.004a02d3
mov eax, edi
jmp 0x4a072e
mov esi, dword [ebx + 0x94]
mov edi, eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
xor edi, edi
jmp 0x4a04d0
cmp dword [ebp - 8], edi
je 0x528b80
push edi
push dword [ebp - 8]
call sym.ntoskrnl.exe_ExFreePoolWithTag
push dword [ebp - 4]
call fcn.0056223c
push dword [ebp - 0xc]
call fcn.004a02d3
jmp 0x528c0e
push dword [ebp - 0xc]
call fcn.004a02d3
push dword [ebp - 4]
call fcn.0056223c
push edi
push esi
call sym.ntoskrnl.exe_ExFreePoolWithTag
cmp dword [ebp - 8], edi
je 0x4a072b
push edi
push dword [ebp - 8]
call sym.ntoskrnl.exe_ExFreePoolWithTag
jmp 0x4a072b
mov edx, dword [eax + 0x6c]
mov edx, dword [edx + ecx*8]
mov esi, dword [ebx + 0x6c]
sub edx, eax
add edx, ebx
mov dword [esi + ecx*8], edx
inc ecx
cmp ecx, dword [eax + 0x50]
jb 0x528bc0
jmp 0x4a0663
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x30]
call sym.ntoskrnl.exe_ExReleaseResourceLite
mov eax, dword fs:[0x124]
inc dword [eax + 0xd4]
jne 0x528c07
lea ecx, [eax + 0x34]
cmp dword [ecx], ecx
je 0x528c07
mov cl, 1
mov byte [eax + 0x49], 1
call dword [sym.imp.HAL.dll_HalRequestSoftwareInterrupt]
mov ecx, ebx
call sym.ntoskrnl.exe_ObfDereferenceObject
mov eax, 0xc000009a
jmp 0x4a072e
mov cl, 1
mov byte [eax + 0x49], 1
call dword [sym.imp.HAL.dll_HalRequestSoftwareInterrupt]
jmp 0x4a0700