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

Disassembly:
push 0xffffffffffffffff
push 0x427bd2
mov eax, dword fs:[0]
push eax
sub esp, 0xa4
mov eax, dword [0x4312c8]
xor eax, esp
mov dword [esp + 0xa0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4312c8]
xor eax, esp
push eax
lea eax, [esp + 0xb8]
mov dword fs:[0], eax
mov edi, ecx
xor ebx, ebx
mov dword [esp + 0x5c], edi
mov dword [esp + 0x20], ebx
mov dword [esp + 0xc0], ebx
mov dword [esp + 0x14], ebx
lea eax, [esp + 0x14]
push eax
push 0x429ba0
push 1
push ebx
push 0x42b8c8
mov byte [esp + 0xd4], 1
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
lea edx, [esp + 0x20]
push edx
mov edx, dword [edi + 8]
push 0x42b8b8
push edx
push eax
mov eax, dword [ecx + 0x14]
call eax
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x40f0c0
mov dword [esp + 0x14], ebx
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x34]
push edx
mov dword [esp + 0x38], ebx
mov ecx, dword [eax]
push 0x429b90
push eax
mov eax, dword [ecx]
call eax
mov esi, eax
mov dword [esp + 0x18], ebx
cmp esi, ebx
mov byte [esp + 0xc0], 2
jl 0x40f5df
mov eax, dword [esp + 0x34]
mov ecx, dword [eax]
lea edx, [esp + 0x18]
push edx
push eax
mov eax, dword [ecx + 0x58]
call eax
mov eax, dword [esp + 0x34]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [edi + 0x10]
cmp eax, ebx
jne 0x40f15a
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esp + 0x14]
cmp eax, ebx
mov byte [esp + 0xc0], bl
je 0x40f135
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x20]
cmp eax, ebx
mov dword [esp + 0xc0], 0xffffffff
je 0x40f150
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, 0x80004005
jmp 0x40f61a
mov ecx, dword [eax]
lea edx, [esp + 0x48]
push edx
push eax
mov eax, dword [ecx + 0x20]
call eax
xor edi, edi
cmp dword [esp + 0x48], ebx
mov esi, eax
mov dword [esp + 0x58], edi
jbe 0x40f559
mov ebp, dword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea ecx, [esp + 0x90]
push ecx
call dword [sym.imp.OLEAUT32.dll_VariantClear]
mov edx, dword [esp + 0x5c]
mov eax, dword [edx + 0x10]
mov ecx, dword [eax]
lea edx, [esp + 0x90]
push edx
push edi
push eax
mov eax, dword [ecx + 0x24]
mov byte [esp + 0xcc], 3
call eax
mov eax, dword [esp + 0x98]
lea edx, [esp + 0x30]
push edx
mov dword [esp + 0x34], ebx
mov ecx, dword [eax]
push 0x42b7a8
push eax
mov eax, dword [ecx]
call eax
mov esi, eax
cmp esi, ebx
jl 0x40f53e
mov eax, dword [esp + 0x30]
lea edx, [esp + 0x44]
mov dword [esp + 0x44], ebx
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0x24]
call eax
cmp dword [esp + 0x44], 2
mov esi, eax
jne 0x40f532
mov eax, dword [esp + 0x30]
lea edx, [esp + 0x40]
mov dword [esp + 0x40], ebx
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0x4c]
call eax
mov esi, eax
cmp esi, ebx
jl 0x40f532
mov eax, dword [esp + 0x40]
lea edx, [esp + 0x2c]
push edx
mov dword [esp + 0x30], ebx
mov ecx, dword [eax]
push 0x42b7e8
push eax
mov eax, dword [ecx]
call eax
mov esi, eax
cmp esi, ebx
jl 0x40f526
mov eax, dword [esp + 0x2c]
lea edx, [esp + 0x38]
mov dword [esp + 0x38], ebx
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0x20]
call eax
xor edi, edi
cmp dword [esp + 0x38], ebx
mov esi, eax
mov dword [esp + 0x54], edi
jbe 0x40f516
nop
lea ecx, [esp + 0x80]
push ecx
call dword [sym.imp.OLEAUT32.dll_VariantClear]
mov eax, dword [esp + 0x2c]
mov edx, dword [eax]
mov edx, dword [edx + 0x24]
lea ecx, [esp + 0x80]
push ecx
push edi
push eax
mov byte [esp + 0xcc], 4
call edx
lea ecx, [esp + 0x80]
mov esi, eax
call fcn.0040d130
test eax, eax
jbe 0x40f4f3
mov eax, dword [esp + 0x88]
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x20], ebx
mov ecx, dword [eax]
push 0x42b7d8
push eax
mov eax, dword [ecx]
call eax
mov esi, eax
cmp esi, ebx
jl 0x40f4f3
mov dword [esp + 0x24], ebx
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
lea edx, [esp + 0x24]
push edx
push eax
mov eax, dword [ecx + 0x3c]
mov byte [esp + 0xc8], 5
call eax
lea ecx, [esp + 0x60]
push ecx
call dword [sym.imp.OLEAUT32.dll_VariantClear]
mov eax, dword [esp + 0x1c]
mov edx, dword [eax]
mov edx, dword [edx + 0x44]
lea ecx, [esp + 0x60]
push ecx
push eax
mov byte [esp + 0xc8], 6
call edx
mov esi, eax
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x40f4d5
push eax
call dword [sym.imp.OLEAUT32.dll_VariantInit]
test eax, eax
jbe 0x40f4d5
lea ecx, [esp + 0x60]
call fcn.0040d130
test eax, eax
jbe 0x40f4d5
mov dword [esp + 0xa0], ebx
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0xa4]
push eax
push ecx
mov dword [esp + 0x58], ebx
call dword [sym.imp.ole32.dll_CLSIDFromString]
mov dword [esp + 0x28], ebx
lea edx, [esp + 0x28]
push edx
push 0x429bc0
push 0x17
push ebx
lea eax, [esp + 0xb4]
push eax
mov byte [esp + 0xd4], 8
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov esi, eax
cmp esi, ebx
jl 0x40f57c
lea ecx, [esp + 0x60]
push ecx
call fcn.0040e440
add esp, 4
cmp eax, ebx
jl 0x40f42f
lea edx, [esp + 0x70]
push edx
mov word [esp + 0x74], bx
call ebp
mov ecx, dword [esp + 0x18]
cmp ecx, ebx
mov word [esp + 0x70], 8
jne 0x40f3b9
xor eax, eax
jmp 0x40f3d0
push ecx
call dword [sym.imp.OLEAUT32.dll_SysAllocStringByteLen]
push eax
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.OLEAUT32.dll_DllRegisterServer]
mov ecx, dword [esp + 0x18]
cmp eax, ebx
mov dword [esp + 0x78], eax
jne 0x40f3e0
cmp ecx, ebx
jne 0x40f563
mov esi, dword [esp + 0x60]
mov ecx, dword [esp + 0x28]
mov edx, dword [ecx]
lea eax, [esp + 0x50]
push eax
sub esp, 0x10
mov eax, esp
mov dword [eax], esi
mov esi, dword [esp + 0x78]
mov dword [eax + 4], esi
mov esi, dword [esp + 0x7c]
mov dword [eax + 8], esi
mov esi, dword [esp + 0x80]
push ecx
mov ecx, dword [edx + 0x1c]
mov byte [esp + 0xd8], 9
mov dword [eax + 0xc], esi
call ecx
lea edx, [esp + 0x70]
push edx
mov esi, eax
mov byte [esp + 0xc4], 8
call ebp
jmp 0x40f494
push str.Error:_Param_array_invalid_state_for:
lea ecx, [esp + 0x50]
call fcn.00403a30
mov dword [esp + 0x3c], ebx
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
lea edx, [esp + 0x3c]
push edx
push eax
mov eax, dword [ecx + 0x24]
mov byte [esp + 0xc8], 0xb
call eax
lea ecx, [esp + 0x3c]
push ecx
lea ecx, [esp + 0x50]
call fcn.0040cc80
mov edi, dword [esp + 0x4c]
mov ecx, dword [esp + 0x5c]
push edi
call fcn.0040d800
mov edx, dword [esp + 0x3c]
push edx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
push edi
mov byte [esp + 0xc4], 8
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov edi, dword [esp + 0x54]
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x50]
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0x68]
call eax
lea ecx, [esp + 0x28]
call fcn.0040ce00
mov eax, dword [esp + 0x28]
cmp eax, ebx
mov byte [esp + 0xc0], 7
je 0x40f4c6
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
push ebx
mov byte [esp + 0xc4], 6
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
lea eax, [esp + 0x60]
push eax
call ebp
mov ecx, dword [esp + 0x24]
push ecx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
lea edx, [esp + 0x80]
push edx
mov byte [esp + 0xc4], 3
call ebp
add edi, 1
cmp edi, dword [esp + 0x38]
mov dword [esp + 0x54], edi
jb 0x40f260
mov eax, dword [esp + 0x2c]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov edi, dword [esp + 0x58]
mov eax, dword [esp + 0x40]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x30]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
lea eax, [esp + 0x90]
push eax
call ebp
add edi, 1
cmp edi, dword [esp + 0x48]
mov dword [esp + 0x58], edi
jb 0x40f180
mov eax, dword [esp + 0x18]
push eax
jmp 0x40f5e0
push 0x8007000e
mov word [esp + 0x74], 0xa
mov dword [esp + 0x7c], 0x8007000e
call fcn.00405760
mov eax, dword [esp + 0x28]
cmp eax, ebx
mov byte [esp + 0xc0], 7
je 0x40f594
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov edi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
push ebx
call edi
lea eax, [esp + 0x60]
push eax
call ebp
mov ecx, dword [esp + 0x24]
push ecx
call edi
lea edx, [esp + 0x80]
push edx
call ebp
lea eax, [esp + 0x90]
push eax
call ebp
mov ecx, dword [esp + 0x18]
push ecx
call edi
mov eax, dword [esp + 0x14]
cmp eax, ebx
mov byte [esp + 0xc0], bl
je 0x40f5fd
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
jmp 0x40f5fd
push ebx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esp + 0x14]
cmp eax, ebx
mov byte [esp + 0xc0], bl
je 0x40f5fd
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x20]
cmp eax, ebx
mov dword [esp + 0xc0], 0xffffffff
je 0x40f618
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, esi
mov ecx, dword [esp + 0xb8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xa0]
xor ecx, esp
call fcn.00418ff5
add esp, 0xb0
ret