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

Disassembly:
mov eax, 0x1c6c
call fcn.00401d60
mov eax, dword [esp + 0x1c74]
push esi
mov esi, dword [esp + 0x1c74]
push edi
push 0
push 0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea ecx, [esp + 8]
push 0
push ecx
lea edx, [esp + 0xc7c]
push 0x1000
push edx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4013f0
pop edi
xor al, al
pop esi
add esp, 0x1c6c
ret
lea eax, [esp + 0x20]
push 0x10
push eax
lea ecx, [esp + 0xc7c]
push str.WrapType
push ecx
call fcn.004017a0
add esp, 0x10
test al, al
je 0x401663
lea edx, [esp + 0x20]
push str.Lite
push edx
call fcn.00405890
add esp, 8
test eax, eax
jne 0x401663
lea eax, [esp + 0x274]
push 0x100
push eax
lea ecx, [esp + 0xc7c]
push str.Publisher
push ecx
call fcn.004017a0
add esp, 0x10
test al, al
je 0x40170f
mov al, byte [esp + 0x274]
test al, al
je 0x40170f
lea edx, [esp + 0x70]
push 0x100
push edx
lea eax, [esp + 0xc7c]
push str.Title
push eax
call fcn.004017a0
add esp, 0x10
test al, al
je 0x40170f
mov al, byte [esp + 0x70]
test al, al
je 0x40170f
lea ecx, [esp + 0x374]
push 0x100
push ecx
lea edx, [esp + 0xc7c]
push str.AppVersion
push edx
call fcn.004017a0
add esp, 0x10
test al, al
je 0x40170f
mov al, byte [esp + 0x374]
test al, al
je 0x40170f
lea eax, [esp + 0x374]
lea ecx, [esp + 0x70]
push eax
lea edx, [esp + 0x278]
push ecx
push edx
lea eax, [esp + 0x880]
push str.SoftwareDigital_RiverSoftwarePassport_s_s_s
push eax
call fcn.00401d0c
lea ecx, [esp + 0x488]
push 0x400
push ecx
lea edx, [esp + 0xc90]
push str.BuyURL
push edx
call fcn.004017a0
add esp, 0x24
test al, al
je 0x40160c
lea eax, [esp + 0xc]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
mov ecx, dword [esp + 0x1e]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x1a]
and ecx, 0xffff
push ecx
mov ecx, dword [esp + 0x1c]
and edx, 0xffff
and eax, 0xffff
push edx
mov edx, dword [esp + 0x1e]
and ecx, 0xffff
push eax
mov eax, dword [esp + 0x1e]
push ecx
mov ecx, dword [esp + 0x20]
and edx, 0xffff
and eax, 0xffff
push edx
and ecx, 0xffff
push eax
push ecx
lea edx, [esp + 0x50]
push str._04u_02u_02u_02u_02u_02u_04u
push edx
call fcn.00401d0c
mov edi, str.hardwareSignatureLite_
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x49c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x49c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x58]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x49c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x8a0]
push str.BuyURL
push ecx
push 0x80000001
call fcn.00401720
add esp, 0x34
pop ebx
lea edx, [esp + 0x474]
push 0x400
push edx
lea eax, [esp + 0xc7c]
push str.CsrURL
push eax
call fcn.004017a0
add esp, 0x10
test al, al
je 0x40170f
lea ecx, [esp + 0x474]
lea edx, [esp + 0x874]
push ecx
push str.CsrURL
push edx
push 0x80000001
call fcn.00401720
add esp, 0x10
mov al, 1
pop edi
pop esi
add esp, 0x1c6c
ret
lea eax, [esp + 0x170]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov ecx, dword [0x407a04]
mov edx, dword [0x407a00]
push ecx
push edx
push str._08X_08X.tmp
lea eax, [esp + 0x17c]
push 0
push eax
call fcn.00401c50
add esp, 8
push eax
call fcn.00401d0c
add esp, 0x10
lea ecx, [esp + 0x170]
push 0
push 0
push 2
push 0
push 0
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4016d3
pop edi
xor al, al
pop esi
add esp, 0x1c6c
ret
lea edi, [esp + 0xc74]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 8]
repne scasb al, byte es:[edi]
not ecx
push eax
push edx
lea eax, [esp + 0xc7c]
push ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x401708
pop edi
xor al, al
pop esi
add esp, 0x1c6c
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov al, 1
pop esi
add esp, 0x1c6c
ret