Function at 0x407fc0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x344
mov eax, dword [0x4af6f0]
xor eax, esp
mov dword [esp + 0x340], eax
push ebx
push ebp
mov ebp, dword [esp + 0x350]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
xor ebx, ebx
push edi
mov edi, ecx
lea ecx, [esp + 0x1c]
mov eax, 0x110
push ecx
mov dword [esp + 0x30], edi
mov byte [0x4d2660], 1
mov byte [esp + 0x1f], bl
mov byte [esp + 0x17], bl
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x1e6], bl
mov byte [esp + 0x20e], bl
mov dword [esp + 0x1da], ebx
mov word [esp + 0x1d8], ax
call esi
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x1da], edx
lea edx, [esp + 0x1c]
mov ecx, 0x110
push edx
mov dword [esp + 0x1e2], eax
mov dword [esp + 0x24e], ebx
mov byte [esp + 0x6a], bl
mov byte [esp + 0x92], bl
mov dword [esp + 0x5e], ebx
mov word [esp + 0x5c], cx
call esi
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x5e], eax
lea edx, [esp + 0x13]
push edx
lea eax, [esp + 0x1f]
push eax
push ebx
mov dword [esp + 0x6e], ecx
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x68]
push edx
push ebx
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x1f0]
push ecx
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x40]
push eax
push edi
lea edx, [esp + 0x54]
lea ecx, [esp + 0x50]
mov dword [esp + 0xfa], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x40], ebx
call fcn.00406570
add esp, 0x2c
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov cl, byte [esp + 0x3c]
dec cl
mov byte [esp + 0x13], bl
cmp cl, 5
jbe 0x408106
mov dl, byte [esp + 0x50]
dec dl
cmp dl, 5
jbe 0x408106
mov esi, 2
mov dword [0x4d2664], esi
mov byte [0x4d2670], 1
mov byte [0x4d2671], 1
jmp 0x408248
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x5c]
push ecx
push edx
lea esi, [esp + 0x3c]
lea edi, [esp + 0x1e0]
call fcn.00406dd0
add esp, 0xc
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebx
je 0x408158
cmp esi, 0xb7
jne 0x408230
cmp ebp, 0xffffffff
je 0x408230
lea eax, [esp + 0x13]
push eax
push ebp
mov ecx, 0x4d2348
call fcn.00407250
mov esi, eax
cmp esi, ebx
jne 0x40822a
cmp byte [esp + 0x13], bl
jne 0x40822a
mov edi, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
push ebx
lea ecx, [esp + 0x18]
push ecx
dec edi
push edi
push edx
push ebp
mov byte [0x4d2670], 1
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40821b
cmp edi, dword [esp + 0x14]
jne 0x408214
mov al, byte [esp + 0x3c]
dec al
cmp al, 5
ja 0x4081fe
mov cl, byte [esp + 0x50]
dec cl
cmp cl, 5
ja 0x4081fe
mov eax, dword [esp + 0x28]
push ebx
lea edx, [esp + 0x18]
push edx
push edi
push eax
push ebp
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40821b
cmp edi, dword [esp + 0x14]
jne 0x408214
mov ecx, dword [esp + 0x2c]
push ecx
mov byte [0x4d2671], 1
call fcn.00411fe0
add esp, 4
jmp 0x408241
mov edx, dword [esp + 0x2c]
push edx
mov byte [0x4d2671], 1
call fcn.00411fe0
add esp, 4
jmp 0x408241
mov byte [esp + 0x13], 0x1a
jmp 0x408241
mov byte [esp + 0x13], 0x19
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x408241
mov al, byte [esp + 0x13]
jmp 0x408236
mov al, 6
mov byte [esp + 0x13], al
mov dword [0x4d2664], esi
mov byte [0x4d2661], al
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x24]
mov cl, byte [esp + 0x13]
mov byte [0x4d2668], bl
mov byte [0x4d2669], cl
mov dword [0x4d266c], esi
cmp eax, ebx
je 0x40826f
push eax
call fcn.0046eb03
add esp, 4
mov eax, dword [esp + 0x28]
cmp eax, ebx
je 0x408280
push eax
call fcn.0046eb03
add esp, 4
mov ecx, dword [esp + 0x350]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0046ebfa
add esp, 0x344
ret