Function at 0x406be9
Capabilities:
Get common file path
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x83c
mov eax, dword [0x42600c]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x427944], 0
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, edx
push edi
jne 0x406c12
call fcn.00406b3f
cmp dword [0x427948], 2
jl 0x4070bc
push 0x422674
call fcn.0040b62e
cmp dword [0x427940], 0
pop ecx
lea edi, [eax*2 + 2]
jne 0x406dd7
push 0x208
lea eax, [ebp - 0x414]
push 0
push eax
call fcn.004095f0
push 0x208
lea eax, [ebp - 0x61c]
push 0
push eax
call fcn.004095f0
add esp, 0x18
lea eax, [ebp - 0x61c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x406c88
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4070be
push ecx
lea eax, [ebp - 0x61c]
mov edx, 0x82
push eax
push ecx
lea ecx, [ebp - 0x414]
call fcn.00403b0e
test eax, eax
js 0x4070be
push str.AdobeArmService.log
mov edx, 0x104
lea ecx, [ebp - 0x414]
call fcn.00403aa0
test eax, eax
js 0x4070be
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x427940], eax
cmp eax, 0xffffffff
jne 0x406d6e
push 0x104
lea eax, [ebp - 0x414]
push 0
push eax
call fcn.004095f0
pop ecx
pop ecx
lea eax, [ebp - 0x61c]
mov edx, 0x82
push eax
push ecx
lea ecx, [ebp - 0x414]
call fcn.00403b0e
test eax, eax
js 0x4070be
push str.AdobeArmService_NotLocked.log
mov edx, 0x104
lea ecx, [ebp - 0x414]
call fcn.00403aa0
test eax, eax
js 0x4070be
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x427940], eax
cmp eax, 0xffffffff
je 0x406c7d
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
je 0x406f7d
push 2
push 0
push 0
push dword [0x427940]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x838]
push eax
push edi
push 0x422674
push dword [0x427940]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x406c7d
push 0
lea eax, [ebp - 0x838]
push eax
push edi
push 0x422674
push dword [0x427940]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x406c7d
push 0x208
lea eax, [ebp - 0x824]
push 0
push eax
call fcn.004095f0
add esp, 0xc
lea eax, [ebp - 0x834]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [ebp - 0x826]
push eax
movzx eax, word [ebp - 0x828]
push eax
movzx eax, word [ebp - 0x82a]
push eax
movzx eax, word [ebp - 0x82c]
push eax
movzx eax, word [ebp - 0x82e]
push eax
movzx eax, word [ebp - 0x832]
push eax
movzx eax, word [ebp - 0x834]
push eax
push 0x422788
lea eax, [ebp - 0x824]
push 0x100
push eax
call fcn.00406b11
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.004095f0
add esp, 0x34
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jne 0x406e78
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x4070bc
push ecx
lea eax, [ebp - 0x824]
mov edx, 0x82
push eax
push ecx
lea ecx, [ebp - 0x20c]
call fcn.00403b0e
test eax, eax
js 0x4070be
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x406ebd
push ebx
mov edx, 0x104
lea ecx, [ebp - 0x20c]
call fcn.00403aa0
test eax, eax
js 0x4070be
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x406efe
push 0x4226e8
mov edx, 0x104
lea ecx, [ebp - 0x20c]
call fcn.00403aa0
test eax, eax
js 0x4070be
push esi
mov edx, 0x104
lea ecx, [ebp - 0x20c]
call fcn.00403aa0
test eax, eax
js 0x4070be
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x406ff6
cmp esi, 0x186a0
jne 0x406fa0
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebx, ebx
lea ecx, [ebp - 0x83c]
push ebx
push ebx
push ecx
push 0x400
push eax
push ebx
push 0x1100
mov dword [ebp - 0x83c], ebx
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
mov esi, 0x104
lea ecx, [ebp - 0x20c]
push 0x4226ec
mov edx, esi
call fcn.00403aa0
test eax, eax
js 0x4070be
push dword [ebp - 0x83c]
mov edx, esi
lea ecx, [ebp - 0x20c]
call fcn.00403aa0
test eax, eax
jns 0x406ffd
jmp 0x4070be
mov eax, 0xfeff
mov word [ebp - 0x83c], ax
lea eax, [ebp - 0x838]
push 0
push eax
push 2
lea eax, [ebp - 0x83c]
push eax
jmp 0x406da0
push 0x208
xor ebx, ebx
lea eax, [ebp - 0x61c]
push ebx
push eax
call fcn.004095f0
push 0xa
push 0x104
lea eax, [ebp - 0x61c]
push eax
push esi
call fcn.0040cf82
add esp, 0x1c
lea ecx, [ebp - 0x20c]
mov esi, 0x104
mov edx, esi
push str.___Error_Code:
call fcn.00403aa0
test eax, eax
js 0x4070be
lea eax, [ebp - 0x61c]
push eax
jmp 0x406f63
xor ebx, ebx
mov esi, 0x104
lea eax, [ebp - 0x20c]
push str.ISX_SERIALNUMBER
push eax
call fcn.00409374
pop ecx
pop ecx
test eax, eax
je 0x407056
push esi
lea eax, [ebp - 0x20c]
push ebx
push eax
call fcn.004095f0
pop ecx
pop ecx
lea eax, [ebp - 0x824]
mov edx, 0x82
push eax
push ecx
lea ecx, [ebp - 0x20c]
call fcn.00403b0e
test eax, eax
js 0x4070be
push str.Command_line:_Hidden
mov edx, esi
lea ecx, [ebp - 0x20c]
call fcn.00403aa0
test eax, eax
js 0x4070be
lea eax, [ebp - 0x20c]
push eax
call fcn.0040b62e
pop ecx
push ebx
lea ecx, [ebp - 0x838]
push ecx
lea eax, [eax*2 + 2]
push eax
lea eax, [ebp - 0x20c]
push eax
push dword [0x427940]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x406c7d
push ebx
lea eax, [ebp - 0x838]
push eax
push edi
push 0x422674
push dword [0x427940]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x406c7d
push dword [0x427940]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00407989
leave
ret