Function at 0x46c320
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e3ea4
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x58bd90]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov esi, dword [ebp + 8]
push 0x596858
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
xor ebx, ebx
mov dword [esi + 4], esi
mov dword [esi + 8], ebx
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x18]
mov dword [ebp - 4], ebx
mov dword [esi + 0x10], eax
mov eax, dword [ebp + 0x1c]
mov dword [esi + 0x24], eax
mov eax, dword [ebp + 0x2c]
mov dword [esi + 0x14], ecx
mov cx, word [ebp + 0x20]
mov dword [esi + 0x20], edx
mov edx, dword [ebp + 0x28]
mov dword [esi + 0x30], eax
lea eax, [esi + 0x34]
mov dword [esi], vtable.CDeferredCommand.0
mov dword [esi + 0xc], vtable.CDeferredCommand.1.0
mov word [esi + 0x28], cx
mov dword [esi + 0x2c], edx
mov dword [eax + 0xc], ebx
mov dword [eax + 4], ebx
mov dword [eax + 8], edi
cmp edi, ebx
je 0x46c3bb
mov ecx, dword [ebp + 0x10]
push ecx
push eax
mov eax, dword [ebp + 0x24]
call fcn.0046ae40
jmp 0x46c3bd
mov dword [eax], ebx
lea edi, [esi + 0x48]
mov dword [edi], ebx
fld qword [ebp + 0x30]
mov byte [ebp - 4], 2
fmul qword [0x557ab8]
mov dword [esi + 0x4c], 0x80004004
call fcn.0045a266
lea ecx, [ebp - 0x14]
push ecx
mov ecx, dword [esi + 0x20]
mov dword [esi + 0x18], eax
mov eax, dword [esi + 0x14]
mov dword [esi + 0x1c], edx
mov edx, dword [eax]
mov edx, dword [edx]
push ecx
push eax
call edx
cmp eax, ebx
jl 0x46c4f1
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov dword [ebp + 0x1c], ebx
cmp dword [edi], ebx
jne 0x46c49b
mov eax, dword [0x596804]
cmp eax, ebx
jne 0x46c42a
push str.OleAut32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [0x596804], eax
mov dword [ebp + 0x14], eax
cmp eax, ebx
je 0x46c4a7
push str.LoadRegTypeLib
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x46c4a7
lea ecx, [ebp - 0x10]
push ecx
push ebx
push ebx
push 1
push 0x50fa9c
call eax
test eax, eax
jns 0x46c476
mov edx, dword [ebp + 0x14]
push str.LoadTypeLib
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x46c4a7
lea ecx, [ebp - 0x10]
push ecx
push str.control.tlb
call eax
cmp eax, ebx
jl 0x46c4b6
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 0x18]
mov edx, dword [eax]
mov edx, dword [edx + 0x18]
push edi
push ecx
push eax
call edx
mov dword [ebp + 0x18], eax
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [ebp + 0x18]
cmp eax, ebx
jl 0x46c4b6
mov edi, dword [edi]
mov eax, dword [edi]
mov ecx, dword [eax + 4]
push edi
call ecx
jmp 0x46c4c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
or eax, 0x80070000
cmp eax, ebx
jge 0x46c4bd
mov edx, dword [ebp + 0x10]
mov dword [edx], eax
jmp 0x46c4f6
mov edi, dword [ebp + 0x1c]
mov eax, dword [edi]
mov ecx, dword [eax + 8]
push edi
call ecx
cmp word [ebp + 0x20], 4
jne 0x46c4e2
lea eax, [esi + 0x44]
mov dword [esi + 0x40], 1
mov dword [eax], 0xfffffffd
mov dword [esi + 0x38], eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx + 8]
push esi
call eax
cmp eax, ebx
jge 0x46c4f6
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x30