Function at 0x50de5f
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x569ea8
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x5f7350]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
mov ebx, ecx
mov ecx, dword [ebx - 0x50]
push 5
pop edx
call fcn.00506997
push eax
call fcn.00506eb5
push dword [ebp + 0xc]
lea edi, [ebx - 0x8c]
mov dword [esp + 0x20], eax
call fcn.0050da00
mov dword [esp + 0x14], eax
xor eax, eax
cmp dword [esp + 0x14], eax
jne 0x50ded3
xor al, al
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov dword [esp + 0x24], eax
push eax
mov dword [esp + 0x4c], eax
push eax
xor edi, edi
lea esi, [esp + 0x28]
mov dword [esp + 0x28], vtable.GFE::Windows::Event.0
call fcn.0049d7a8
push 0x14
lea eax, [esp + 0x2c]
push edi
push eax
mov dword [esp + 0x54], 1
call fcn.00517bf0
mov eax, dword [esp + 0x30]
mov dword [esp + 0x44], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov ecx, dword [eax + 0x10]
add esp, 0xc
cmp dword [eax + 0x14], 0x10
jb 0x50df26
mov edx, dword [eax]
mov dword [esp + 0x18], edx
jmp 0x50df2a
mov dword [esp + 0x18], eax
mov eax, dword [eax + 0x1c]
mov esi, dword [esp + 0x14]
mov edx, dword [esi]
lea edi, [esp + 0x28]
push edi
push 0
sub ecx, eax
add eax, dword [esp + 0x20]
push ecx
push eax
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x50df76
mov esi, dword [ebp + 8]
mov eax, dword [esi]
test eax, eax
je 0x50df5c
push eax
call fcn.004c5fd4
mov bl, 1
and dword [esi], 0
or dword [esp + 0x48], 0xffffffff
lea ecx, [esp + 0x20]
call fcn.0049d8bc
mov al, bl
jmp 0x50debe
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 0x3e5
cmp eax, edi
je 0x50df9c
push str.PushToDevice__WriteFile
push eax
push 0x1b
push dword [ebx - 0x50]
call fcn.005063f4
add esp, 0x10
xor bl, bl
jmp 0x50df61
push dword [esp + 0x1c]
push dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x50dfe6
push str.PushToDevice__WriteFile__WaitForSingleObject
cmp eax, 0x102
je 0x50dfd7
push edi
push 0x1b
push dword [ebx - 0x50]
call fcn.005063f4
add esp, 0x10
push dword [esi]
mov byte [esp + 0x17], 0
call dword [sym.imp.KERNEL32.dll_CancelIo]
jmp 0x50e050
push 0x20
push dword [ebx - 0x50]
call fcn.005063f4
add esp, 0xc
jmp 0x50dfc8
mov esi, dword [esi]
and dword [esp + 0x18], 0
push 0
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x30]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x50e032
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov eax, dword [ecx + 0x10]
sub eax, dword [ecx + 0x1c]
cmp dword [esp + 0x18], eax
sete byte [esp + 0x13]
cmp byte [esp + 0x13], 0
jne 0x50e050
push str.bytesWritten___MyDataLen
push 0
push 0x1b
push dword [ebx - 0x50]
call fcn.005063f4
jmp 0x50e04d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.PushToDevice__WriteFile__GetOverlappedResult
push eax
push 0x1b
push dword [ebx - 0x50]
call fcn.005063f4
mov byte [esp + 0x23], 0
add esp, 0x10
mov esi, dword [ebp + 8]
mov eax, dword [esi]
test eax, eax
je 0x50e05f
push eax
call fcn.004c5fd4
mov bl, byte [esp + 0x13]
jmp 0x50df5e