Function at 0x40ca70
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40e22d
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x49bc
call fcn.0040a4a0
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x1c], 8
mov dword [ebp - 0x18], 0x1ff
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp - 0x22c], eax
push str._ShowJournal
mov ecx, dword [ebp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40caf9
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
mov dword [ebp - 0x448], eax
call fcn.0040c980
cmp dword [ebp - 0x448], 0
jl 0x40caf2
call dword [sym.imp.ole32.dll_CoUninitialize]
xor eax, eax
jmp 0x40cf7b
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x444], 0
lea edx, [ebp - 0x444]
push edx
lea eax, [ebp - 0x14]
push eax
push str._X_n
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.00402390
add esp, 0x10
mov edx, dword [ebp + 0x10]
add edx, dword [ebp - 0x444]
mov dword [ebp - 0x440], edx
mov eax, dword [ebp - 0x440]
movsx ecx, byte [eax]
cmp ecx, 0x20
jne 0x40cb54
mov edx, dword [ebp - 0x440]
add edx, 1
mov dword [ebp - 0x440], edx
jmp 0x40cb35
mov eax, dword [ebp - 0x440]
movsx ecx, byte [eax]
test ecx, ecx
jne 0x40cb6b
mov dword [ebp - 0x440], str.Samsung_Network_PC_Fax
mov edx, dword [0x410fcc]
mov dword [ebp - 0x228], edx
mov eax, dword [0x410fd0]
mov dword [ebp - 0x224], eax
push 0x200
push 0
lea ecx, [ebp - 0x220]
push ecx
call fcn.00401f70
add esp, 0xc
mov ecx, 0xe
mov esi, str.Samsung_Network_PC_Fax_Port
lea edi, [ebp - 0x438]
rep movsd dword es:[edi], dword [esi]
push 0x1d0
push 0
lea edx, [ebp - 0x400]
push edx
call fcn.00401f70
add esp, 0xc
mov dword [ebp - 0x43c], 0
mov eax, dword [ebp - 0x440]
movsx ecx, byte [eax]
test ecx, ecx
je 0x40cc83
lea ecx, [ebp - 0x44c]
call fcn.00401500
push 8
mov edx, dword [ebp - 0x440]
push edx
lea ecx, [ebp - 0x44c]
call fcn.00401560
lea ecx, [ebp - 0x44c]
call fcn.00401540
movzx eax, al
test eax, eax
jne 0x40cc78
lea ecx, [ebp - 0x44c]
call fcn.004014f0
mov dword [ebp - 0x450], eax
mov ecx, dword [ebp - 0x450]
mov edx, dword [ecx + 0x34]
mov dword [ebp - 0x43c], edx
mov eax, dword [ebp - 0x450]
cmp dword [eax], 0
je 0x40cc51
mov ecx, dword [ebp - 0x450]
mov edx, dword [ecx]
push edx
push 0x208
lea eax, [ebp - 0x228]
push eax
call fcn.00401af0
mov ecx, dword [ebp - 0x450]
cmp dword [ecx + 0xc], 0
je 0x40cc78
mov edx, dword [ebp - 0x450]
mov eax, dword [edx + 0xc]
push eax
push 0x208
lea ecx, [ebp - 0x438]
push ecx
call fcn.00401af0
lea ecx, [ebp - 0x44c]
call fcn.00401520
cmp dword [ebp - 0x14], 0
je 0x40cf79
cmp dword [ebp - 0x14], 0xffffffff
je 0x40cf79
lea edx, [ebp - 0x438]
push edx
lea eax, [ebp - 0x228]
push eax
push str._spipe_s
push 0x208
lea ecx, [ebp - 0x2670]
push ecx
call fcn.00401b80
add esp, 0x14
mov dword [ebp - 0x2674], 0x1d4c0
mov dword [ebp - 0x2468], 2
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x2464], edx
mov dword [ebp - 0x454], 0xb5
push 0x200c
push 0
lea eax, [ebp - 0x4688]
push eax
call fcn.00401f70
add esp, 0xc
mov dword [ebp - 0x468c], 0x200c
mov ecx, dword [ebp - 0x2674]
push ecx
lea edx, [ebp - 0x468c]
push edx
mov eax, dword [ebp - 0x468c]
push eax
lea ecx, [ebp - 0x4688]
push ecx
push 0x200c
lea edx, [ebp - 0x2468]
push edx
lea eax, [ebp - 0x2670]
push eax
call section..text
add esp, 0x1c
mov dword [ebp - 0x4694], eax
cmp dword [ebp - 0x4694], 0
jge 0x40cd50
jmp 0x40cf75
cmp dword [ebp - 0x4684], 0
jne 0x40cd89
mov ecx, dword [ebp - 0x454]
mov edx, dword [ebp - 0x454]
sub edx, 1
mov dword [ebp - 0x454], edx
test ecx, ecx
jne 0x40cd77
jmp 0x40cf75
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40cce5
cmp dword [ebp - 0x4684], 1
jne 0x40cda4
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40cce5
cmp dword [ebp - 0x4684], 2
je 0x40cdb2
jmp 0x40cf75
lea eax, [ebp - 0x467c]
mov dword [ebp - 0x4690], eax
mov ecx, dword [ebp - 0x4690]
mov edx, dword [ecx + 8]
and edx, 1
neg edx
sbb edx, edx
add edx, 1
mov byte [ebp - 0x4695], dl
mov eax, dword [ebp - 0x4690]
mov ecx, dword [eax + 8]
and ecx, 2
je 0x40cf6e
push 0x104
lea edx, [ebp - 0x48a0]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x48a0]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov dword [ebp - 0x48a4], eax
push 0x411024
push 0x208
mov ecx, dword [ebp - 0x48a4]
push ecx
call fcn.00401af0
mov dword [ebp - 0x48a8], 0
lea edx, [ebp - 0x48a0]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40ce54
lea eax, [ebp - 0x48a0]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x48a8], eax
cmp dword [ebp - 0x48a8], 0
je 0x40cf6e
push str.ShowDialog
mov ecx, dword [ebp - 0x48a8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x48ac], eax
cmp dword [ebp - 0x48ac], 0
je 0x40cf61
push 0
push 0
push 0
lea ecx, [ebp - 0x48bc]
call fcn.00401a50
push 0
lea edx, [ebp - 0x48bc]
push edx
push 0x414bfc
call sub.gdiplus.dll_GdiplusStartup
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
mov dword [ebp - 0x48c0], eax
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x440]
push eax
lea ecx, [ebp - 0x49c4]
call fcn.00401490
mov dword [ebp - 0x49c8], eax
mov ecx, dword [ebp - 0x49c8]
mov dword [ebp - 0x49cc], ecx
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x4690]
add edx, 0x748
push edx
movzx eax, byte [ebp - 0x4695]
push eax
mov ecx, dword [ebp - 0x4690]
mov edx, dword [ecx + 4]
push edx
mov ecx, dword [ebp - 0x49cc]
call fcn.004014f0
push eax
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [ebp - 0x48ac]
add esp, 0x14
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x49c4]
call fcn.004014c0
jmp 0x40cf40
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x48c0], 0
jl 0x40cf56
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, dword [0x414bfc]
push eax
call sub.gdiplus.dll_GdiplusShutdown
mov ecx, dword [ebp - 0x48a8]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x40cf75
xor eax, eax
jmp 0x40cf7b
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10