Function at 0x4652b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x51931b
mov eax, dword fs:[0]
push eax
sub esp, 0x270
mov eax, dword [0x56d06c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x22c], edx
mov esi, ecx
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x230], eax
mov dword [ebp - 0x220], ebx
test esi, esi
je 0x46562e
cmp word [esi], 0
je 0x46562e
push 0x208
lea eax, [ebp - 0x21c]
push 0
push eax
call fcn.004e9ab0
add esp, 0xc
lea eax, [ebp - 0x21c]
push esi
push str..pipe_s
push 0x104
push eax
call dword [sym.imp.SHLWAPI.dll_wnsprintfW]
mov dword [ebp - 0x27c], 0
mov dword [ebp - 0x278], 0
mov dword [ebp - 0x254], 0
mov dword [ebp - 0x250], 0
mov dword [ebp - 0x24c], 0
mov dword [ebp - 0x248], 0
mov dword [ebp - 0x244], 0
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 0
mov dword [ebp - 0x238], 0
add esp, 0xc
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x27c]
call fcn.00464910
lea ecx, [ebp - 0x27c]
call fcn.00464ac0
mov edi, dword [ebp + 0x10]
mov esi, 2
push 1
lea eax, [ebp - 0x274]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
mov eax, dword [ebp - 0x27c]
test eax, eax
je 0x4653ef
push 0
push eax
push 1
lea eax, [ebp - 0x274]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
mov eax, dword [ebp - 0x278]
test eax, eax
je 0x46540b
push 0
push eax
push 1
lea eax, [ebp - 0x274]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorSacl]
push 0
push 0x80
lea eax, [ebp - 0x274]
mov dword [ebp - 0x260], 0xc
push 3
mov dword [ebp - 0x25c], eax
lea eax, [ebp - 0x260]
push eax
push 0
push 0xc0000000
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x258], 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x228], eax
cmp eax, 0xffffffff
jne 0x465519
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp ebx, 0xe7
jne 0x46549b
push 0
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
test eax, eax
jne 0x4653c4
mov edx, ebx
test edi, edi
je 0x4654f2
mov ecx, str.WaitRetry
dec edi
call fcn.00464d30
jmp 0x4653c4
test edi, edi
je 0x465510
xor ecx, ecx
mov eax, 0x2b
dec edi
mul esi
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004720d8
mov esi, eax
add esp, 4
test esi, esi
je 0x4654e5
push ebx
push str.CreateRetry
push str._s_LastError___d
push 0x2b
push esi
call fcn.0041f9c0
add esp, 0x14
mov ecx, esi
call fcn.00464c30
push esi
call fcn.00471d3c
add esp, 4
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4653bf
mov ecx, str.WaitEnd
call fcn.00464d30
lea ecx, [ebp - 0x27c]
xor esi, esi
call fcn.00464860
mov eax, esi
jmp 0x465630
mov edx, ebx
mov ecx, str.CreateEnd
jmp 0x4654f7
mov eax, dword [ebp - 0x220]
add eax, 8
mov dword [ebp - 0x224], 0
push eax
call fcn.004720d8
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4654fc
mov eax, dword [ebp - 0x22c]
xor edx, edx
mov ecx, dword [ebp - 0x220]
mov dword [ebx], eax
mov eax, dword [ebp - 0x230]
test eax, eax
cmove ecx, edx
mov dword [ebp - 0x220], ecx
mov dword [ebx + 4], ecx
je 0x465575
push ecx
push eax
lea eax, [ebx + 8]
push eax
call fcn.004ea050
mov ecx, dword [ebp - 0x220]
add esp, 0xc
lea eax, [ecx + 8]
xor edi, edi
xor esi, esi
test eax, eax
je 0x4655f4
push 0
lea eax, [ebp - 0x224]
sub ecx, esi
push eax
add ecx, 8
lea eax, [esi + ebx]
push ecx
push eax
push dword [ebp - 0x228]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x224]
test eax, eax
jne 0x4655d1
mov eax, edi
inc edi
cmp eax, 3
jg 0x4655e2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov ecx, str.WriteFileRetry
call fcn.00464d30
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x224]
mov ecx, dword [ebp - 0x220]
add esi, eax
lea eax, [ecx + 8]
cmp esi, eax
jb 0x465580
jmp 0x4655f4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov ecx, str.WriteFileEnd
call fcn.00464d30
push ebx
call fcn.00471d3c
add esp, 4
push dword [ebp - 0x228]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x220]
add eax, 8
cmp eax, esi
jne 0x4654fc
lea ecx, [ebp - 0x27c]
mov esi, 1
call fcn.00464860
mov eax, esi
jmp 0x465630
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00471876
mov esp, ebp
pop ebp
ret