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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40d200
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0xa5c
mov eax, dword [0x413018]
xor eax, ebp
mov dword [ebp - 0x20], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
movzx eax, byte [0x41380c]
test eax, eax
jne 0x409452
call fcn.00409370
mov ecx, dword [ebp + 8]
cmp ecx, dword [0x413804]
jle 0x409464
xor eax, eax
jmp 0x409aaf
mov dword [ebp - 0x18], 0x40f270
mov dword [ebp - 0x22c], str.error_writing_to_file:
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.MSVCR90.dll_wcslen]
add esp, 4
lea eax, [eax + eax + 2]
mov dword [ebp - 0x1c], eax
cmp dword [0x413808], 0
jne 0x40975c
xor ecx, ecx
mov word [ebp - 0x648], cx
push 0x206
push 0
lea edx, [ebp - 0x646]
push edx
call sub.MSVCR90.dll_memset
add esp, 0xc
xor eax, eax
mov word [ebp - 0x850], ax
push 0x206
push 0
lea ecx, [ebp - 0x84e]
push ecx
call sub.MSVCR90.dll_memset
add esp, 0xc
lea edx, [ebp - 0x850]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x4094f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x409aaf
lea eax, [ebp - 0x850]
push eax
push 0x104
lea ecx, [ebp - 0x648]
push ecx
call fcn.00406370
mov dword [ebp - 0x230], eax
cmp dword [ebp - 0x230], 0
jge 0x409527
mov eax, dword [ebp - 0x230]
jmp 0x409aaf
push str.AdobeArmService.log
push 0x104
lea edx, [ebp - 0x648]
push edx
call fcn.004063c0
mov dword [ebp - 0x230], eax
cmp dword [ebp - 0x230], 0
jge 0x409557
mov eax, dword [ebp - 0x230]
jmp 0x409aaf
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
lea eax, [ebp - 0x648]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x413808], eax
cmp dword [0x413808], 0xffffffff
jne 0x409638
push 0x104
push 0
lea ecx, [ebp - 0x648]
push ecx
call sub.MSVCR90.dll_memset
add esp, 0xc
lea edx, [ebp - 0x850]
push edx
push 0x104
lea eax, [ebp - 0x648]
push eax
call fcn.00406370
mov dword [ebp - 0x230], eax
cmp dword [ebp - 0x230], 0
jge 0x4095d0
mov eax, dword [ebp - 0x230]
jmp 0x409aaf
push str.AdobeArmService_NotLocked.log
push 0x104
lea ecx, [ebp - 0x648]
push ecx
call fcn.004063c0
mov dword [ebp - 0x230], eax
cmp dword [ebp - 0x230], 0
jge 0x409600
mov eax, dword [ebp - 0x230]
jmp 0x409aaf
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
lea edx, [ebp - 0x648]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x413808], eax
cmp dword [0x413808], 0xffffffff
jne 0x409638
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x409aaf
push 0
mov eax, dword [0x413808]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x43c], eax
cmp dword [ebp - 0x43c], 0
jbe 0x4096de
mov dword [ebp - 4], 0
push 2
push 0
push 0
mov ecx, dword [0x413808]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea edx, [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [0x413808]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40969d
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x409aaf
push 0
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [0x413808]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4096c6
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x409aaf
jmp 0x4096d5
mov dword [ebp - 4], 0xffffffff
jmp 0x40975c
mov dword [ebp - 4], 2
mov ecx, 0xfeff
mov word [ebp - 0x854], cx
push 0
lea edx, [ebp - 0x14]
push edx
push 2
lea eax, [ebp - 0x854]
push eax
mov ecx, dword [0x413808]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40971c
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x409aaf
push 0
lea edx, [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [0x413808]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x409746
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x409aaf
jmp 0x409755
mov dword [ebp - 4], 0xffffffff
xor eax, eax
mov word [ebp - 0x438], ax
push 0x206
push 0
lea ecx, [ebp - 0x436]
push ecx
call sub.MSVCR90.dll_memset
add esp, 0xc
lea edx, [ebp - 0x438]
push edx
call fcn.00409320
add esp, 4
xor eax, eax
mov word [ebp - 0x228], ax
push 0x206
push 0
lea ecx, [ebp - 0x226]
push ecx
call sub.MSVCR90.dll_memset
add esp, 0xc
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jne 0x4097c9
mov eax, dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x409aad
lea ecx, [ebp - 0x438]
push ecx
push 0x104
lea edx, [ebp - 0x228]
push edx
call fcn.00406370
mov dword [ebp - 0x230], eax
cmp dword [ebp - 0x230], 0
jge 0x4097fb
mov eax, dword [ebp - 0x230]
jmp 0x409aaf
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x409838
mov ecx, dword [ebp + 0xc]
push ecx
push 0x104
lea edx, [ebp - 0x228]
push edx
call fcn.004063c0
mov dword [ebp - 0x230], eax
cmp dword [ebp - 0x230], 0
jge 0x409838
mov eax, dword [ebp - 0x230]
jmp 0x409aaf
mov eax, dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x4098a5
push 0x40f314
push 0x104
lea ecx, [ebp - 0x228]
push ecx
call fcn.004063c0
mov dword [ebp - 0x230], eax
cmp dword [ebp - 0x230], 0
jge 0x409876
mov eax, dword [ebp - 0x230]
jmp 0x409aaf
mov edx, dword [ebp + 0x10]
push edx
push 0x104
lea eax, [ebp - 0x228]
push eax
call fcn.004063c0
mov dword [ebp - 0x230], eax
cmp dword [ebp - 0x230], 0
jge 0x4098a5
mov eax, dword [ebp - 0x230]
jmp 0x409aaf
cmp dword [ebp + 0x14], 0
je 0x4099f9
cmp dword [ebp + 0x14], 0x186a0
jne 0x40995d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x85c], eax
mov dword [ebp - 0x858], 0
push 0
push 0
lea ecx, [ebp - 0x858]
push ecx
push 0x400
mov edx, dword [ebp - 0x85c]
push edx
push 0
push 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
push 0x40f318
push 0x104
lea eax, [ebp - 0x228]
push eax
call fcn.004063c0
mov dword [ebp - 0x230], eax
cmp dword [ebp - 0x230], 0
jge 0x409926
mov eax, dword [ebp - 0x230]
jmp 0x409aaf
mov ecx, dword [ebp - 0x858]
push ecx
push 0x104
lea edx, [ebp - 0x228]
push edx
call fcn.004063c0
mov dword [ebp - 0x230], eax
cmp dword [ebp - 0x230], 0
jge 0x409958
mov eax, dword [ebp - 0x230]
jmp 0x409aaf
jmp 0x4099f9
xor eax, eax
mov word [ebp - 0xa68], ax
push 0x206
push 0
lea ecx, [ebp - 0xa66]
push ecx
call sub.MSVCR90.dll_memset
add esp, 0xc
push 0xa
push 0x104
lea edx, [ebp - 0xa68]
push edx
mov eax, dword [ebp + 0x14]
push eax
call dword [sym.imp.MSVCR90.dll__itow_s]
add esp, 0x10
push str.___Error_Code:
push 0x104
lea ecx, [ebp - 0x228]
push ecx
call fcn.004063c0
mov dword [ebp - 0x230], eax
cmp dword [ebp - 0x230], 0
jge 0x4099c7
mov eax, dword [ebp - 0x230]
jmp 0x409aaf
lea edx, [ebp - 0xa68]
push edx
push 0x104
lea eax, [ebp - 0x228]
push eax
call fcn.004063c0
mov dword [ebp - 0x230], eax
cmp dword [ebp - 0x230], 0
jge 0x4099f9
mov eax, dword [ebp - 0x230]
jmp 0x409aaf
mov dword [ebp - 4], 4
lea ecx, [ebp - 0x228]
push ecx
call dword [sym.imp.MSVCR90.dll_wcslen]
add esp, 4
lea edx, [eax + eax + 2]
mov dword [ebp - 0xa6c], edx
push 0
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0xa6c]
push ecx
lea edx, [ebp - 0x228]
push edx
mov eax, dword [0x413808]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x409a46
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x409aaf
push 0
lea ecx, [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [0x413808]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x409a6d
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x409aaf
jmp 0x409a7c
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 4], 6
mov edx, dword [0x413808]
push edx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
jmp 0x409aa6
mov dword [ebp - 4], 0xffffffff
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x20]
xor ecx, ebp
call fcn.00407f30
mov esp, ebp
pop ebp
ret