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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x8c
mov eax, dword [0x41c040]
xor eax, esp
mov dword [esp + 0x88], eax
and dword [esp + 8], 0
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0x24]
push ebx
mov ebx, dword [ebp + 0x1c]
push esi
mov esi, dword [ebp + 0x28]
push edi
mov edi, dword [ebp + 0x2c]
mov dword [esp + 0x18], esi
xor esi, esi
mov dword [esp + 0x1c], ecx
mov ecx, dword [ebp + 0xc]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x28], edx
mov dword [esp + 0x34], edi
mov dword [esp + 0x10], esi
test edi, edi
je 0x40a7ae
and dword [edi], esi
or dword [ecx], 0xffffffff
push dword [esp + 0x18]
test edx, edx
je 0x40a7d4
push edx
push dword [ebp + 0x20]
push ebx
push dword [ebp + 0x18]
push eax
push dword [ebp + 0x10]
push ecx
call dword [sym.imp.ntdll.dll_NtCreateKeyTransacted]
mov ebx, eax
mov dword [esp + 0x20], ebx
jmp 0x40a7ec
push dword [ebp + 0x20]
push ebx
push dword [ebp + 0x18]
push eax
push dword [ebp + 0x10]
push ecx
call dword [sym.imp.ntdll.dll_NtCreateKey]
mov ebx, eax
mov dword [esp + 0x20], eax
cmp ebx, 0xc000003a
je 0x40a800
cmp ebx, 0xc0000034
jne 0x40a942
mov eax, dword [ebp + 8]
test al, 4
je 0x40a92e
mov edi, dword [esp + 0x24]
lea edx, [esp + 0x38]
and eax, 0xfffffffb
mov dword [ebp + 8], eax
xor eax, eax
mov dword [esp + 0x38], eax
mov ecx, dword [edi + 8]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
call fcn.00418548
mov esi, eax
test esi, esi
js 0x40aa1e
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x54]
push eax
push 0x5c
push ecx
push ecx
push 2
lea edx, [esp + 0x50]
pop ecx
call fcn.00418745
mov esi, eax
test esi, esi
js 0x40aa1e
cmp dword [esp + 0x44], 0
jbe 0x40a90d
lea edx, [esp + 0x8c]
lea ecx, [esp + 0x50]
call fcn.004185d7
mov esi, eax
test esi, esi
js 0x40aa1e
push 6
pop ecx
mov esi, edi
or dword [esp + 0x5c], 0xffffffff
lea edi, [esp + 0x70]
rep movsd dword es:[edi], dword [esi]
lea eax, [esp + 0x8c]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x78], eax
xor esi, esi
lea eax, [esp + 0x88]
inc esi
push eax
push dword [esp + 0x1c]
lea eax, [esp + 0x78]
mov dword [esp + 0x90], esi
push dword [esp + 0x30]
push dword [ebp + 0x20]
push dword [esp + 0x3c]
push dword [ebp + 0x18]
push eax
push dword [ebp + 0x10]
lea eax, [esp + 0x7c]
push eax
mov eax, dword [ebp + 8]
or eax, 4
push eax
call fcn.0040a750
test eax, eax
jne 0x40a90d
cmp dword [esp + 0x88], esi
jne 0x40a90d
push dword [esp + 0x5c]
call dword [sym.imp.ntdll.dll_NtClose]
mov esi, dword [esp + 0x10]
test ebx, ebx
jns 0x40aa22
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x28]
mov ebx, dword [esp + 0x2c]
jmp 0x40a7b1
cmp ebx, 0xc0000034
jne 0x40a945
test al, 1
je 0x40a95d
push 2
pop eax
jmp 0x40aa25
mov eax, dword [ebp + 8]
cmp ebx, 0xc000003a
jne 0x40a955
test al, 2
je 0x40a95d
push 3
jmp 0x40a93c
test ebx, ebx
jns 0x40aa22
mov eax, dword [esp + 0x1c]
cmp byte [eax], 0
je 0x40a9ed
mov ecx, dword [esp + 0x14]
mov eax, ecx
or eax, esi
jne 0x40a9db
mov edi, dword [0x7ffe0004]
mov edx, 0x7ffe0324
mov dword [esp + 0x14], edi
mov ecx, dword [edx]
lea eax, [edx - 4]
mov esi, dword [eax]
add eax, 8
mov eax, dword [eax]
cmp ecx, eax
je 0x40a9ad
lea edi, [edx - 4]
lea ebx, [edx + 4]
pause
mov ecx, dword [edx]
mov esi, dword [edi]
mov eax, dword [ebx]
cmp ecx, eax
jne 0x40a999
mov ebx, dword [esp + 0x20]
mov edi, dword [esp + 0x14]
mov eax, ecx
mul edi
mov ecx, eax
mov eax, edx
shld eax, ecx, 8
mov dword [esp + 0x10], eax
mov eax, esi
mov esi, dword [esp + 0x10]
mul edi
shl ecx, 8
shrd eax, edx, 0x18
shr edx, 0x18
add ecx, eax
mov dword [esp + 0x14], ecx
adc esi, edx
mov dword [esp + 0x10], esi
push ecx
push esi
push ecx
mov ecx, dword [esp + 0x28]
push ebx
call fcn.004092ff
jmp 0x40a911
mov esi, ebx
mov dword [esp + 0x10], esi
and dword [esp + 0x6c], 0
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x14]
mov dword [esp + 0x64], 0x402b4c
mov dword [esp + 0x68], 0x402d40
mov dword [esp + 0x6c], 0x413
call fcn.00408a15
mov eax, esi
jmp 0x40aa31
xor eax, eax
inc eax
mov edi, dword [esp + 0x34]
test edi, edi
je 0x40aa2f
mov dword [edi], eax
xor eax, eax
mov ecx, dword [esp + 0x94]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0041ba49
mov esp, ebp
pop ebp
ret 0x28