Function at 0x1007bbe
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 0x1007c21
mov edi, dword [ebp + 0xc]
cmp edi, ebx
je 0x1007c21
cmp dword [ebp - 0x1ac], ebx
jne 0x1007c53
mov ecx, 0x80070057
mov dword [ebp - 0x1a8], ecx
mov eax, dword [section..data]
cmp eax, section..data
je 0x1007e4c
test byte [eax + 0x1c], 1
je 0x1007e4c
push ecx
push 0x10017d4
push 0xa
jmp 0x1007e39
mov ecx, esi
call fcn.01007a32
test al, al
jne 0x1007c63
cmp byte [esi + 0x18], bl
je 0x1007cba
mov esi, 0x8000ffff
mov dword [ebp - 0x1a8], esi
mov eax, dword [section..data]
mov edi, section..data
cmp eax, edi
je 0x1007e4c
test byte [eax + 0x1c], 2
mov ebx, 0x10017d4
je 0x1007c9f
push esi
push ebx
push 0xb
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01003005
mov eax, dword [section..data]
cmp eax, edi
je 0x1007e4c
test byte [eax + 0x1c], 1
je 0x1007e4c
push esi
push ebx
push 0xc
jmp 0x1007e39
lea eax, [ebp - 0x1b0]
push eax
push 2
pop ecx
mov eax, edi
mul ecx
push edx
push eax
call fcn.01007ef3
cmp eax, ebx
mov dword [ebp - 0x1a8], eax
jge 0x1007d05
mov eax, dword [section..data]
cmp eax, section..data
je 0x1007e4c
test byte [eax + 0x1c], 1
je 0x1007e4c
push dword [ebp - 0x1a8]
push 0x10017d4
push 0xd
jmp 0x1007e39
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 0x1007d58
mov ecx, 0x8007000e
mov dword [ebp - 0x1a8], ecx
mov eax, dword [section..data]
cmp eax, section..data
je 0x1007e4c
test byte [eax + 0x1c], 1
je 0x1007e4c
push ecx
push 0x10017d4
push 0xe
jmp 0x1007e39
push dword [ebp + 8]
mov dword [esi + 0xc], edi
push edi
push eax
call fcn.01003746
cmp eax, ebx
mov dword [ebp - 0x1a8], eax
jge 0x1007db7
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 0x1007e4c
test byte [eax + 0x1c], 1
je 0x1007e4c
push dword [ebp - 0x1a8]
push 0x10017d4
push 0xf
jmp 0x1007e39
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 0x1007e46
cmp edx, ebx
jne 0x1007e46
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x1007e10
and eax, 0xffff
or eax, 0x80070000
cmp eax, ebx
mov dword [ebp - 0x1a8], eax
jge 0x1007e46
mov eax, dword [section..data]
cmp eax, section..data
je 0x1007e4c
test byte [eax + 0x1c], 1
je 0x1007e4c
push dword [ebp - 0x1a8]
push 0x10017d4
push 0x10
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01003005
jmp 0x1007e4c
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.010110df
leave
ret 0x10