Function at 0x40d7e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0xa014
call fcn.00429120
mov eax, dword [0x47a42c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x18]
push edi
mov edi, dword [ebp + 8]
test edi, edi
jne 0x40d814
or eax, 0xffffffff
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00428a27
mov esp, ebp
pop ebp
ret
push ebx
push esi
xor esi, esi
test eax, eax
cmovne esi, dword [ebp + 0x1c]
xor ebx, ebx
test esi, esi
cmovne ebx, eax
cmp esi, 0x9ff4
jbe 0x40d843
pop esi
pop ebx
mov eax, 0xffffffef
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00428a27
mov esp, ebp
pop ebp
ret
push 0x7d0
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40d86c
cmp eax, 0x102
mov esi, 0xffffff9c
mov ecx, 0xfffffff5
cmovne esi, ecx
jmp 0x40da35
push 0x9ff4
lea eax, [ebp - 0x9ff8]
push 0
push eax
call fcn.0042b800
mov eax, dword [ebp + 0xc]
add esp, 0xc
mov dword [ebp - 0xa014], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0xa010], eax
mov eax, dword [ebp + 0x14]
movq xmm0, qword [ebp - 0xa014]
mov dword [ebp - 0xa00c], eax
movq qword [ebp - 0xa004], xmm0
mov dword [ebp - 0x9ffc], eax
test ebx, ebx
je 0x40d8cc
test esi, esi
je 0x40d8cc
push esi
lea eax, [ebp - 0x9ff8]
push ebx
push eax
call fcn.0042b280
add esp, 0xc
cmp dword [edi + 4], 0
lea ebx, [esi + 0xc]
je 0x40da20
test ebx, ebx
je 0x40da1c
push 0xffffffffffffffff
push dword [edi + 0xc]
mov dword [ebp - 0xa008], 0
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40d911
cmp eax, 0x102
mov esi, 0xffffff9c
mov ecx, 0xfffffff5
cmovne esi, ecx
jmp 0x40da16
cmp dword [edi], 0xffffffff
jne 0x40d920
mov esi, 0xffffffe2
jmp 0x40da0d
lea esi, [edi + 0x24]
push esi
lea eax, [ebp - 0xa008]
push eax
push ebx
lea eax, [ebp - 0xa004]
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40d94a
mov esi, 0xfffffff4
jmp 0x40da02
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x40d98a
sub eax, 0x6d
je 0x40d980
sub eax, 0x7b
je 0x40d980
sub eax, 1
je 0x40d976
mov esi, 0xfffffff3
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40da0d
mov esi, 0xffffffed
jmp 0x40da0d
mov esi, 0xffffffee
jmp 0x40da0d
push 0xffffffffffffffff
push dword [edi + 0x34]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40d9ad
cmp eax, 0x102
mov esi, 0xffffff9c
mov ecx, 0xfffffff0
cmovne esi, ecx
jmp 0x40da0d
cmp dword [edi], 0xffffffff
jne 0x40d9b9
mov esi, 0xffffffe2
jmp 0x40da0d
push dword [edi + 0x34]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push 0
lea eax, [ebp - 0xa008]
push eax
push esi
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x40d9fd
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe8
je 0x40d9f0
mov esi, 0xfffffff2
cmp eax, 0x6d
jne 0x40d9f5
mov esi, 0xffffffee
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40da0d
mov esi, 0xfffffff1
xor eax, eax
cmp ebx, dword [ebp - 0xa008]
cmove esi, eax
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test esi, esi
jns 0x40da2c
jmp 0x40da23
xor esi, esi
jmp 0x40da2c
or esi, 0xffffffff
push edi
call fcn.0040d4f0
add esp, 4
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, 0xa000
lea eax, [ebp - 0xa004]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x40da40
mov ecx, dword [ebp - 4]
mov eax, esi
pop esi
pop ebx
xor ecx, ebp
pop edi
call fcn.00428a27
mov esp, ebp
pop ebp
ret