Function at 0x1007be5
Capabilities:
Access peb ldr_data

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1b4
mov eax, dword [0x101a018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov dword [ebp - 0x1ac], eax
mov eax, dword [ebp + 0x14]
xor ebx, ebx
push 0x19c
mov dword [ebp - 0x1b4], eax
lea eax, [ebp - 0x1a0]
push ebx
push eax
mov esi, ecx
mov dword [ebp - 0x1a4], ebx
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x1b0], ebx
cmp dword [ebp + 8], ebx
je 0x1007c48
mov edi, dword [ebp + 0xc]
cmp edi, ebx
je 0x1007c48
cmp dword [ebp - 0x1ac], ebx
jne 0x1007c7a
mov ecx, 0x80070057
mov dword [ebp - 0x1a8], ecx
mov eax, dword [section..data]
cmp eax, section..data
je 0x1007e73
test byte [eax + 0x1c], 1
je 0x1007e73
push ecx
push 0x10017d4
push 0xa
jmp 0x1007e60
mov ecx, esi
call fcn.01007a59
test al, al
jne 0x1007c8a
cmp byte [esi + 0x18], bl
je 0x1007ce1
mov esi, 0x8000ffff
mov dword [ebp - 0x1a8], esi
mov eax, dword [section..data]
mov edi, section..data
cmp eax, edi
je 0x1007e73
test byte [eax + 0x1c], 2
mov ebx, 0x10017d4
je 0x1007cc6
push esi
push ebx
push 0xb
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01002fd5
mov eax, dword [section..data]
cmp eax, edi
je 0x1007e73
test byte [eax + 0x1c], 1
je 0x1007e73
push esi
push ebx
push 0xc
jmp 0x1007e60
lea eax, [ebp - 0x1b0]
push eax
push 2
pop ecx
mov eax, edi
mul ecx
push edx
push eax
call fcn.0101501a
cmp eax, ebx
mov dword [ebp - 0x1a8], eax
jge 0x1007d2c
mov eax, dword [section..data]
cmp eax, section..data
je 0x1007e73
test byte [eax + 0x1c], 1
je 0x1007e73
push dword [ebp - 0x1a8]
push 0x10017d4
push 0xd
jmp 0x1007e60
mov eax, dword fs:[0x18]
push dword [ebp - 0x1b0]
mov eax, dword [eax + 0x30]
push 8
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov dword [esi + 8], eax
cmp eax, ebx
jne 0x1007d7f
mov ecx, 0x8007000e
mov dword [ebp - 0x1a8], ecx
mov eax, dword [section..data]
cmp eax, section..data
je 0x1007e73
test byte [eax + 0x1c], 1
je 0x1007e73
push ecx
push 0x10017d4
push 0xe
jmp 0x1007e60
push dword [ebp + 8]
mov dword [esi + 0xc], edi
push edi
push eax
call fcn.01003716
cmp eax, ebx
mov dword [ebp - 0x1a8], eax
jge 0x1007dde
push dword [esi + 8]
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push ebx
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov eax, dword [section..data]
cmp eax, section..data
je 0x1007e73
test byte [eax + 0x1c], 1
je 0x1007e73
push dword [ebp - 0x1a8]
push 0x10017d4
push 0xf
jmp 0x1007e60
mov eax, dword [esi + 8]
mov dword [ebp - 0x1a4], eax
mov eax, dword [ebp - 0x1ac]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x1b4]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x1a4]
push eax
mov byte [esi + 0x18], 1
mov dword [ebp - 0x190], 0x10000000
call dword [sym.imp.ADVAPI32.dll_OpenTraceW]
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], edx
cmp eax, 0xffffffff
jne 0x1007e6d
cmp edx, ebx
jne 0x1007e6d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x1007e37
and eax, 0xffff
or eax, 0x80070000
cmp eax, ebx
mov dword [ebp - 0x1a8], eax
jge 0x1007e6d
mov eax, dword [section..data]
cmp eax, section..data
je 0x1007e73
test byte [eax + 0x1c], 1
je 0x1007e73
push dword [ebp - 0x1a8]
push 0x10017d4
push 0x10
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01002fd5
jmp 0x1007e73
mov dword [ebp - 0x1a8], ebx
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x1a8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01010f65
leave
ret 0x10