Function at 0x588290
Capabilities:
Accept command line arguments
Check if file exists
Check mutex on windows
Enumerate gui resources
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a32a4
mov eax, dword fs:[0]
push eax
sub esp, 0x60
push ebx
push esi
push edi
mov eax, dword [0x606040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x30], ebx
push 0x5de858
push 0
call fcn.00537191
mov eax, dword [ebx + 0x128]
lea edi, [ebx + 0x128]
mov ecx, 1
add esp, 8
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, 0x104
or eax, ecx
jge 0x5882f8
push 0x104
mov ecx, edi
call fcn.00402400
mov esi, dword [edi]
call fcn.0041a0c0
push 0x104
push esi
mov eax, dword [eax + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov eax, dword [edi]
test eax, eax
jne 0x588319
xor ecx, ecx
jmp 0x58832f
push dword [eax - 8]
push eax
call fcn.005360d5
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x588997
mov eax, dword [edi]
cmp ecx, dword [eax - 8]
jg 0x588997
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [edi]
mov word [eax + ecx*2], dx
mov ecx, 1
mov eax, dword [edi]
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, 0x104
or eax, ecx
jge 0x588367
push 0x104
mov ecx, edi
call fcn.00402400
push dword [edi]
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov eax, dword [edi]
test eax, eax
jne 0x588379
xor ecx, ecx
jmp 0x58838f
push dword [eax - 8]
push eax
call fcn.005360d5
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x588997
mov eax, dword [edi]
cmp ecx, dword [eax - 8]
jg 0x588997
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [edi]
mov word [eax + ecx*2], dx
call fcn.0040a74d
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x5883c1
push 0x80004005
call fcn.00401e70
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x28], esi
mov dword [ebp - 4], 0
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x5883f9
push 0x104
lea ecx, [ebp - 0x28]
call fcn.00402400
mov esi, dword [ebp - 0x28]
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push dword [esi - 8]
push esi
call fcn.005360d5
add esp, 8
test eax, eax
js 0x588997
cmp eax, dword [esi - 8]
jg 0x588997
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
push esi
push dword [edi]
call fcn.00535e6f
add esp, 8
test eax, eax
je 0x588442
push dword [edi]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp dword [ebx + 0x124], 0
jne 0x588471
mov ecx, dword [edi]
lea eax, [ebx + 0x12c]
push 0
push eax
lea eax, [ebx + 0x120]
push eax
lea edx, [ebx + 0x130]
call fcn.00580950
add esp, 0xc
mov dword [ebx + 0x124], eax
cmp dword [ebx + 0x138], 0
jne 0x5884a4
push str.CNPE.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebx + 0x138], eax
test eax, eax
jne 0x5884a4
push eax
mov edx, 0x104d00
xor ecx, ecx
call fcn.00574b30
add esp, 4
jmp 0x588aeb
push str.PDFEditor_Mutex
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [ebx + 0x118], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x588572
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
push 0x58dde0
call dword [sym.imp.USER32.dll_EnumWindows]
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x588aeb
push eax
call dword [sym.imp.USER32.dll_IsWindowEnabled]
test eax, eax
je 0x588519
push dword [ebp - 0x10]
call dword [sym.imp.USER32.dll_IsIconic]
test eax, eax
je 0x588510
push 9
push dword [ebp - 0x10]
call dword [sym.imp.USER32.dll_ShowWindow]
jmp 0x588519
push dword [ebp - 0x10]
call dword [sym.imp.USER32.dll_SetForegroundWindow]
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edx, eax
xor eax, eax
mov ecx, edx
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x40], 1
lea edi, [ecx + 2]
jmp 0x588540
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x588540
sub ecx, edi
mov dword [ebp - 0x38], edx
sar ecx, 1
lea eax, [ecx*4 + 4]
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x40]
push eax
mov eax, dword [ebp - 0x10]
push eax
push 0x4a
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
jmp 0x588aeb
lea edi, [ebx + 0x134]
mov ecx, edi
mov dword [ebp - 0x10], edi
call fcn.0058e000
test eax, eax
jne 0x588595
mov eax, dword [edi]
cmp dword [eax - 0xc], 0
jne 0x588595
mov ecx, edi
call fcn.0058de10
push dword [edi]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x58892f
mov eax, dword [edi]
sub eax, 0x10
push eax
call fcn.004039f0
add esp, 4
lea ebx, [eax + 0x10]
mov dword [ebp - 0x2c], ebx
mov byte [ebp - 4], 1
mov ecx, 1
mov eax, dword [ebx - 8]
sub ecx, dword [ebx - 4]
sub eax, 0x104
or eax, ecx
jge 0x5885e1
push 0x104
lea ecx, [ebp - 0x2c]
call fcn.00402400
mov ebx, dword [ebp - 0x2c]
push str.PETEMP_UI
push ebx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [ebx - 8]
push ebx
call fcn.005360d5
add esp, 8
test eax, eax
js 0x588997
cmp eax, dword [ebx - 8]
jg 0x588997
xor ecx, ecx
mov dword [ebx - 0xc], eax
mov word [ebx + eax*2], cx
mov ecx, ebx
call fcn.0058fae0
mov eax, dword [edi]
sub eax, 0x10
push eax
call fcn.004039f0
add esp, 4
lea edi, [eax + 0x10]
mov dword [ebp - 0x20], edi
mov byte [ebp - 4], 2
mov ecx, 1
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
jge 0x588656
push 0x104
lea ecx, [ebp - 0x20]
call fcn.00402400
mov edi, dword [ebp - 0x20]
push str.PETEMP_TIFF
push edi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [edi - 8]
push edi
call fcn.005360d5
add esp, 8
test eax, eax
js 0x588997
cmp eax, dword [edi - 8]
jg 0x588997
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
mov ecx, edi
call fcn.0058fae0
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx]
sub eax, 0x10
push eax
call fcn.004039f0
add esp, 4
lea edi, [eax + 0x10]
mov dword [ebp - 0x1c], edi
mov byte [ebp - 4], 3
mov ecx, 1
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
jge 0x5886ce
push 0x104
lea ecx, [ebp - 0x1c]
call fcn.00402400
mov edi, dword [ebp - 0x1c]
push str.PETEMP_PDF
push edi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [edi - 8]
push edi
call fcn.005360d5
add esp, 8
test eax, eax
js 0x588997
cmp eax, dword [edi - 8]
jg 0x588997
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
mov ecx, edi
call fcn.0058fae0
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx]
sub eax, 0x10
push eax
call fcn.004039f0
add esp, 4
lea edi, [eax + 0x10]
mov dword [ebp - 0x18], edi
mov byte [ebp - 4], 4
mov ecx, 1
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
jge 0x588746
push 0x104
lea ecx, [ebp - 0x18]
call fcn.00402400
mov edi, dword [ebp - 0x18]
push str.PETEMP_OW
push edi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [edi - 8]
push edi
call fcn.005360d5
add esp, 8
test eax, eax
js 0x588997
cmp eax, dword [edi - 8]
jg 0x588997
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
mov ecx, edi
call fcn.0058fae0
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx]
sub eax, 0x10
push eax
call fcn.004039f0
add esp, 4
lea edi, [eax + 0x10]
mov dword [ebp - 0x14], edi
mov byte [ebp - 4], 5
mov ecx, 1
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
jge 0x5887be
push 0x104
lea ecx, [ebp - 0x14]
call fcn.00402400
mov edi, dword [ebp - 0x14]
push str.PETEMP_SCAN
push edi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [edi - 8]
push edi
call fcn.005360d5
add esp, 8
test eax, eax
js 0x588997
cmp eax, dword [edi - 8]
jg 0x588997
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
mov ecx, edi
call fcn.0058fae0
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx]
sub eax, 0x10
push eax
call fcn.004039f0
add esp, 4
lea edi, [eax + 0x10]
mov dword [ebp - 0x10], edi
mov byte [ebp - 4], 6
mov ecx, 1
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
jge 0x588836
push 0x104
lea ecx, [ebp - 0x10]
call fcn.00402400
mov edi, dword [ebp - 0x10]
push str.PETEMP_LISTTEXT
push edi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [edi - 8]
push edi
call fcn.005360d5
add esp, 8
test eax, eax
js 0x588997
cmp eax, dword [edi - 8]
jg 0x588997
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
mov ecx, edi
call fcn.0058fae0
lea edx, [edi - 0x10]
mov byte [ebp - 4], 5
or edi, 0xffffffff
lea eax, [edx + 0xc]
mov ecx, edi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58888f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 4
mov ecx, edi
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x5888af
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 3
mov ecx, edi
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x5888cf
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov ecx, edi
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x5888ef
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov ecx, edi
mov edx, dword [ebp - 0x20]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58890f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add ebx, 0xfffffff0
mov byte [ebp - 4], 0
mov ecx, edi
lea eax, [ebx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58892c
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [ebp - 0x30]
mov ecx, ebx
call fcn.004666c1
push 0
mov ecx, ebx
call fcn.004673ec
push str.Canon
mov ecx, ebx
call fcn.004679e4
push 0
mov ecx, ebx
call fcn.004667c3
mov ecx, ebx
call fcn.0046872a
mov ecx, ebx
call fcn.00468777
push 0xb0
call fcn.0040a3f9
add esp, 4
mov dword [ebp - 0x30], eax
mov byte [ebp - 4], 7
test eax, eax
je 0x5889a1
push 0x5deaa0
push 0x5dbf80
push 0x5de928
push 0x82
mov ecx, eax
call fcn.0046a164
jmp 0x5889a3
push 0x80070057
call fcn.00401e70
xor eax, eax
mov byte [ebp - 4], 0
test eax, eax
je 0x588aeb
push eax
mov ecx, ebx
call fcn.00467e57
push 0x4c08
call fcn.0040a3f9
add esp, 4
mov dword [ebp - 0x30], eax
mov byte [ebp - 4], 8
test eax, eax
je 0x5889da
mov ecx, eax
call fcn.00587780
mov edi, eax
jmp 0x5889dc
xor edi, edi
mov byte [ebp - 4], 0
test edi, edi
je 0x588aeb
mov eax, dword [edi]
mov ecx, edi
push 0
push 0
push 0xcf8000
push 0x80
call dword [eax + 0x164]
test eax, eax
je 0x588ae2
lea ecx, [ebp - 0x6c]
mov dword [ebx + 0x20], edi
call fcn.00465df5
lea eax, [ebp - 0x6c]
mov byte [ebp - 4], 9
push eax
mov ecx, ebx
call fcn.00466944
lea eax, [ebp - 0x6c]
mov dword [ebp - 0x58], 0xffffffff
push eax
mov ecx, ebx
call fcn.0046808e
test eax, eax
jne 0x588a4a
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], al
xor edi, edi
call fcn.00465faf
jmp 0x588aed
push str.WindowPlacement
lea eax, [ebp - 0x34]
mov ecx, ebx
push eax
call fcn.004686c1
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 0xa
push eax
push 0x20019
push 0
push dword [ebp - 0x34]
mov dword [ebp - 0x24], 0
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov eax, dword [ebp - 0x24]
test eax, eax
jne 0x588a8e
mov dword [ebx + 0x4c], 3
jmp 0x588a9c
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x24], 0
push dword [ebx + 0x4c]
mov ecx, edi
call fcn.0040cd5b
push dword [edi + 0x20]
call dword [sym.imp.USER32.dll_UpdateWindow]
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
mov ecx, edi
call fcn.00584dc0
mov ecx, str.PEBootFromSU
call fcn.0058fbc0
lea ecx, [ebp - 0x34]
mov edi, 1
call fcn.00401fe0
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 0
call fcn.00465faf
jmp 0x588aed
mov eax, dword [edi]
mov ecx, edi
push 1
call dword [eax + 4]
xor edi, edi
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x588b0e
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret