Function at 0x10008d90
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1003f3f5
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 0x10008fcc
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0xc]
sub eax, ecx
sar eax, 8
mov dword [ebp - 0x2c], 0
push edi
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10008f92
xor edx, edx
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], edx
lea ecx, [ecx]
xor eax, eax
lea ebx, [ecx + 0x80]
add ebx, edx
mov byte [ebp - 0x18], al
mov edi, 0x100413f1
mov dword [ebp - 0x20], ebx
cmovne edi, eax
mov dword [ebp - 0x24], edi
mov dword [ebp - 4], eax
test edi, edi
jne 0x10008e80
push 4
push edi
push edi
push ebx
mov byte [ebp - 0x18], 1
call fcn.100177f0
mov esi, eax
push esi
call fcn.10017f65
push 0
mov edi, eax
push esi
push edi
push ebx
mov dword [ebp - 0x24], edi
call fcn.100177f0
mov esi, dword [ebp - 0x28]
add esp, 0x24
mov edx, dword [ebp - 0x10]
mov eax, dword [esi + 0xc]
mov ecx, 0
add eax, edx
mov byte [ebp + 0xb], cl
mov ebx, 0x100413f1
mov dword [ebp - 0x40], eax
cmovne ebx, ecx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x3c], ebx
mov byte [ebp - 4], 1
test ebx, ebx
jne 0x10008ed4
push 4
push ebx
mov cl, 1
push ebx
push eax
mov byte [ebp + 0xb], cl
mov byte [ebp - 0x30], cl
call fcn.100177f0
mov esi, eax
push esi
call fcn.10017f65
push 0
mov ebx, eax
push esi
push ebx
push dword [ebp - 0x40]
call fcn.100177f0
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.10016f40
add esp, 0x14
cmp byte [ebp + 0xb], 0
je 0x10008efe
push ebx
call fcn.10017f6e
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 0x10008f26
push edi
call fcn.10017f6e
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 0x10008f45
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 ecx, dword [esi + 0xc]
inc edi
mov edx, dword [ebp - 0x10]
sub eax, ecx
add edx, 0x100
sar eax, 8
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x10], edx
cmp edi, eax
jb 0x10008e30
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 0x10008fb0
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