Function at 0x10006650
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x228
test byte [0x100088a0], 8
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0x14]
jne 0x100069d0
mov eax, esi
call dbg._create_istorage16
mov dword [esp], ebx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
call dword [sym.imp.kernel32.dll_CreateFileA]
sub esp, 0x1c
mov ebx, eax
cmp eax, 0xffffffff
je 0x10006aaa
mov eax, dword [esi]
mov dword [esp], eax
call sym._MapSL_4
test ebx, ebx
mov dword [ebp - 0x214], eax
push edx
mov dword [eax + 0x90], ebx
mov dword [eax + 0x94], 0
je 0x10006706
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_SetFilePointer]
sub esp, 0x10
lea edx, [ebp - 0x204]
xor eax, eax
mov edi, edx
mov ecx, 9
lea edx, [ebp - 0x1c0]
mov dword [ebp - 0x20c], 0xe011cfd0
mov dword [ebp - 0x208], 0xe11ab1a1
lea esi, [ebp - 0x20c]
rep stosd dword es:[edi], eax
or eax, 0xffffffff
mov ecx, 0x6d
mov edi, edx
mov dword [ebp - 0x1d8], 0
mov dword [ebp - 0x1d4], 0
mov dword [ebp - 0x1cc], 0
mov dword [ebp - 0x1c8], 0
mov dword [ebp - 0x1c4], 0
mov dword [ebp - 0x1e0], 1
mov dword [ebp - 0x1dc], 1
mov dword [ebp - 0x1d0], 0xffffffff
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x214]
mov dword [ebp - 0x1c0], 0
mov eax, dword [eax + 0x90]
test eax, eax
je 0x10006808
lea edx, [ebp - 0x210]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x200
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
test eax, eax
je 0x100067e7
cmp dword [ebp - 0x210], 0x200
je 0x10006821
mov dword [esp], ebx
mov ebx, 0x80004005
call dword [sym.imp.kernel32.dll_CloseHandle]
push eax
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret 0x10
mov eax, dword [ebp - 0x214]
xor edx, edx
mov ecx, esi
mov eax, dword [eax + 0x94]
call sym.__ilockbytes16_writeat.constprop.0
test eax, eax
je 0x100067e7
or eax, 0xffffffff
mov ecx, pe_nt_image_headers32
mov edi, esi
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x214]
mov dword [ebp - 0x20c], 0xfffffffe
mov dword [ebp - 0x208], 0xfffffffe
mov eax, dword [eax + 0x90]
test eax, eax
je 0x10006a50
lea edx, [ebp - 0x210]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x200
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
test eax, eax
je 0x100067e7
cmp dword [ebp - 0x210], 0x200
jne 0x100067e7
xor eax, eax
mov ecx, pe_nt_image_headers32
mov edi, esi
rep stosd dword es:[edi], eax
mov dword [esp + 0x14], 0x20
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], str.RootEntry
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_MultiByteToWideChar]
sub esp, 0x18
cmp word [ebp - 0x20c], 0
je 0x10006aa0
mov eax, esi
nop
add eax, 2
cmp word [eax], 0
jne 0x100068e8
sub eax, esi
sar eax, 1
lea eax, [eax + eax + 2]
mov word [ebp - 0x1cc], ax
mov eax, dword [ebp - 0x214]
mov byte [ebp - 0x1ca], 5
mov dword [ebp - 0x1c0], 0xffffffff
mov dword [ebp - 0x1c4], 0xffffffff
mov dword [ebp - 0x1c8], 0xffffffff
mov dword [ebp - 0x198], 0xffffffff
mov dword [ebp - 0x194], 0
mov eax, dword [eax + 0x90]
test eax, eax
je 0x10006a75
lea edx, [ebp - 0x210]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x200
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
test eax, eax
je 0x100067e7
cmp dword [ebp - 0x210], 0x200
jne 0x100067e7
mov eax, dword [ebp - 0x214]
xor ebx, ebx
lea edi, [eax + 0x90]
jmp 0x100069a9
inc ebx
test eax, eax
jne 0x10006a34
mov ecx, esi
mov edx, ebx
mov eax, edi
call dbg.STORAGE_get_pps_entry
cmp eax, 1
jne 0x100069a0
cmp byte [ebp - 0x1ca], 5
je 0x10006a10
lea esp, [ebp - 0xc]
xor ebx, ebx
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret 0x10
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], str.__s_0x_08lx_0x_08lx__p__n
mov dword [esp + 8], global___func__.22
mov dword [esp + 4], 0x100088a0
mov dword [esp], 3
call dbg.wine_dbg_log
jmp 0x1000666f
mov eax, dword [ebp - 0x214]
mov ecx, 0x20
lea edi, [eax + 0xc]
rep movsd dword es:[edi], dword [esi]
mov dword [eax + 0x8c], ebx
lea esp, [ebp - 0xc]
xor ebx, ebx
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret 0x10
dec eax
je 0x100069c2
mov eax, dword [ebp - 0x214]
mov ebx, 0x80004005
mov dword [esp], eax
call sym._IStorage16_fnRelease
jmp 0x100067f6
mov eax, dword [ebp - 0x214]
mov ecx, esi
mov edx, 0x200
mov eax, dword [eax + 0x94]
call sym.__ilockbytes16_writeat.constprop.0
test eax, eax
jne 0x10006897
jmp 0x100067e7
mov eax, dword [ebp - 0x214]
mov ecx, esi
mov edx, 0x200
mov eax, dword [eax + 0x94]
call sym.__ilockbytes16_writeat.constprop.0
test eax, eax
jne 0x1000698f
jmp 0x100067e7
mov eax, 2
jmp 0x100068f9
test byte [0x100088a0], 4
mov ebx, 0x80004005
je 0x100067f6
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.couldnt_open_file_for_storage:_ld_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], global___func__.22
mov dword [esp + 4], 0x100088a0
mov dword [esp], 2
call dbg.wine_dbg_log
jmp 0x100067f6