Function at 0x4fef45
Capabilities:
Write file on windows

Disassembly:
push 0x48
mov eax, 0x5240b8
call fcn.0051d3a0
mov edi, ecx
mov ecx, dword [ebp + 8]
lea edx, [ebp - 0x38]
xor ebx, ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
call fcn.004dd502
mov esi, eax
test esi, esi
js 0x4ff275
or dword [ebp - 0x24], 0xffffffff
lea eax, [ebp - 0x38]
or dword [ebp - 0x28], 0xffffffff
push ebx
push ebx
push 0x60
push ebx
push ebx
push 0x80
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x1c]
push ebx
push eax
lea eax, [ebp - 0x50]
mov dword [ebp - 0x50], 0x18
push eax
push 0xc0100000
lea eax, [ebp - 0x14]
mov dword [ebp - 0x4c], ebx
push eax
mov dword [ebp - 0x44], 0x40
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
call dword [sym.imp.NTDLL.dll_NtCreateFile]
mov esi, eax
test esi, esi
js 0x4ff275
push ebx
lea eax, [ebp - 0x28]
mov dword [ebp - 0x1c], ebx
push eax
push 0x4c
push edi
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x18], ebx
push eax
push ebx
push ebx
push ebx
push dword [ebp - 0x14]
call dword [sym.imp.NTDLL.dll_NtWriteFile]
mov esi, eax
test esi, esi
js 0x4ff275
mov eax, dword [edi + 0x14]
test al, 1
je 0x4ff0b4
push ebx
lea eax, [ebp - 0x28]
mov dword [ebp - 0x1c], ebx
push eax
push 2
lea eax, [edi + 0x598]
mov dword [ebp - 0x18], ebx
push eax
lea eax, [ebp - 0x1c]
push eax
push ebx
push ebx
push ebx
push dword [ebp - 0x14]
call dword [sym.imp.NTDLL.dll_NtWriteFile]
mov esi, eax
test esi, esi
js 0x4ff275
xor edx, edx
cmp dword [edi + 0x618], edx
jle 0x4ff07e
lea eax, [edi + 0x5a4]
mov dword [ebp - 0x54], eax
push edx
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x1c], edx
push ecx
push dword [eax - 8]
mov dword [ebp - 0x18], edx
push dword [eax]
lea eax, [ebp - 0x1c]
push eax
push edx
push edx
push edx
push dword [ebp - 0x14]
call dword [sym.imp.NTDLL.dll_NtWriteFile]
mov esi, eax
test esi, esi
js 0x4ff275
mov eax, dword [ebp - 0x54]
inc ebx
add eax, 0xc
push 0
mov dword [ebp - 0x54], eax
pop edx
cmp ebx, dword [edi + 0x618]
jl 0x4ff03f
xor ebx, ebx
xor eax, eax
push ebx
mov word [ebp - 0x2c], ax
lea eax, [ebp - 0x28]
push eax
push 2
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x1c], ebx
push eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x18], ebx
push eax
push ebx
push ebx
push ebx
push dword [ebp - 0x14]
call dword [sym.imp.NTDLL.dll_NtWriteFile]
mov esi, eax
test esi, esi
js 0x4ff275
mov eax, dword [edi + 0x14]
test al, 4
je 0x4ff0d1
push 4
push dword [ebp - 0x14]
mov ecx, edi
call fcn.004ff35e
mov esi, eax
test esi, esi
js 0x4ff275
mov eax, dword [edi + 0x14]
test al, 8
je 0x4ff0ee
push 8
push dword [ebp - 0x14]
mov ecx, edi
call fcn.004ff35e
mov esi, eax
test esi, esi
js 0x4ff275
mov eax, dword [edi + 0x14]
test al, 0x10
je 0x4ff10b
push 0x10
push dword [ebp - 0x14]
mov ecx, edi
call fcn.004ff35e
mov esi, eax
test esi, esi
js 0x4ff275
mov eax, dword [edi + 0x14]
test al, 0x20
je 0x4ff128
push 0x20
push dword [ebp - 0x14]
mov ecx, edi
call fcn.004ff35e
mov esi, eax
test esi, esi
js 0x4ff275
mov eax, dword [edi + 0x14]
test al, 0x40
je 0x4ff142
push 0x40
push dword [ebp - 0x14]
mov ecx, edi
call fcn.004ff35e
mov esi, eax
test esi, esi
js 0x4ff275
push ebx
lea eax, [ebp - 0x28]
mov dword [ebp - 0x1c], ebx
push eax
push 8
lea eax, [edi + 0x3b0]
mov dword [ebp - 0x18], ebx
push eax
lea eax, [ebp - 0x1c]
push eax
push ebx
push ebx
push ebx
push dword [ebp - 0x14]
call dword [sym.imp.NTDLL.dll_NtWriteFile]
mov esi, eax
test esi, esi
js 0x4ff275
mov dword [ebp - 0x54], ebx
cmp dword [edi + 0x614], ebx
jle 0x4ff1c1
lea ebx, [edi + 0x3c4]
xor ecx, ecx
lea eax, [ebp - 0x28]
push ecx
push eax
push dword [ebx - 8]
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], ecx
push dword [ebx]
mov dword [ebp - 0x18], ecx
push eax
push ecx
push ecx
push ecx
push dword [ebp - 0x14]
call dword [sym.imp.NTDLL.dll_NtWriteFile]
mov esi, eax
test esi, esi
js 0x4ff275
mov eax, dword [ebp - 0x54]
add ebx, 0x10
inc eax
mov dword [ebp - 0x54], eax
cmp eax, dword [edi + 0x614]
jl 0x4ff181
xor ebx, ebx
push ebx
lea eax, [ebp - 0x28]
mov dword [ebp - 0x1c], ebx
push eax
push 4
lea eax, [ebp - 0x30]
mov dword [ebp - 0x18], ebx
push eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x30], ebx
push eax
push ebx
push ebx
push ebx
push dword [ebp - 0x14]
call dword [sym.imp.NTDLL.dll_NtWriteFile]
mov esi, eax
test esi, esi
js 0x4ff248
test dword [edi + 0x14], 0x200
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
je 0x4ff221
push ebx
lea eax, [ebp - 0x28]
push eax
push 0x314
lea eax, [edi + 0x9c]
push eax
lea eax, [ebp - 0x1c]
push eax
push ebx
push ebx
push ebx
push dword [ebp - 0x14]
call dword [sym.imp.NTDLL.dll_NtWriteFile]
mov esi, eax
test esi, esi
js 0x4ff248
push ebx
lea eax, [ebp - 0x28]
mov dword [ebp - 0x1c], ebx
push eax
push 4
lea eax, [ebp - 0x30]
mov dword [ebp - 0x18], ebx
push eax
lea eax, [ebp - 0x1c]
push eax
push ebx
push ebx
push ebx
push dword [ebp - 0x14]
call dword [sym.imp.NTDLL.dll_NtWriteFile]
mov esi, eax
test esi, esi
jns 0x4ff279
lea ecx, [ebp - 0x38]
call fcn.0046128d
mov dword [ebp - 4], 0x1f
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4ff26d
cmp eax, 0xffffffff
je 0x4ff26d
push eax
mov dword [ebp - 0x14], ebx
call dword [sym.imp.NTDLL.dll_NtClose]
or dword [ebp - 4], 0xffffffff
mov eax, esi
jmp 0x4ff2a4
xor ebx, ebx
jmp 0x4ff248
lea ecx, [ebp - 0x38]
call fcn.0046128d
mov dword [ebp - 4], 0x21
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4ff29e
cmp eax, 0xffffffff
je 0x4ff29e
push eax
mov dword [ebp - 0x14], ebx
call dword [sym.imp.NTDLL.dll_NtClose]
or dword [ebp - 4], 0xffffffff
xor eax, eax
call fcn.0051d34a
ret 4