Function at 0x408a40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1988
call fcn.004119f0
mov eax, dword [0x427330]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
mov word [ebp - 0x858], ax
push 0x84e
push 0
lea ecx, [ebp - 0x856]
push ecx
call fcn.00411070
add esp, 0xc
push 0x4321e8
call fcn.00411a70
add esp, 4
test eax, eax
jne 0x408af7
push 0x104
push 0x4321e8
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x4321e8
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov dword [0x4321e0], eax
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push 0x4321e8
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x85c], eax
cmp dword [ebp - 0x85c], 0
je 0x408af7
lea edx, [ebp - 0x864]
push edx
push 0
push 0
mov eax, dword [ebp - 0x85c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileTime]
mov ecx, dword [ebp - 0x85c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x427048], 0
je 0x408c80
cmp dword [0x4321dc], 0
jne 0x408b4d
push 0x422ac0
push 0
call dword [sym.imp.USER32.dll_FindWindowW]
mov dword [0x4321dc], eax
cmp dword [0x4321dc], 0
jne 0x408b4d
push 0
push 0x422ad4
call dword [sym.imp.USER32.dll_FindWindowW]
mov dword [0x4321dc], eax
cmp dword [0x4321dc], 0
jne 0x408b4d
mov dword [0x4321dc], 0xffffffff
cmp dword [0x4321dc], 0xffffffff
je 0x408c80
xor edx, edx
mov word [ebp - 0x1088], dx
push 0x800
push 0
lea eax, [ebp - 0x1086]
push eax
call fcn.00411070
add esp, 0xc
lea ecx, [ebp + 0xc]
mov dword [ebp - 0x86c], ecx
mov edx, dword [ebp - 0x86c]
push edx
mov eax, dword [ebp + 8]
push eax
push 0x401
lea ecx, [ebp - 0x1088]
push ecx
call fcn.00413b3d
add esp, 0x10
lea edx, [ebp - 0x1088]
push edx
mov eax, dword [0x4321e0]
push eax
push 0x422ae8
push 0x428
lea ecx, [ebp - 0x858]
push ecx
call fcn.00411a1b
add esp, 0x14
mov dword [ebp - 0x108c], 0
mov dword [ebp - 0x878], 0
lea edx, [ebp - 0x858]
mov dword [ebp - 0x87c], edx
cmp dword [ebp - 0x87c], 0
jne 0x408bfc
mov dword [ebp - 0x1984], 0
jmp 0x408c44
mov eax, dword [ebp - 0x87c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax + eax + 2]
mov dword [ebp - 0x868], ecx
mov eax, dword [ebp - 0x868]
call fcn.00413b60
mov dword [ebp - 0x1988], esp
mov edx, dword [ebp - 0x868]
push edx
mov eax, dword [ebp - 0x87c]
push eax
mov ecx, dword [ebp - 0x1988]
push ecx
call fcn.00409200
mov dword [ebp - 0x1984], eax
mov edx, dword [ebp - 0x1984]
mov dword [ebp - 0x870], edx
lea eax, [ebp - 0x858]
push eax
call fcn.00411a70
add esp, 4
add eax, 1
mov dword [ebp - 0x874], eax
lea ecx, [ebp - 0x878]
push ecx
push 0
push 0x4a
mov edx, dword [0x4321dc]
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
cmp dword [0x427044], 0
je 0x408db9
cmp dword [0x4321d8], 0
jne 0x408cbb
push 0
push 0x422af8
call dword [sym.imp.USER32.dll_FindWindowW]
mov dword [0x4321d8], eax
cmp dword [0x4321d8], 0
jne 0x408cbb
mov dword [0x4321d8], 0xffffffff
cmp dword [0x4321d8], 0xffffffff
je 0x408db9
xor eax, eax
mov word [ebp - 0x1978], ax
push 0x800
push 0
lea ecx, [ebp - 0x1976]
push ecx
call fcn.00411070
add esp, 0xc
xor edx, edx
mov word [ebp - 0x1170], dx
push 0xc6
push 0
lea eax, [ebp - 0x116e]
push eax
call fcn.00411070
add esp, 0xc
lea ecx, [ebp - 0x10a8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push 0x64
lea edx, [ebp - 0x1170]
push edx
push 0
lea eax, [ebp - 0x10a8]
push eax
push 0x80000008
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTimeFormatW]
lea ecx, [ebp + 0xc]
mov dword [ebp - 0x1094], ecx
mov edx, dword [ebp - 0x1094]
push edx
mov eax, dword [ebp + 8]
push eax
push 0x401
lea ecx, [ebp - 0x1978]
push ecx
call fcn.00413b3d
add esp, 0x10
lea edx, [ebp - 0x1978]
push edx
mov eax, dword [0x4321e0]
push eax
lea ecx, [ebp - 0x1170]
push ecx
push 0x422b00
push 0x428
lea edx, [ebp - 0x858]
push edx
call fcn.00411a1b
add esp, 0x18
push 0x78
mov eax, dword [0x4321d8]
push eax
call dword [sym.imp.USER32.dll_GetDlgItem]
mov dword [ebp - 0x1098], eax
lea ecx, [ebp - 0x858]
push ecx
push 0
push 0x180
mov edx, dword [ebp - 0x1098]
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
cmp dword [0x4321d4], 0
je 0x408e59
push 0
push 0
push 4
push 0
push 0
push 0xc0000000
push 0x422b18
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x197c], eax
cmp dword [ebp - 0x197c], 0xffffffff
je 0x408e59
push 2
push 0
push 0
mov eax, dword [ebp - 0x197c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea ecx, [ebp - 0x1980]
push ecx
lea edx, [ebp - 0x858]
push edx
call fcn.00411a70
add esp, 4
push eax
lea eax, [ebp - 0x858]
push eax
mov ecx, dword [ebp - 0x197c]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea edx, [ebp - 0x1980]
push edx
push 2
push 0x422b30
mov eax, dword [ebp - 0x197c]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x197c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea esp, [ebp - 0x1988]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00411054
mov esp, ebp
pop ebp
ret