Function at 0x10008ca0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10040985
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x838
push ebx
push esi
push 0
push 0x80
push 1
push 0
push 0
push 0x40000000
push dword [ebp + 8]
mov esi, ecx
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x28], esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x44], ebx
cmp ebx, 0xffffffff
je 0x10008edc
mov ecx, dword [esi + 0x10]
mov edx, dword [esi + 0xc]
sub ecx, edx
sar ecx, 8
mov dword [ebp - 0x2c], 0
push edi
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
test ecx, ecx
je 0x10008ea2
xor ecx, ecx
mov dword [ebp - 0x34], 0
mov word [ebp - 0x2f], 0
mov byte [ebp - 0x2d], 4
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x17], 0
mov byte [ebp - 0x15], 4
mov dword [ebp - 0x10], ecx
lea ecx, [ecx]
xor eax, eax
lea ebx, [edx + 0x80]
add ebx, ecx
mov byte [ebp - 0x18], al
mov edi, 0x100423d1
mov dword [ebp - 0x20], ebx
cmovne edi, eax
mov dword [ebp - 0x24], edi
mov dword [ebp - 4], eax
test edi, edi
jne 0x10008d90
push 4
push edi
push edi
push ebx
mov byte [ebp - 0x18], 1
call fcn.100176b0
mov esi, eax
push esi
call fcn.10017d5f
push 0
mov edi, eax
push esi
push edi
push ebx
mov dword [ebp - 0x24], edi
call fcn.100176b0
mov esi, dword [ebp - 0x28]
add esp, 0x24
mov ecx, dword [ebp - 0x10]
mov eax, dword [esi + 0xc]
mov ebx, 0x100423d1
add eax, ecx
mov ecx, 0
mov dword [ebp - 0x40], eax
cmovne ebx, ecx
mov byte [ebp + 0xb], cl
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x3c], ebx
mov byte [ebp - 4], 1
test ebx, ebx
jne 0x10008de4
push 4
push ebx
mov cl, 1
push ebx
push eax
mov byte [ebp + 0xb], cl
mov byte [ebp - 0x30], cl
call fcn.100176b0
mov esi, eax
push esi
call fcn.10017d5f
push 0
mov ebx, eax
push esi
push ebx
push dword [ebp - 0x40]
call fcn.100176b0
mov esi, dword [ebp - 0x28]
add esp, 0x24
push edi
push ebx
push str._s:__s_n
lea eax, [ebp - 0x844]
push 0x800
push eax
call fcn.10016df0
add esp, 0x14
cmp byte [ebp + 0xb], 0
je 0x10008e0e
push ebx
call fcn.10017d68
add esp, 4
cmp byte [ebp - 0x18], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov byte [ebp - 0x30], 0
mov dword [ebp - 4], 0xffffffff
je 0x10008e36
push edi
call fcn.10017d68
add esp, 4
lea eax, [ebp - 0x844]
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
lea edx, [eax + 1]
mov byte [ebp - 0x18], 0
mov byte [ebp - 0x45], 0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10008e55
mov ebx, dword [ebp - 0x44]
lea ecx, [ebp - 0x14]
push 0
push ecx
sub eax, edx
push eax
lea eax, [ebp - 0x844]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi + 0x10]
mov edi, dword [ebp - 0x2c]
mov edx, dword [esi + 0xc]
inc edi
mov ecx, dword [ebp - 0x10]
sub eax, edx
add ecx, 0x100
sar eax, 8
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x10], ecx
cmp edi, eax
jb 0x10008d40
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 0x14]
push eax
push 9
push str.Comment:
push ebx
call edi
mov edx, dword [esi + 8]
add edx, 0xc
mov ecx, edx
lea esi, [ecx + 1]
lea ecx, [ecx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10008ec0
push 0
lea eax, [ebp - 0x14]
sub ecx, esi
push eax
push ecx
push edx
push ebx
call edi
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov ecx, dword [ebp - 0xc]
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4