Function at 0x50e031
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x56a1a1
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.00506b89
push eax
call fcn.005070a7
push dword [ebp + 0xc]
lea edi, [ebx - 0x8c]
mov dword [esp + 0x20], eax
call fcn.0050dbd0
mov dword [esp + 0x14], eax
xor eax, eax
cmp dword [esp + 0x14], eax
jne 0x50e0a5
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.0049d29f
push 0x14
lea eax, [esp + 0x2c]
push edi
push eax
mov dword [esp + 0x54], 1
call fcn.00517e90
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 0x50e0f8
mov edx, dword [eax]
mov dword [esp + 0x18], edx
jmp 0x50e0fc
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 0x50e148
mov esi, dword [ebp + 8]
mov eax, dword [esi]
test eax, eax
je 0x50e12e
push eax
call fcn.004c6002
mov bl, 1
and dword [esi], 0
or dword [esp + 0x48], 0xffffffff
lea ecx, [esp + 0x20]
call fcn.0049d3d2
mov al, bl
jmp 0x50e090
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 0x3e5
cmp eax, edi
je 0x50e16e
push str.PushToDevice__WriteFile
push eax
push 0x1b
push dword [ebx - 0x50]
call fcn.005065e6
add esp, 0x10
xor bl, bl
jmp 0x50e133
push dword [esp + 0x1c]
push dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x50e1b8
push str.PushToDevice__WriteFile__WaitForSingleObject
cmp eax, 0x102
je 0x50e1a9
push edi
push 0x1b
push dword [ebx - 0x50]
call fcn.005065e6
add esp, 0x10
push dword [esi]
mov byte [esp + 0x17], 0
call dword [sym.imp.KERNEL32.dll_CancelIo]
jmp 0x50e222
push 0x20
push dword [ebx - 0x50]
call fcn.005065e6
add esp, 0xc
jmp 0x50e19a
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 0x50e204
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 0x50e222
push str.bytesWritten___MyDataLen
push 0
push 0x1b
push dword [ebx - 0x50]
call fcn.005065e6
jmp 0x50e21f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.PushToDevice__WriteFile__GetOverlappedResult
push eax
push 0x1b
push dword [ebx - 0x50]
call fcn.005065e6
mov byte [esp + 0x23], 0
add esp, 0x10
mov esi, dword [ebp + 8]
mov eax, dword [esi]
test eax, eax
je 0x50e231
push eax
call fcn.004c6002
mov bl, byte [esp + 0x13]
jmp 0x50e130