Function at 0x51a15c
Capabilities:
Write file on windows

Disassembly:
push 0x4c
mov eax, 0x544966
call fcn.0052c05f
mov edi, ecx
mov ecx, dword [ebp + 8]
lea edx, [ebp - 0x24]
xor esi, esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], esi
call fcn.004f68b0
mov ebx, eax
test ebx, ebx
jns 0x51a1bb
mov dword [ebp - 4], esi
lea ecx, [ebp - 0x24]
call fcn.0046a3ff
mov dword [ebp - 4], 2
or esi, 0xffffffff
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x51a1b1
cmp eax, esi
je 0x51a1b1
and dword [ebp - 0x14], 0
push eax
call dword [sym.imp.NTDLL.dll_NtClose]
mov dword [ebp - 4], esi
mov eax, ebx
jmp 0x51a65d
xor ecx, ecx
mov dword [ebp - 0x50], 0x18
push ecx
push ecx
push 0x60
push ecx
push ecx
push 0x80
lea eax, [ebp - 0x24]
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x48], eax
or esi, 0xffffffff
push ecx
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x44], 0x40
push eax
lea eax, [ebp - 0x50]
mov dword [ebp - 0x40], ecx
push eax
push 0xc0100000
lea eax, [ebp - 0x14]
mov dword [ebp - 0x3c], ecx
push eax
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], ecx
call dword [sym.imp.NTDLL.dll_NtCreateFile]
mov ebx, eax
test ebx, ebx
jns 0x51a22d
mov dword [ebp - 4], 3
lea ecx, [ebp - 0x24]
call fcn.0046a3ff
mov dword [ebp - 4], 5
jmp 0x51a19b
xor ecx, ecx
lea eax, [ebp - 0x30]
push ecx
push eax
push 0x4c
push edi
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], ecx
push eax
push ecx
push ecx
push ecx
push dword [ebp - 0x14]
mov dword [ebp - 0x18], ecx
call dword [sym.imp.NTDLL.dll_NtWriteFile]
mov ebx, eax
test ebx, ebx
jns 0x51a26e
mov dword [ebp - 4], 6
lea ecx, [ebp - 0x24]
call fcn.0046a3ff
mov dword [ebp - 4], 8
jmp 0x51a19b
test byte [edi + 0x14], 1
je 0x51a38f
xor ecx, ecx
lea eax, [ebp - 0x30]
push ecx
push eax
push 2
lea eax, [edi + 0x598]
mov dword [ebp - 0x1c], ecx
push eax
lea eax, [ebp - 0x1c]
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 ebx, eax
test ebx, ebx
jns 0x51a2bf
mov dword [ebp - 4], 9
lea ecx, [ebp - 0x24]
call fcn.0046a3ff
mov dword [ebp - 4], 0xb
jmp 0x51a19b
xor edx, edx
mov ebx, edx
cmp dword [edi + 0x618], edx
jle 0x51a310
lea eax, [edi + 0x5a4]
mov dword [ebp - 0x54], eax
push edx
lea ecx, [ebp - 0x30]
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 dword [ebp - 0x58], eax
test eax, eax
js 0x51a358
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 0x51a2d4
push edx
xor eax, eax
mov dword [ebp - 0x1c], edx
mov word [ebp - 0x34], ax
lea eax, [ebp - 0x30]
push eax
push 2
lea eax, [ebp - 0x34]
mov dword [ebp - 0x18], edx
push 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 ebx, eax
test ebx, ebx
jns 0x51a38f
mov dword [ebp - 4], 0xf
lea ecx, [ebp - 0x24]
call fcn.0046a3ff
mov dword [ebp - 4], 0x11
jmp 0x51a19b
mov dword [ebp - 4], 0xc
lea ecx, [ebp - 0x24]
call fcn.0046a3ff
mov dword [ebp - 4], 0xe
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x51a384
cmp eax, esi
je 0x51a384
and dword [ebp - 0x14], 0
push eax
call dword [sym.imp.NTDLL.dll_NtClose]
mov dword [ebp - 4], esi
mov eax, dword [ebp - 0x58]
jmp 0x51a65d
test byte [edi + 0x14], 4
je 0x51a3c2
push 4
push dword [ebp - 0x14]
mov ecx, edi
call fcn.0051a728
mov ebx, eax
test ebx, ebx
jns 0x51a3c2
mov dword [ebp - 4], 0x12
lea ecx, [ebp - 0x24]
call fcn.0046a3ff
mov dword [ebp - 4], 0x14
jmp 0x51a19b
test byte [edi + 0x14], 8
je 0x51a3f5
push 8
push dword [ebp - 0x14]
mov ecx, edi
call fcn.0051a728
mov ebx, eax
test ebx, ebx
jns 0x51a3f5
mov dword [ebp - 4], 0x15
lea ecx, [ebp - 0x24]
call fcn.0046a3ff
mov dword [ebp - 4], 0x17
jmp 0x51a19b
test byte [edi + 0x14], 0x10
je 0x51a428
push 0x10
push dword [ebp - 0x14]
mov ecx, edi
call fcn.0051a728
mov ebx, eax
test ebx, ebx
jns 0x51a428
mov dword [ebp - 4], 0x18
lea ecx, [ebp - 0x24]
call fcn.0046a3ff
mov dword [ebp - 4], 0x1a
jmp 0x51a19b
test byte [edi + 0x14], 0x20
je 0x51a45b
push 0x20
push dword [ebp - 0x14]
mov ecx, edi
call fcn.0051a728
mov ebx, eax
test ebx, ebx
jns 0x51a45b
mov dword [ebp - 4], 0x1b
lea ecx, [ebp - 0x24]
call fcn.0046a3ff
mov dword [ebp - 4], 0x1d
jmp 0x51a19b
test byte [edi + 0x14], 0x40
je 0x51a48e
push 0x40
push dword [ebp - 0x14]
mov ecx, edi
call fcn.0051a728
mov ebx, eax
test ebx, ebx
jns 0x51a48e
mov dword [ebp - 4], 0x1e
lea ecx, [ebp - 0x24]
call fcn.0046a3ff
mov dword [ebp - 4], 0x20
jmp 0x51a19b
xor ecx, ecx
lea eax, [ebp - 0x30]
push ecx
push eax
push 8
lea eax, [edi + 0x3b0]
mov dword [ebp - 0x1c], ecx
push eax
lea eax, [ebp - 0x1c]
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 ebx, eax
test ebx, ebx
jns 0x51a4d5
mov dword [ebp - 4], 0x21
lea ecx, [ebp - 0x24]
call fcn.0046a3ff
mov dword [ebp - 4], 0x23
jmp 0x51a19b
xor ecx, ecx
mov dword [ebp - 0x54], ecx
cmp dword [edi + 0x614], ecx
jle 0x51a524
lea ebx, [edi + 0x3c4]
push ecx
lea eax, [ebp - 0x30]
mov dword [ebp - 0x1c], ecx
push eax
push dword [ebx - 8]
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x18], ecx
push dword [ebx]
push eax
push ecx
push ecx
push ecx
push dword [ebp - 0x14]
call dword [sym.imp.NTDLL.dll_NtWriteFile]
mov dword [ebp - 0x58], eax
test eax, eax
js 0x51a569
mov eax, dword [ebp - 0x54]
add ebx, 0x10
inc eax
push 0
mov dword [ebp - 0x54], eax
pop ecx
cmp eax, dword [edi + 0x614]
jl 0x51a4e8
push ecx
lea eax, [ebp - 0x30]
mov dword [ebp - 0x1c], ecx
push eax
push 4
lea eax, [ebp - 0x38]
mov dword [ebp - 0x18], ecx
push eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x38], ecx
push eax
push ecx
push ecx
push ecx
push dword [ebp - 0x14]
call dword [sym.imp.NTDLL.dll_NtWriteFile]
mov ebx, eax
test ebx, ebx
jns 0x51a584
mov dword [ebp - 4], 0x27
lea ecx, [ebp - 0x24]
call fcn.0046a3ff
mov dword [ebp - 4], 0x29
jmp 0x51a19b
mov dword [ebp - 4], 0x24
lea ecx, [ebp - 0x24]
call fcn.0046a3ff
mov dword [ebp - 4], 0x26
jmp 0x51a36e
xor ebx, ebx
test dword [edi + 0x14], 0x200
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
je 0x51a5ee
push ebx
lea eax, [ebp - 0x30]
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 edi, eax
test edi, edi
jns 0x51a5ee
mov dword [ebp - 4], 0x2a
lea ecx, [ebp - 0x24]
call fcn.0046a3ff
mov dword [ebp - 4], 0x2c
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x51a5e7
cmp eax, esi
je 0x51a5e7
push eax
mov dword [ebp - 0x14], ebx
call dword [sym.imp.NTDLL.dll_NtClose]
mov dword [ebp - 4], esi
mov eax, edi
jmp 0x51a65d
push ebx
lea eax, [ebp - 0x30]
mov dword [ebp - 0x1c], ebx
push eax
push 4
lea eax, [ebp - 0x38]
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 edi, eax
test edi, edi
jns 0x51a62d
mov dword [ebp - 4], 0x2d
lea ecx, [ebp - 0x24]
call fcn.0046a3ff
mov dword [ebp - 4], 0x2f
jmp 0x51a5d2
mov dword [ebp - 4], 0x30
lea ecx, [ebp - 0x24]
call fcn.0046a3ff
mov dword [ebp - 4], 0x32
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x51a658
cmp eax, esi
je 0x51a658
push eax
mov dword [ebp - 0x14], ebx
call dword [sym.imp.NTDLL.dll_NtClose]
mov dword [ebp - 4], esi
xor eax, eax
call fcn.0052bffc
ret 4