Function at 0x409300
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46a830
mov eax, dword fs:[0]
push eax
mov eax, 0x8050
call fcn.004443c0
mov eax, dword [0x4ab7b4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x8054], ecx
mov eax, dword [ebp + 0xc]
or esi, 0xffffffff
mov ebx, dword [ebp + 8]
xor edi, edi
mov dword [ebp - 0x805c], eax
mov dword [ebp - 0x8058], esi
mov dword [ebp - 4], edi
test eax, eax
jne 0x40935e
lea eax, [edi + 0x57]
jmp 0x409682
push ecx
lea ecx, [ebp - 0x8048]
mov dword [ebp - 0x8028], 0
mov dword [ebp - 0x8024], 0
mov dword [ebp - 0x8020], 0
mov dword [ebp - 0x8044], 0
mov dword [ebp - 0x8048], 0
call fcn.00409860
add esp, 4
test eax, eax
jne 0x409682
cmp dword [ebx + 0x18], 8
lea eax, [ebx + 4]
jb 0x4093b2
mov eax, dword [eax]
push 0
push 0x80
push 2
push 0
push 3
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x8050], ebx
cmp ebx, 0xffffffff
je 0x40967c
mov esi, ebx
mov dword [ebp - 0x8058], esi
jmp 0x4093f0
mov eax, dword [ebp - 0x8054]
push dword [eax + 4]
lea eax, [ebp - 0x8044]
push eax
push 0x4000
lea eax, [ebp - 0x4010]
push eax
call dword [ebp - 0x805c]
test eax, eax
je 0x409613
cmp dword [ebp - 0x8044], 0
je 0x4094dc
lea eax, [ebp - 0x4010]
mov dword [ebp - 0x8048], eax
jmp 0x409440
lea eax, [ebp - 0x8010]
mov dword [ebp - 0x8038], 0x4000
xor edx, edx
mov dword [ebp - 0x803c], eax
lea ecx, [ebp - 0x8048]
call fcn.00409aa0
mov edi, eax
cmp edi, 2
je 0x409609
cmp edi, 0xfffffffc
je 0x40958a
cmp edi, 0xfffffffd
je 0x40958a
push 0
lea eax, [ebp - 0x804c]
mov dword [ebp - 0x804c], 0
push eax
mov ebx, 0x4000
lea eax, [ebp - 0x8010]
sub ebx, dword [ebp - 0x8038]
push ebx
push eax
push dword [ebp - 0x8050]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x409582
cmp dword [ebp - 0x804c], ebx
jne 0x40957d
cmp dword [ebp - 0x8038], 0
je 0x409440
cmp edi, 1
jne 0x4093f0
cmp dword [ebp - 0x8028], 0
je 0x409545
mov edx, dword [ebp - 0x8024]
test edx, edx
je 0x409545
mov ecx, dword [ebp - 0x802c]
test ecx, ecx
je 0x409545
lea eax, [ebp - 0x8048]
cmp dword [ecx], eax
jne 0x409545
mov eax, dword [ecx + 4]
sub eax, 0x3f34
cmp eax, 0x1f
ja 0x409545
mov eax, dword [ecx + 0x38]
test eax, eax
je 0x40952f
push eax
push dword [ebp - 0x8020]
call edx
mov edx, dword [ebp - 0x8024]
add esp, 8
mov ecx, dword [ebp - 0x802c]
push ecx
push dword [ebp - 0x8020]
call edx
add esp, 8
mov dword [ebp - 0x802c], 0
mov ebx, dword [ebp - 0x8050]
push ebx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
cmp edi, 1
jne 0x409570
mov ecx, dword [ebp - 0x8054]
lea eax, [ecx + 8]
push eax
lea eax, [ecx + 0x18]
push eax
lea eax, [ecx + 0x10]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
dec edi
neg edi
sbb edi, edi
and edi, 0xfffffffd
jmp 0x409684
or edi, 0xffffffff
jmp 0x40958a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp dword [ebp - 0x8028], 0
je 0x409684
mov edx, dword [ebp - 0x8024]
test edx, edx
je 0x409684
mov ecx, dword [ebp - 0x802c]
test ecx, ecx
je 0x409684
lea eax, [ebp - 0x8048]
cmp dword [ecx], eax
jne 0x409684
mov eax, dword [ecx + 4]
sub eax, 0x3f34
cmp eax, 0x1f
ja 0x409684
mov eax, dword [ecx + 0x38]
test eax, eax
je 0x4095f1
push eax
push dword [ebp - 0x8020]
call edx
mov edx, dword [ebp - 0x8024]
add esp, 8
mov ecx, dword [ebp - 0x802c]
push ecx
push dword [ebp - 0x8020]
call edx
add esp, 8
mov dword [ebp - 0x802c], 0
jmp 0x409684
mov edi, 0xfffffffd
jmp 0x40958a
cmp dword [ebp - 0x8028], 0
je 0x40967c
mov edx, dword [ebp - 0x8024]
test edx, edx
je 0x40967c
mov ecx, dword [ebp - 0x802c]
test ecx, ecx
je 0x40967c
lea eax, [ebp - 0x8048]
cmp dword [ecx], eax
jne 0x40967c
mov eax, dword [ecx + 4]
sub eax, 0x3f34
cmp eax, 0x1f
ja 0x40967c
mov eax, dword [ecx + 0x38]
test eax, eax
je 0x409666
push eax
push dword [ebp - 0x8020]
call edx
mov edx, dword [ebp - 0x8024]
add esp, 8
mov ecx, dword [ebp - 0x802c]
push ecx
push dword [ebp - 0x8020]
call edx
add esp, 8
mov dword [ebp - 0x802c], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp esi, 0xffffffff
je 0x409699
cmp dword [sym.imp.KERNEL32.dll_CloseHandle], 0
je 0x409699
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00443e8b
mov esp, ebp
pop ebp
ret 8