Function at 0x40a310
Capabilities:
Print debug messages
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x420
mov eax, dword [0x446044]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
xor eax, eax
mov esi, ecx
push 0x3fe
push eax
lea ecx, [ebp - 0x40a]
push ecx
mov dword [ebp - 0x410], esi
mov edi, edx
mov word [ebp - 0x40c], ax
call fcn.00426670
add esp, 0xc
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov edx, dword [ebp + 8]
mov esi, dword [edi + 0x13]
mov ecx, dword [edi + 0xb]
lea eax, [edx + edx]
mov edx, dword [edi + 0xf]
mov dword [ebp - 0x418], eax
mov dword [ebp - 0x420], ecx
mov dword [ebp - 0x41c], edx
test esi, esi
je 0x40a56a
push esi
call fcn.0041ea1c
mov ebx, eax
mov eax, dword [ebp - 0x418]
add esp, 4
push eax
call fcn.0041ea1c
add esp, 4
mov dword [ebp - 0x414], eax
test ebx, ebx
jne 0x40a3e4
mov ecx, dword [ebp - 0x410]
push esi
push ecx
push 0x43b110
lea edx, [ebp - 0x40c]
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x40c]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0041e7be
mov esp, ebp
pop ebp
ret
test eax, eax
jne 0x40a428
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x410]
push ecx
push edx
lea eax, [ebp - 0x40c]
push 0x43b110
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea ecx, [ebp - 0x40c]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0041e7be
mov esp, ebp
pop ebp
ret
push esi
add edi, 0x17
push edi
push ebx
call fcn.004259e0
mov edx, dword [ebp - 0x414]
add esp, 0xc
mov ecx, esi
mov eax, ebx
lea edi, [ebp - 0x418]
call fcn.00419170
test eax, eax
je 0x40a4a9
mov edx, dword [ebp + 8]
push esi
push edx
push eax
mov eax, dword [ebp - 0x410]
push eax
lea ecx, [ebp - 0x40c]
push 0x43b150
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x18
lea edx, [ebp - 0x40c]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push ebx
call fcn.0041e9e2
mov eax, dword [ebp - 0x414]
add esp, 4
push eax
call fcn.0041e9e2
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0041e7be
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x410]
push 0x43b1c8
push edi
call fcn.0041eb6e
mov esi, eax
add esp, 8
test esi, esi
jne 0x40a4ed
push ebx
call fcn.0041e9e2
mov ecx, dword [ebp - 0x414]
add esp, 4
push ecx
call fcn.0041e9e2
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str._ls_r_n
jmp 0x40a3b4
push 0
push 0
push esi
call fcn.0041f384
mov ecx, dword [ebp - 0x418]
mov edi, dword [ebp - 0x414]
add esp, 0xc
push esi
push ecx
push 1
push edi
call fcn.0041ff0e
push esi
call fcn.0041f51b
add esp, 0x14
push ebx
call fcn.0041e9e2
add esp, 4
push edi
call fcn.0041e9e2
mov edx, dword [ebp - 0x410]
add esp, 4
push 0
push 0x80
push 3
push 0
push 1
push 0x40000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40a56a
lea eax, [ebp - 0x420]
push eax
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.0041e7be
mov esp, ebp
pop ebp
ret