Function at 0x405f70
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x42eb78
mov eax, dword fs:[0]
push eax
sub esp, 0x270
mov eax, dword [0x43b050]
xor eax, esp
mov dword [esp + 0x268], eax
push ebx
push esi
push edi
mov eax, dword [0x43b050]
xor eax, esp
push eax
lea eax, [esp + 0x280]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov esi, edx
xor ebx, ebx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], ecx
cmp esi, ebx
je 0x4062c8
cmp word [esi], bx
je 0x4062c8
push 0x206
lea eax, [esp + 0x72]
xor edx, edx
push ebx
push eax
mov word [esp + 0x78], dx
call fcn.0041d2e0
add esp, 0xc
push esi
push str..pipe_s
lea ecx, [esp + 0x74]
push 0x104
push ecx
call dword [sym.imp.SHLWAPI.dll_wnsprintfW]
add esp, 0x10
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebx
lea ecx, [esp + 0x24]
mov dword [esp + 0x288], ebx
call fcn.004055e0
lea eax, [esp + 0x24]
call fcn.00405760
push 1
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x406068
push ebx
push eax
push 1
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
mov eax, dword [esp + 0x28]
cmp eax, ebx
je 0x40607f
push ebx
push eax
push 1
lea ecx, [esp + 0x38]
push ecx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorSacl]
push ebx
push 0x80
push 3
lea eax, [esp + 0x4c]
push eax
push ebx
push 0xc0000000
lea ecx, [esp + 0x84]
lea edx, [esp + 0x44]
push ecx
mov dword [esp + 0x5c], 0xc
mov dword [esp + 0x60], edx
mov dword [esp + 0x64], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4061c2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0xe7
jne 0x406102
push ebx
lea edx, [esp + 0x70]
push edx
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
test eax, eax
jne 0x406044
push esi
cmp dword [ebp + 0x10], ebx
jbe 0x40617d
dec dword [ebp + 0x10]
push str.WaitRetry
call fcn.00405a50
add esp, 8
jmp 0x406044
cmp dword [ebp + 0x10], ebx
jbe 0x40619f
mov eax, dword [section..data]
mov edx, dword [eax + 0xc]
dec dword [ebp + 0x10]
mov ecx, section..data
call edx
add eax, 0x10
mov dword [esp + 0x14], eax
push esi
push str.CreateRetry
push str._s_LastError___d
lea edi, [esp + 0x20]
mov byte [esp + 0x294], 1
call fcn.004040d0
mov edi, dword [esp + 0x20]
add esp, 0xc
call fcn.004058a0
lea eax, [edi - 0x10]
mov byte [esp + 0x288], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406170
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x406044
push str.WaitEnd
call fcn.00405a50
add esp, 8
lea ecx, [esp + 0x24]
mov dword [esp + 0x288], 0xffffffff
push ecx
jmp 0x4062c3
push esi
push str.CreateEnd
call fcn.00405a50
add esp, 8
lea edx, [esp + 0x24]
mov dword [esp + 0x288], 0xffffffff
push edx
jmp 0x4062c3
mov eax, dword [esp + 0x18]
add eax, 8
push eax
mov dword [esp + 0x24], ebx
call fcn.0041bb83
mov ebx, eax
xor esi, esi
add esp, 4
cmp ebx, esi
je 0x40618a
mov ecx, dword [esp + 0x1c]
mov edx, dword [ebp + 8]
mov dword [ebx], edx
cmp ecx, esi
jne 0x4061f3
xor eax, eax
mov dword [esp + 0x18], eax
jmp 0x4061f7
mov eax, dword [esp + 0x18]
mov dword [ebx + 4], eax
cmp ecx, esi
je 0x40620c
push eax
push ecx
lea eax, [ebx + 8]
push eax
call fcn.0041ef90
add esp, 0xc
mov eax, dword [esp + 0x18]
add eax, 8
mov dword [esp + 0x14], esi
mov dword [esp + 0x1c], eax
je 0x40628c
mov edx, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x24]
push ecx
sub edx, esi
add edx, 8
push edx
lea eax, [esi + ebx]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [esp + 0x20], 0
jne 0x40626c
mov eax, dword [esp + 0x14]
mov ecx, eax
inc eax
mov dword [esp + 0x14], eax
cmp ecx, 3
jg 0x406278
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WriteFileRetry
call fcn.00405a50
add esp, 8
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
add esi, dword [esp + 0x20]
cmp esi, dword [esp + 0x1c]
jb 0x40621d
jmp 0x40628c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WriteFileEnd
call fcn.00405a50
add esp, 8
push ebx
call fcn.0041bc7c
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x288], 0xffffffff
cmp dword [esp + 0x1c], esi
jne 0x4062be
lea edx, [esp + 0x24]
push edx
call fcn.00405540
mov eax, 1
jmp 0x4062ca
lea eax, [esp + 0x24]
push eax
call fcn.00405540
xor eax, eax
mov ecx, dword [esp + 0x280]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x268]
xor ecx, esp
call fcn.0041b25d
mov esp, ebp
pop ebp
ret