Function at 0x1006a650
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov ebx, ecx
mov dword [ebp - 0x18], edx
xor esi, esi
mov dword [ebp - 0x14], ebx
push edi
test eax, eax
je 0x1006a86b
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
mov edi, dword [sym.imp.KERNEL32.DLL_HeapAlloc]
push eax
call edi
mov dword [ebp - 0x10], eax
test eax, eax
je 0x1006a86b
mov eax, dword [ebp + 0xc]
shr eax, 2
add eax, 0x3000
add eax, dword [ebp + 0xc]
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push eax
call edi
mov edi, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x1006a859
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov esi, dword [eax]
cmp esi, eax
je 0x1006a750
mov eax, dword [esi + 8]
mov dword [edi], eax
mov eax, dword [esi + 0x10]
mov dword [edi + 4], eax
mov ax, word [esi + 0x58]
add ax, ax
movzx ecx, ax
lea eax, [esi + 0x48]
mov word [edi + 8], cx
add edi, 0xa
cmp dword [eax + 0x14], 8
jb 0x1006a6e7
mov eax, dword [eax]
mov ebx, ecx
push ebx
push eax
push edi
call fcn.100865f0
add esp, 0xc
add edi, ebx
test byte [esi + 0x10], 0x10
jne 0x1006a740
movdqu xmm0, xmmword [esi + 0x14]
movdqu xmmword [edi], xmm0
mov ax, word [esi + 0xc]
mov word [edi + 0x10], ax
mov eax, dword [esi + 0x28]
mov dword [edi + 0x12], eax
mov eax, dword [esi + 0x2c]
mov dword [edi + 0x16], eax
mov eax, dword [esi + 0x30]
mov dword [edi + 0x1a], eax
mov eax, dword [esi + 0x34]
mov dword [edi + 0x1e], eax
mov eax, dword [esi + 0x38]
mov dword [edi + 0x22], eax
mov eax, dword [esi + 0x3c]
mov dword [edi + 0x26], eax
mov eax, dword [esi + 0x40]
mov dword [edi + 0x2a], eax
mov eax, dword [esi + 0x44]
mov dword [edi + 0x2e], eax
add edi, 0x32
mov eax, dword [ebp + 8]
mov esi, dword [esi]
cmp esi, dword [eax]
jne 0x1006a6c0
mov ebx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
lea edx, [ebp - 8]
mov edi, dword [ebp - 0x10]
push ecx
push dword [ebp + 0xc]
mov eax, dword [ecx]
mov dword [ebp - 0x20], eax
mov eax, dword [ecx + 4]
mov ecx, dword [ebp - 0xc]
push edi
mov dword [ebp - 0x1c], eax
call fcn.10076c70
add esp, 0xc
test eax, eax
jne 0x1006a7d5
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0xc]
jae 0x1006a7d5
mov esi, dword [sym.imp.KERNEL32.DLL_WriteFile]
lea eax, [ebp - 4]
push 0
push eax
push 4
lea eax, [ebp + 0xc]
push eax
push ebx
call esi
test eax, eax
je 0x1006a7ba
cmp dword [ebp - 4], 4
jne 0x1006a7ba
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp - 8]
push dword [ebp - 0xc]
push ebx
call esi
test eax, eax
je 0x1006a7ba
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
je 0x1006a814
xor esi, esi
push dword [ebp - 0xc]
push 0
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
mov ebx, dword [sym.imp.KERNEL32.DLL_HeapFree]
push eax
call ebx
jmp 0x1006a85f
mov esi, dword [sym.imp.KERNEL32.DLL_WriteFile]
lea eax, [ebp - 4]
push 0
push eax
push 4
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push ebx
call esi
test eax, eax
je 0x1006a7ba
cmp dword [ebp - 4], 4
jne 0x1006a7ba
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push edi
push ebx
call esi
test eax, eax
je 0x1006a7ba
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0xc]
jne 0x1006a7ba
push 0
lea eax, [ebp - 4]
push eax
push 0xa
push str.xy_package
push ebx
call esi
test eax, eax
je 0x1006a7ba
cmp dword [ebp - 4], 0xa
jne 0x1006a7ba
push 0
lea eax, [ebp - 4]
push eax
push 8
lea eax, [ebp - 0x20]
push eax
push ebx
call esi
test eax, eax
je 0x1006a7ba
cmp dword [ebp - 4], 8
jne 0x1006a7ba
mov esi, 1
jmp 0x1006a7bc
mov ebx, dword [sym.imp.KERNEL32.DLL_HeapFree]
push edi
push 0
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push eax
call ebx
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret