Function at 0x403985
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50e9b8
mov eax, dword fs:[0]
push eax
sub esp, 0x50
push ebx
push esi
push edi
mov eax, dword [0x5635b8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push str.open
lea ecx, [ebp - 0x18]
call fcn.004030b0
xor ebx, ebx
mov dword [ebp - 4], ebx
call fcn.00408e92
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x403854
push 0x80004005
call fcn.004010e0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 1
call fcn.00408e92
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x403881
push 0x80004005
call fcn.004010e0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x14], eax
mov edi, dword [ebp + 8]
mov esi, dword [edi]
mov byte [ebp - 4], 2
cmp dword [esi - 0xc], ebx
je 0x403a20
push 0x3c
lea ecx, [ebp - 0x5c]
push ebx
push ecx
call fcn.004f9330
add esp, 0xc
cmp byte [ebp + 0x18], 0
mov dword [ebp - 0x5c], 0x3c
mov dword [ebp - 0x58], 0x400
je 0x4038cc
mov dword [ebp - 0x58], 0x540
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x50], edx
movzx edx, byte [ebp + 0x14]
mov dword [ebp - 0x54], ebx
mov ebx, dword [ebp + 0x10]
mov ecx, dword [ebx]
mov dword [ebp - 0x4c], esi
mov esi, dword [ebp + 0xc]
mov eax, dword [esi]
neg edx
sbb edx, edx
push eax
mov dword [ebp - 0x44], ecx
mov ecx, dword [edi]
and edx, 5
push ecx
mov dword [ebp - 0x40], edx
lea edx, [ebp - 0x14]
push str.CWinMain::OpenPath___s___s___r_n
push edx
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x24], 0
call fcn.00402d20
mov eax, dword [ebp - 0x14]
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea ecx, [ebp - 0x5c]
push ecx
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
jne 0x4039bb
mov eax, dword [ebx]
mov edx, dword [ebp - 0x3c]
mov ecx, dword [esi]
push eax
push ecx
mov dword [ebp + 0x18], edx
mov edx, dword [edi]
push edx
lea eax, [ebp - 0x10]
push str.ShellExecute_Failed:__nexe:__s__s__ncurrentDir:__s_n
push eax
call fcn.00402d20
mov ecx, dword [ebp + 0x18]
lea eax, [ecx - 2]
add esp, 0x14
cmp eax, 0x18
ja case.0x403960.4
movzx edx, byte [eax + 0x403acc]
jmp dword [edx*4 + 0x403ab8]
push str.The_specified_file_was_not_found.
lea ecx, [ebp - 0x10]
call fcn.00402d40
jmp 0x4039b1
push str.The_specified_path_was_not_found.
lea ecx, [ebp - 0x10]
call fcn.00402d40
jmp 0x4039b1
push str.The_operating_system_denied_access_to_the_specified_file.
lea ecx, [ebp - 0x10]
call fcn.00402d40
jmp 0x4039b1
push str.A_sharing_violation_occurred.
lea ecx, [ebp - 0x10]
call fcn.00402d40
jmp 0x4039b1
push ecx
push str.An_error_occurred_with_error_code:__d
lea ecx, [ebp - 0x10]
call fcn.00402720
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, dword [ebp - 0x24]
push ecx
lea edx, [ebp - 0x10]
push str.Process_Handle:__X
push edx
call fcn.00402d20
mov esi, dword [ebp - 0x10]
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x403a3b
mov ecx, dword [0x564aa8]
push 0xffffffffffffffff
test ecx, ecx
je 0x403a0d
mov dword [ebp - 0x20], eax
push 0
lea eax, [ebp - 0x20]
push eax
push 2
mov dword [ebp - 0x1c], ecx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x403a3b
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x403a3b
lea edx, [ebp - 0x10]
push str.ShellExecute_Failed:_Path_is_empty_n
push edx
call fcn.00402d20
mov esi, dword [ebp - 0x10]
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403a5e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403a7e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x18]
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 0x403aa4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14