Function at 0x405120
Capabilities:
Check if file exists
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5762f9
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x628f58]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x48], edi
mov dword [ebp - 4], 0
xor eax, eax
mov dword [ebp - 0x58], 0
push eax
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 7
push 0x605dc0
mov dword [ebp - 0x5c], edi
mov word [edi], ax
call fcn.00402df0
mov dword [ebp - 4], 0
mov dword [ebp - 0x58], 1
mov dword [ebp - 0x4c], 0
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
lea ecx, [ebp - 0x4c]
push ecx
push eax
call dword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
jne 0x405221
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x50]
push eax
push 1
push 0
push 0
call dword [sym.imp.WTSAPI32.dll_WTSEnumerateSessionsW]
xor ecx, ecx
mov dword [ebp - 0x44], ecx
cmp dword [ebp - 0x48], ecx
jbe 0x405218
xor esi, esi
nop
mov eax, dword [ebp - 0x50]
cmp dword [esi + eax + 8], 0
jne 0x4051ee
lea ecx, [ebp - 0x4c]
push ecx
push dword [esi + eax]
call dword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
jne 0x405218
mov ecx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x50]
cmp dword [esi + eax + 8], 1
jne 0x40520c
lea ecx, [ebp - 0x4c]
push ecx
push dword [esi + eax]
call dword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
jne 0x405218
mov ecx, dword [ebp - 0x44]
inc ecx
add esi, 0xc
mov dword [ebp - 0x44], ecx
cmp ecx, dword [ebp - 0x48]
jb 0x4051d0
push dword [ebp - 0x50]
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
mov esi, dword [sym.imp.USERENV.dll_GetUserProfileDirectoryW]
lea eax, [ebp - 0x54]
push eax
push 0
push dword [ebp - 0x4c]
mov dword [ebp - 0x54], 0x1000
call esi
mov eax, dword [ebp - 0x54]
xor ecx, ecx
inc eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00411587
mov ecx, eax
mov eax, dword [ebp - 0x54]
inc eax
mov dword [ebp - 0x44], ecx
push eax
push 0
push ecx
call fcn.00551420
add esp, 0x10
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0x44]
push dword [ebp - 0x4c]
call esi
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x405287
cmp eax, 0xffffffff
je 0x405287
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x44]
xor eax, eax
mov ecx, esi
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4052a3
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x28]
call fcn.00402df0
push esi
mov dword [ebp - 0x58], 3
call fcn.00411582
lea eax, [ebp - 0x28]
add esp, 4
cmp edi, eax
je 0x40532d
mov ecx, dword [edi + 0x14]
cmp ecx, 8
jb 0x40530c
mov eax, dword [edi]
lea ecx, [ecx*2 + 2]
cmp ecx, 0x1000
jb 0x405302
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405516
mov eax, edx
push ecx
push eax
call fcn.0054b35d
add esp, 8
movups xmm0, xmmword [ebp - 0x28]
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 7
movups xmmword [edi], xmm0
movq xmm0, qword [ebp - 0x18]
movq qword [edi + 0x10], xmm0
jmp 0x405367
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x405367
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40535d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405516
push edx
push ecx
call fcn.0054b35d
add esp, 8
push 0x605f70
mov ecx, edi
call fcn.00402930
push str.Foxit_Software_
mov ecx, edi
call fcn.00402930
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x405389
mov eax, dword [edi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4053a7
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x40539e
mov eax, dword [edi]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
xor eax, eax
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
mov dword [ebp - 4], 1
call fcn.00404da0
test al, al
jne 0x4053d7
mov eax, str.Classic
mov ecx, 7
jmp 0x4053e1
mov eax, str.Continuous
mov ecx, 0xa
push ecx
push eax
lea ecx, [ebp - 0x40]
call fcn.00402df0
push 0x605c44
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0x28]
call fcn.004029b0
add esp, 4
mov byte [ebp - 4], 2
mov edx, eax
cmp dword [eax + 0x14], 8
jb 0x40540c
mov edx, dword [eax]
mov ecx, dword [eax + 0x10]
mov esi, dword [edi + 0x10]
mov eax, dword [edi + 0x14]
sub eax, esi
mov dword [ebp - 0x48], esi
cmp ecx, eax
ja 0x405450
cmp dword [edi + 0x14], 8
lea eax, [esi + ecx]
mov dword [ebp - 0x44], eax
mov esi, edi
mov dword [edi + 0x10], eax
jb 0x405431
mov esi, dword [edi]
lea eax, [ecx + ecx]
push eax
mov eax, dword [ebp - 0x48]
push edx
lea eax, [esi + eax*2]
push eax
call fcn.005505d0
mov eax, dword [ebp - 0x44]
add esp, 0xc
xor ecx, ecx
mov word [esi + eax*2], cx
jmp 0x405461
push ecx
push edx
mov byte [ebp - 0x48], 0
push dword [ebp - 0x48]
push ecx
mov ecx, edi
call fcn.00402ab0
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x40549b
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x405491
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40551b
push edx
push ecx
call fcn.0054b35d
add esp, 8
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x4054a5
mov eax, dword [edi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4054c3
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x4054ba
mov eax, dword [edi]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov edx, dword [ebp - 0x2c]
cmp edx, 8
jb 0x4054f9
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4054ef
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405520
push edx
push ecx
call fcn.0054b35d
add esp, 8
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0054b34c
mov esp, ebp
pop ebp
ret
call fcn.005550db
call fcn.005550db
call fcn.005550db
int3