Function at 0x4205f0
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4887cb
mov eax, dword fs:[0]
push eax
sub esp, 0xa0
mov eax, dword [0x4bdbb0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
call fcn.00449852
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x420638
push 0x80004005
call fcn.004108b0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x14], eax
mov ebx, dword [ebp + 0xc]
lea ecx, [ebp - 0xa8]
push 3
mov dword [ebp - 0xac], ecx
push ebx
lea ecx, [ebp - 0xac]
mov dword [ebp - 4], 0
call fcn.004170e0
sub esp, 0x84
mov edi, esp
mov ecx, 0x21
lea esi, [ebp - 0xac]
push str.OpenAs_...__s
mov byte [ebp - 4], 1
rep movsd dword es:[edi], dword [esi]
call fcn.00427230
mov eax, dword [ebp - 0xac]
lea edx, [ebp - 0xa8]
add esp, 0x88
mov byte [ebp - 4], 0
cmp eax, edx
je 0x4206b1
push eax
call fcn.00463c35
add esp, 4
call fcn.00420500
test eax, eax
jne 0x4206c7
push str.DoHookCreateProcess_Error_
call fcn.00427230
add esp, 4
push str.OFFICE_MULTIPROCESS_LOCK
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
lea ecx, [ebp - 0x28]
mov esi, eax
call fcn.00415850
push ebx
push 0
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 2
call fcn.0041d9e0
mov edi, eax
cmp edi, 0xffffffff
jne 0x42075f
push esi
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x14]
push str.OpenAs_DoModal_return__2
push eax
call fcn.004135e0
mov esi, dword [ebp - 0x14]
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push edi
push str.OpenAs_COpenAsDialog_nRet1_d
call fcn.00427230
add esp, 8
lea ecx, [ebp - 0x28]
call fcn.004158f0
lea eax, [esi - 0x10]
mov dword [ebp - 4], edi
lea ecx, [eax + 0xc]
or edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x420755
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 0xfffffffe
jmp 0x420878
cmp edi, 1
je 0x4207ce
push esi
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x14]
push str._r_nOpenAs_COpenAsDialog_is_not_IDOK_r_n
push ecx
call fcn.004135e0
mov esi, dword [ebp - 0x14]
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push edi
push str.OpenAs_COpenAsDialog_nRet2_d
call fcn.00427230
add esp, 8
lea ecx, [ebp - 0x28]
call fcn.004158f0
lea eax, [esi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4207c6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
or eax, 0xffffffff
jmp 0x420878
push 1
push str.OpenAs_COpenAsDialog_nRet3_d
call fcn.00427230
add esp, 8
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x4207f8
push esi
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
jne 0x420800
xor eax, eax
jmp 0x420829
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x420813
xor eax, eax
jmp 0x420829
lea esi, [eax + eax]
mov eax, esi
call fcn.004644e0
mov eax, esp
push 3
push esi
push ebx
push eax
call fcn.0040f410
push eax
push str.DoHookCreateProcess___s
call fcn.00427230
push 0x400
push 0
push 0x4c21e8
call fcn.00463850
add esp, 0x14
lea ecx, [ebp - 0x28]
call fcn.004158f0
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x420876
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
lea esp, [ebp - 0xbc]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004644d0
mov esp, ebp
pop ebp
ret