Function at 0x10045260
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x20c]
sub esp, 0x28c
mov eax, dword [0x10178af8]
xor eax, ebp
mov dword [ebp + 0x208], eax
mov eax, dword [ebp + 0x214]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp + 0x218]
push esi
push edi
mov dword [ebp - 0x70], eax
mov eax, dword [ebp + 0x220]
mov dword [ebp - 0x5c], eax
mov esi, 0x106
push esi
lea eax, [ebp - 0x18]
push eax
mov edi, ecx
push 1
push edi
call sym.CoreFoundation.dll_CFURLGetFileSystemRepresentation
add esp, 0x10
test al, al
je 0x10045511
push ebx
push edi
push dword [sym.CoreFoundation.dll_kCFAllocatorSystemDefault]
call sym.CoreFoundation.dll_CFURLCreateCopyDeletingLastPathComponent
push edi
mov dword [ebp - 0x50], eax
call sym.CoreFoundation.dll_CFURLCopyLastPathComponent
add esp, 0xc
mov edi, eax
push edi
push str.__.XXXXXXX
call sym.CoreFoundation.dll___CFStringMakeConstantString
pop ecx
push eax
push 0
push dword [sym.CoreFoundation.dll_kCFAllocatorSystemDefault]
call sym.CoreFoundation.dll_CFStringCreateWithFormat
push 0
mov ebx, eax
push ebx
push dword [ebp - 0x50]
push dword [sym.CoreFoundation.dll_kCFAllocatorSystemDefault]
call sym.CoreFoundation.dll_CFURLCreateCopyAppendingPathComponent
push ebx
mov dword [ebp - 0x54], eax
call sym.CoreFoundation.dll_CFRelease
add esp, 0x24
test edi, edi
je 0x10045316
push edi
call sym.CoreFoundation.dll_CFRelease
pop ecx
push esi
lea eax, [ebp + 0xf0]
push eax
push 1
push dword [ebp - 0x54]
call sym.CoreFoundation.dll_CFURLGetFileSystemRepresentation
add esp, 0x10
test al, al
jne 0x10045347
push dword [ebp - 0x54]
call sym.CoreFoundation.dll_CFRelease
push dword [ebp - 0x50]
call sym.CoreFoundation.dll_CFRelease
pop ecx
xor al, al
jmp 0x1004550f
mov edi, 0x116
lea eax, [ebp + 0xf0]
push edi
push eax
xor ebx, ebx
call sym.CoreFoundation.dll__NS_mkstemp
mov esi, dword [0x10180f0c]
pop ecx
pop ecx
mov dword [ebp - 0x4c], eax
test eax, eax
jns 0x100453a9
test ebx, ebx
jne 0x1004539d
call esi
mov ebx, dword [eax]
cmp ebx, 2
je 0x1004537c
cmp ebx, 0x14
jne 0x100453a3
push 1
push dword [ebp - 0x50]
call fcn.100027c0
lea eax, [ebp + 0xf0]
push edi
push eax
call sym.CoreFoundation.dll__NS_mkstemp
add esp, 0x10
mov dword [ebp - 0x4c], eax
test eax, eax
js 0x1004536a
cmp dword [ebp - 0x4c], 0
jge 0x100453a9
call esi
mov dword [eax], ebx
jmp 0x1004532f
push dword [ebp - 0x54]
call sym.CoreFoundation.dll_CFRelease
push dword [ebp - 0x50]
call sym.CoreFoundation.dll_CFRelease
push dword [ebp - 0x70]
push dword [ebp - 0x58]
call fcn.10045048
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x10045503
push ebx
call sym.CoreFoundation.dll_CFDataGetLength
push ebx
mov edi, eax
call sym.CoreFoundation.dll_CFDataGetBytePtr
pop ecx
pop ecx
test edi, edi
je 0x10045447
push 0
lea ecx, [ebp - 0x58]
push ecx
push edi
push eax
push dword [ebp - 0x4c]
call dword [0x10180ef8]
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10045407
mov eax, dword [ebp - 0x58]
jmp 0x1004540a
or eax, 0xffffffff
cmp eax, edi
jne 0x1004541c
push dword [ebp - 0x4c]
call dword [0x10180f20]
pop ecx
test eax, eax
jns 0x10045447
call esi
push dword [ebp - 0x4c]
mov edi, dword [eax]
call dword [0x10180f1c]
lea eax, [ebp + 0xf0]
push eax
call sym.CoreFoundation.dll__NS_unlink
call esi
push ebx
mov dword [eax], edi
call sym.CoreFoundation.dll_CFRelease
add esp, 0xc
jmp 0x10045503
xor eax, eax
cmp dword [ebp - 0x5c], eax
je 0x1004549d
or dword [ebp - 0x60], 0xffffffff
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], eax
xor ecx, ecx
mov word [ebp - 0x6c], cx
lea esi, [ebp - 0x6c]
lea edi, [ebp - 0x80]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x48]
movsd dword es:[edi], dword [esi]
push eax
push dword [ebp - 0x4c]
movsd dword es:[edi], dword [esi]
call dword [0x10180f18]
pop ecx
pop ecx
test eax, eax
jne 0x10045493
mov ax, word [ebp - 0x44]
and dword [ebp - 0x74], 0
mov word [ebp - 0x80], ax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x78], eax
mov edi, dword [ebp - 0x5c]
lea esi, [ebp - 0x80]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push dword [ebp - 0x4c]
call dword [0x10180f1c]
movzx eax, word [ebp + 0x21c]
push eax
lea eax, [ebp + 0xf0]
push eax
call sym.CoreFoundation.dll__NS_chmod
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp + 0xf0]
push eax
call sym.CoreFoundation.dll__NS_rename
add esp, 0x14
test eax, eax
je 0x10045507
lea eax, [ebp + 0xf0]
push eax
call sym.CoreFoundation.dll__NS_unlink
push ebx
call sym.CoreFoundation.dll_CFRelease
mov edi, dword [ebp - 0x5c]
pop ecx
pop ecx
test edi, edi
je 0x10045503
xor eax, eax
and dword [ebp - 0x68], eax
and dword [ebp - 0x64], eax
or dword [ebp - 0x60], 0xffffffff
mov word [ebp - 0x6c], ax
lea esi, [ebp - 0x6c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
xor al, al
jmp 0x10045510
push ebx
call sym.CoreFoundation.dll_CFRelease
mov al, 1
pop ecx
pop ebx
mov ecx, dword [ebp + 0x208]
pop edi
xor ecx, ebp
pop esi
call fcn.10128382
add ebp, 0x20c
leave
ret