Function at 0x494520
Capabilities:
Get common file path
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4e4d4a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xd1c
push ebx
push ebp
push esi
push edi
mov ecx, 0x1ff
xor eax, eax
lea edi, [esp + 0x52d]
mov byte [esp + 0x52c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0xd40]
xor ebp, ebp
push str.TEMPPATH
push eax
mov dword [esp + 0xd3c], ebp
mov dword [esp + 0x28], 1
call fcn.004af770
add esp, 8
mov ebx, 3
test eax, eax
jne 0x4946a0
lea ecx, [esp + 0x24]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov edi, dword [esp + 0xd44]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x24]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [0x511ed0]
mov ecx, edx
and ecx, ebx
rep movsb byte es:[edi], byte [esi]
mov dword [esp + 0x1c], eax
push ebp
push 0x80
push ebx
push ebp
push ebx
lea ecx, [esp + 0x38]
push SysReAllocStringLen
push ecx
mov byte [esp + 0xd50], 1
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x494669
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x129]
mov byte [esp + 0x128], 0
rep stosd dword es:[edi], eax
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x128]
lea edx, [esp + 0x18]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
push 0
push edx
lea eax, [esp + 0x130]
push 0x400
push eax
push esi
call ebp
mov eax, dword [esp + 0x18]
test eax, eax
je 0x49465e
lea ecx, [esp + 0x128]
push ecx
lea ecx, [esp + 0x20]
call fcn.004d3c59
jmp 0x49461b
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebp, ebp
jmp 0x49466d
mov dword [esp + 0x20], ebp
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x52c]
push ecx
lea ecx, [esp + 0x20]
mov eax, dword [edx - 8]
push eax
call fcn.004d3cad
push eax
call fcn.00494460
add esp, 8
mov byte [esp + 0xd34], 0
lea ecx, [esp + 0x1c]
jmp 0x4947db
mov edx, dword [esp + 0xd40]
push str.COOKIE
push edx
call fcn.004af770
add esp, 8
test eax, eax
jne 0x4947e0
mov eax, dword [0x511ed0]
mov dword [esp + 0x1c], eax
mov edx, dword [esp + 0xd48]
lea ecx, [esp + 0x1c]
push ecx
push 0x517348
push edx
mov byte [esp + 0xd40], 2
call fcn.004dbc9a
mov eax, dword [esp + 0xd58]
add esp, 0xc
lea ecx, [esp + 0x1c]
push eax
call fcn.004d258c
mov esi, eax
cmp esi, 0xffffffff
je 0x4947cf
push esi
push 0x50a314
lea ecx, [esp + 0x24]
call fcn.004d259a
mov ecx, dword [0x511ed0]
mov dword [esp + 0x18], ecx
mov edx, dword [esp + 0xd4c]
cmp eax, 0xffffffff
mov byte [esp + 0xd34], bl
je 0x49476b
mov ecx, dword [edx - 8]
sub eax, ecx
sub eax, esi
dec eax
push eax
lea eax, [ecx + esi + 1]
lea ecx, [esp + 0x14]
push eax
push ecx
lea ecx, [esp + 0x28]
call fcn.004d23e0
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0xd38], 4
call fcn.004d39b6
mov byte [esp + 0xd34], bl
lea ecx, [esp + 0x10]
jmp 0x49479e
mov eax, dword [edx - 8]
lea ecx, [esp + 0x10]
lea eax, [eax + esi + 1]
push eax
push ecx
lea ecx, [esp + 0x24]
call fcn.004d23bd
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0xd38], 5
call fcn.004d39b6
mov byte [esp + 0xd34], bl
lea ecx, [esp + 0x10]
call fcn.004d387d
lea edx, [esp + 0x52c]
lea ecx, [esp + 0x18]
push edx
push ebp
call fcn.004d3cad
push eax
call fcn.00494460
add esp, 8
lea ecx, [esp + 0x18]
mov byte [esp + 0xd34], 2
call fcn.004d387d
mov byte [esp + 0xd34], 0
lea ecx, [esp + 0x1c]
call fcn.004d387d
push 0x40
call fcn.004d35be
add esp, 4
cmp eax, ebp
je 0x49485a
mov ecx, dword [0x511ed0]
mov esi, eax
mov dword [eax], ecx
mov edx, dword [0x511ed0]
mov dword [eax + 4], edx
mov ecx, dword [0x511ed0]
mov dword [eax + 8], ecx
mov edx, dword [0x511ed0]
mov dword [eax + 0xc], edx
mov ecx, dword [0x511ed0]
mov dword [eax + 0x10], ecx
mov edx, dword [0x511ed0]
mov dword [eax + 0x14], edx
mov ecx, dword [0x511ed0]
mov dword [eax + 0x18], ecx
mov edx, dword [0x511ed0]
mov dword [eax + 0x1c], edx
mov ecx, dword [0x511ed0]
mov dword [eax + 0x20], ecx
mov edx, dword [0x511ed0]
mov dword [eax + 0x24], edx
mov dword [eax + 0x28], ebp
mov dword [eax + 0x2c], ebp
mov dword [eax + 0x30], ebp
mov dword [eax + 0x38], ebp
mov dword [eax + 0x3c], ebp
jmp 0x49485c
xor esi, esi
lea eax, [esp + 0x52c]
lea ecx, [esp + 0x14]
push eax
call fcn.004d38eb
push 0x510d9c
lea ecx, [esp + 0x18]
mov byte [esp + 0xd38], 6
call fcn.004d258c
push 0x510cd8
lea ecx, [esp + 0x18]
mov edi, eax
call fcn.004d258c
cmp edi, ebp
jl 0x494908
cmp eax, ebp
jl 0x4948d0
sub eax, edi
add edi, 3
sub eax, ebx
lea ecx, [esp + 0x10]
push eax
push edi
push ecx
lea ecx, [esp + 0x20]
call fcn.004d23e0
push eax
mov ecx, esi
mov byte [esp + 0xd38], 7
call fcn.004d39b6
mov byte [esp + 0xd34], 6
lea ecx, [esp + 0x10]
jmp 0x494903
cmp eax, 0xffffffff
jne 0x494908
add edi, 3
lea edx, [esp + 0x10]
push edi
push edx
lea ecx, [esp + 0x1c]
call fcn.004d23bd
push eax
mov ecx, esi
mov byte [esp + 0xd38], 8
call fcn.004d39b6
mov byte [esp + 0xd34], 6
lea ecx, [esp + 0x10]
call fcn.004d387d
push str.VP
lea ecx, [esp + 0x18]
call fcn.004d258c
mov edi, eax
lea ecx, [esp + 0x14]
lea ebp, [edi + 4]
push ebp
push 0x510cd8
call fcn.004d259a
test edi, edi
jl 0x49499c
test eax, eax
jl 0x494966
sub eax, edi
lea ecx, [esp + 0x14]
sub eax, 4
push eax
lea eax, [esp + 0x14]
push ebp
push eax
call fcn.004d23e0
push eax
lea ecx, [esi + 4]
mov byte [esp + 0xd38], 9
call fcn.004d39b6
mov byte [esp + 0xd34], 6
lea ecx, [esp + 0x10]
jmp 0x494997
cmp eax, 0xffffffff
jne 0x49499c
lea ecx, [esp + 0x10]
push ebp
push ecx
lea ecx, [esp + 0x1c]
call fcn.004d23bd
push eax
lea ecx, [esi + 4]
mov byte [esp + 0xd38], 0xa
call fcn.004d39b6
mov byte [esp + 0xd34], 6
lea ecx, [esp + 0x10]
call fcn.004d387d
mov edx, dword [esp + 0xd50]
push str.xmp.exe
push edx
call fcn.004af770
add esp, 8
test eax, eax
jne 0x4949f5
mov eax, dword [esi + 4]
push 0x517348
push eax
call fcn.004adbb0
add esp, 8
test eax, eax
je 0x4949e6
mov eax, dword [esi + 4]
push 0x510c84
push eax
call fcn.004adbb0
add esp, 8
test eax, eax
je 0x4949e6
push str.xmp_online.exe
jmp 0x4949eb
push str.xmp_local.exe
mov ecx, 0x517538
call fcn.004d3a06
push str.VC
lea ecx, [esp + 0x18]
call fcn.004d258c
mov edi, eax
lea ecx, [esp + 0x14]
lea ebp, [edi + 4]
push ebp
push 0x510cd8
call fcn.004d259a
test edi, edi
jl 0x494a89
test eax, eax
jl 0x494a53
sub eax, edi
lea ecx, [esp + 0x14]
sub eax, 4
push eax
lea eax, [esp + 0x14]
push ebp
push eax
call fcn.004d23e0
push eax
lea ecx, [esi + 8]
mov byte [esp + 0xd38], 0xb
call fcn.004d39b6
mov byte [esp + 0xd34], 6
lea ecx, [esp + 0x10]
jmp 0x494a84
cmp eax, 0xffffffff
jne 0x494a89
lea ecx, [esp + 0x10]
push ebp
push ecx
lea ecx, [esp + 0x1c]
call fcn.004d23bd
push eax
lea ecx, [esi + 8]
mov byte [esp + 0xd38], 0xc
call fcn.004d39b6
mov byte [esp + 0xd34], 6
lea ecx, [esp + 0x10]
call fcn.004d387d
push str.VJ
lea ecx, [esp + 0x18]
call fcn.004d258c
mov edi, eax
lea ecx, [esp + 0x14]
lea ebp, [edi + 4]
push ebp
push 0x510cd8
call fcn.004d259a
test edi, edi
jl 0x494b1d
test eax, eax
jl 0x494ae7
sub eax, edi
lea edx, [esp + 0x10]
sub eax, 4
lea ecx, [esp + 0x14]
push eax
push ebp
push edx
call fcn.004d23e0
push eax
lea ecx, [esi + 0xc]
mov byte [esp + 0xd38], 0xd
call fcn.004d39b6
mov byte [esp + 0xd34], 6
lea ecx, [esp + 0x10]
jmp 0x494b18
cmp eax, 0xffffffff
jne 0x494b1d
lea eax, [esp + 0x10]
push ebp
push eax
lea ecx, [esp + 0x1c]
call fcn.004d23bd
push eax
lea ecx, [esi + 0xc]
mov byte [esp + 0xd38], 0xe
call fcn.004d39b6
mov byte [esp + 0xd34], 6
lea ecx, [esp + 0x10]
call fcn.004d387d
push str.VS
lea ecx, [esp + 0x18]
call fcn.004d258c
mov edi, eax
lea ecx, [esp + 0x14]
lea ebp, [edi + 4]
push ebp
push 0x510cd8
call fcn.004d259a
test edi, edi
jl 0x494bb1
test eax, eax
jl 0x494b7b
sub eax, edi
lea ecx, [esp + 0x10]
sub eax, 4
push eax
push ebp
push ecx
lea ecx, [esp + 0x20]
call fcn.004d23e0
push eax
lea ecx, [esi + 0x10]
mov byte [esp + 0xd38], 0xf
call fcn.004d39b6
mov byte [esp + 0xd34], 6
lea ecx, [esp + 0x10]
jmp 0x494bac
cmp eax, 0xffffffff
jne 0x494bb1
lea edx, [esp + 0x10]
push ebp
push edx
lea ecx, [esp + 0x1c]
call fcn.004d23bd
push eax
lea ecx, [esi + 0x10]
mov byte [esp + 0xd38], 0x10
call fcn.004d39b6
mov byte [esp + 0xd34], 6
lea ecx, [esp + 0x10]
call fcn.004d387d
push str.VD
lea ecx, [esp + 0x18]
call fcn.004d258c
mov edi, eax
lea ecx, [esp + 0x14]
lea ebp, [edi + 4]
push ebp
push 0x510cd8
call fcn.004d259a
test edi, edi
jl 0x494c45
test eax, eax
jl 0x494c0f
sub eax, edi
lea ecx, [esp + 0x14]
sub eax, 4
push eax
lea eax, [esp + 0x14]
push ebp
push eax
call fcn.004d23e0
push eax
lea ecx, [esi + 0x14]
mov byte [esp + 0xd38], 0x11
call fcn.004d39b6
mov byte [esp + 0xd34], 6
lea ecx, [esp + 0x10]
jmp 0x494c40
cmp eax, 0xffffffff
jne 0x494c45
lea ecx, [esp + 0x10]
push ebp
push ecx
lea ecx, [esp + 0x1c]
call fcn.004d23bd
push eax
lea ecx, [esi + 0x14]
mov byte [esp + 0xd38], 0x12
call fcn.004d39b6
mov byte [esp + 0xd34], 6
lea ecx, [esp + 0x10]
call fcn.004d387d
push str.VT
lea ecx, [esp + 0x18]
call fcn.004d258c
mov edi, eax
lea ecx, [esp + 0x14]
lea ebp, [edi + 4]
push ebp
push 0x510cd8
call fcn.004d259a
test edi, edi
jl 0x494cd9
test eax, eax
jl 0x494ca3
sub eax, edi
lea edx, [esp + 0x10]
sub eax, 4
lea ecx, [esp + 0x14]
push eax
push ebp
push edx
call fcn.004d23e0
push eax
lea ecx, [esi + 0x18]
mov byte [esp + 0xd38], 0x13
call fcn.004d39b6
mov byte [esp + 0xd34], 6
lea ecx, [esp + 0x10]
jmp 0x494cd4
cmp eax, 0xffffffff
jne 0x494cd9
lea eax, [esp + 0x10]
push ebp
push eax
lea ecx, [esp + 0x1c]
call fcn.004d23bd
push eax
lea ecx, [esi + 0x18]
mov byte [esp + 0xd38], 0x14
call fcn.004d39b6
mov byte [esp + 0xd34], 6
lea ecx, [esp + 0x10]
call fcn.004d387d
push str.VU
lea ecx, [esp + 0x18]
call fcn.004d258c
mov edi, eax
lea ecx, [esp + 0x14]
lea ebp, [edi + 4]
push ebp
push 0x510cd8
call fcn.004d259a
test edi, edi
jl 0x494d6d
test eax, eax
jl 0x494d37
sub eax, edi
lea ecx, [esp + 0x10]
sub eax, 4
push eax
push ebp
push ecx
lea ecx, [esp + 0x20]
call fcn.004d23e0
push eax
lea ecx, [esi + 0x1c]
mov byte [esp + 0xd38], 0x15
call fcn.004d39b6
mov byte [esp + 0xd34], 6
lea ecx, [esp + 0x10]
jmp 0x494d68
cmp eax, 0xffffffff
jne 0x494d6d
lea edx, [esp + 0x10]
push ebp
push edx
lea ecx, [esp + 0x1c]
call fcn.004d23bd
push eax
lea ecx, [esi + 0x1c]
mov byte [esp + 0xd38], 0x16
call fcn.004d39b6
mov byte [esp + 0xd34], 6
lea ecx, [esp + 0x10]
call fcn.004d387d
push str.VM
lea ecx, [esp + 0x18]
call fcn.004d258c
mov edi, eax
lea ecx, [esp + 0x14]
lea ebp, [edi + 4]
push ebp
push 0x510cd8
call fcn.004d259a
test edi, edi
jl 0x494e01
test eax, eax
jl 0x494dcb
sub eax, edi
lea ecx, [esp + 0x14]
sub eax, 4
push eax
lea eax, [esp + 0x14]
push ebp
push eax
call fcn.004d23e0
push eax
lea ecx, [esi + 0x20]
mov byte [esp + 0xd38], 0x17
call fcn.004d39b6
mov byte [esp + 0xd34], 6
lea ecx, [esp + 0x10]
jmp 0x494dfc
cmp eax, 0xffffffff
jne 0x494e01
lea ecx, [esp + 0x10]
push ebp
push ecx
lea ecx, [esp + 0x1c]
call fcn.004d23bd
push eax
lea ecx, [esi + 0x20]
mov byte [esp + 0xd38], 0x18
call fcn.004d39b6
mov byte [esp + 0xd34], 6
lea ecx, [esp + 0x10]
call fcn.004d387d
push str.VV
lea ecx, [esp + 0x18]
call fcn.004d258c
mov edi, eax
lea ecx, [esp + 0x14]
lea ebp, [edi + 4]
push ebp
push 0x510cd8
call fcn.004d259a
test edi, edi
jl 0x494e95
test eax, eax
jl 0x494e5f
sub eax, edi
lea edx, [esp + 0x10]
sub eax, 4
lea ecx, [esp + 0x14]
push eax
push ebp
push edx
call fcn.004d23e0
push eax
lea ecx, [esi + 0x24]
mov byte [esp + 0xd38], 0x19
call fcn.004d39b6
mov byte [esp + 0xd34], 6
lea ecx, [esp + 0x10]
jmp 0x494e90
cmp eax, 0xffffffff
jne 0x494e95
lea eax, [esp + 0x10]
push ebp
push eax
lea ecx, [esp + 0x1c]
call fcn.004d23bd
push eax
lea ecx, [esi + 0x24]
mov byte [esp + 0xd38], 0x1a
call fcn.004d39b6
mov byte [esp + 0xd34], 6
lea ecx, [esp + 0x10]
call fcn.004d387d
lea ecx, [esi + 8]
call fcn.004d3d7f
mov ecx, esi
call fcn.004d3d7f
lea edi, [esi + 4]
mov ecx, edi
call fcn.004d3d7f
lea ecx, [esi + 0x24]
call fcn.004d3d7f
lea ebp, [esi + 0x10]
mov ecx, ebp
call fcn.004d3d7f
lea ecx, [esi + 0xc]
call fcn.004d3d7f
mov eax, dword [edi]
push 0x50a228
push eax
call fcn.004adbb0
add esp, 8
test eax, eax
jne 0x494f22
mov eax, dword [ebp]
push 0x510d50
push eax
call fcn.004adbb0
add esp, 8
test eax, eax
jne 0x494f22
push esi
lea ecx, [esp + 0x14]
push 0x510d44
push ecx
call fcn.004d3b86
push eax
mov ecx, esi
mov byte [esp + 0xd38], 0x1b
call fcn.004d39b6
lea ecx, [esp + 0x10]
mov byte [esp + 0xd34], 6
call fcn.004d387d
mov eax, dword [edi]
push 0x50a228
push eax
call fcn.004adbb0
add esp, 8
test eax, eax
jne 0x494f7c
mov eax, dword [ebp]
push 0x510d40
push eax
call fcn.004adbb0
add esp, 8
test eax, eax
jne 0x494f7c
push esi
lea edx, [esp + 0x14]
push 0x510d34
push edx
call fcn.004d3b86
push eax
mov ecx, esi
mov byte [esp + 0xd38], 0x1c
call fcn.004d39b6
lea ecx, [esp + 0x10]
mov byte [esp + 0xd34], 6
call fcn.004d387d
push 1
push 2
lea ecx, [esp + 0x20]
call fcn.004d21d5
mov ecx, dword [esp + 0x18]
mov eax, dword [edi]
push ecx
push eax
call fcn.004adbb0
add esp, 8
lea ecx, [esp + 0x18]
test eax, eax
sete bl
call fcn.004d387d
test bl, bl
je 0x494fb7
push 0x510c78
mov ecx, esi
call fcn.004d3a06
mov eax, dword [esi]
push 0x517348
push eax
call fcn.004adbb0
add esp, 8
test eax, eax
jne 0x495094
mov edi, dword [edi]
push 0x517348
push edi
call fcn.004adbb0
add esp, 8
test eax, eax
jne 0x495094
mov edx, dword [esp + 0x14]
mov eax, dword [edx - 8]
test eax, eax
jne 0x49501c
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x495001
push str.NO_FILE
jmp 0x495006
push str.NO_CONTENT
mov ecx, esi
call fcn.004d3a06
push str.NO_CONTENT
call fcn.00418d30
add esp, 4
jmp 0x495088
mov eax, dword [0x511ed0]
mov dword [esp + 0x18], eax
lea ecx, [esp + 0x10]
push 0x14
mov bl, 0x1d
push ecx
lea ecx, [esp + 0x1c]
mov byte [esp + 0xd3c], bl
call fcn.004d24f2
mov edx, dword [eax]
lea eax, [esp + 0x18]
push edx
push str.NULL_s
push eax
mov byte [esp + 0xd40], 0x1e
call fcn.004d2912
add esp, 0xc
lea ecx, [esp + 0x10]
mov byte [esp + 0xd34], bl
call fcn.004d387d
lea ecx, [esp + 0x18]
push ecx
mov ecx, esi
call fcn.004d39b6
lea ecx, [esp + 0x18]
mov byte [esp + 0xd34], 6
call fcn.004d387d
push 0x510d50
mov ecx, ebp
call fcn.004d3a06
lea ecx, [esp + 0x14]
mov byte [esp + 0xd34], 0
call fcn.004d387d
lea ecx, [esp + 0xd50]
mov dword [esp + 0xd34], 0x23
call fcn.004d387d
lea ecx, [esp + 0xd4c]
mov byte [esp + 0xd34], 0x22
call fcn.004d387d
lea ecx, [esp + 0xd48]
mov byte [esp + 0xd34], 0x21
call fcn.004d387d
lea ecx, [esp + 0xd44]
mov byte [esp + 0xd34], 0x20
call fcn.004d387d
lea ecx, [esp + 0xd40]
mov byte [esp + 0xd34], 0x1f
call fcn.004d387d
lea ecx, [esp + 0xd3c]
mov dword [esp + 0xd34], 0xffffffff
call fcn.004d387d
mov ecx, dword [esp + 0xd2c]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xd28
ret 0x18