Function at 0x10066f8
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x423c
call fcn.010076f0
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov ebx, ecx
cmp dword [ebx + 4], 0xffffffff
push edi
mov edi, edx
mov dword [ebp - 0x423c], ebx
mov dword [ebp - 0x4238], edi
je 0x1006737
mov edi, dword [ebx]
call fcn.010061a0
mov edi, dword [ebp - 0x4238]
mov esi, dword [ebx]
mov eax, dword [ebp + 8]
or dword [ebx + 4], 0xffffffff
cmp eax, dword [esi + 4]
jl 0x100674f
mov eax, 0x10000
jmp 0x1006935
cmp eax, dword [esi + 0x10]
jge 0x1006759
call fcn.01005d06
mov eax, dword [ebx]
mov ecx, dword [ebp + 8]
cmp dword [eax + 0x10], ecx
jge 0x1006779
mov edi, ecx
mov esi, dword [ebx]
call fcn.01005d3a
mov eax, dword [ebx]
cmp dword [eax + 0x10], edi
jl 0x1006765
mov edi, dword [ebp - 0x4238]
push dword [ebp + 8]
lea edx, [ebp - 0x4234]
mov ecx, ebx
call fcn.01006289
test byte [ebp - 0x412c], 0x10
je 0x10067ac
lea eax, [ebp - 0x4230]
push eax
lea eax, [ebx + 0x138]
push eax
call fcn.01006619
xor eax, eax
jmp 0x1006935
mov al, byte [edi]
xor ecx, ecx
mov edx, edi
mov esi, edi
mov dword [ebp - 0x4238], ecx
test al, al
je 0x1006871
cmp al, 0x2f
je 0x10067ca
cmp al, 0x5c
jne 0x10067cd
lea edx, [esi + 1]
inc esi
mov al, byte [esi]
test al, al
jne 0x10067c2
cmp edx, edi
je 0x1006871
lea ebx, [ebp - 0x108]
mov esi, edi
sub ebx, edi
mov al, byte [esi]
mov byte [ebx + esi], al
inc esi
test al, al
jne 0x10067e6
sub edx, edi
dec edx
cmp edx, 0x104
jae 0x1006899
mov byte [ebp + edx - 0x108], cl
mov al, byte [ebp - 0x108]
cmp al, 0x2f
je 0x100681f
cmp al, 0x5c
je 0x100681f
cmp byte [ebp - 0x107], 0x3a
mov bh, cl
jne 0x1006821
mov bh, 1
mov esi, dword [sym.imp.msvcrt.dll_strstr]
lea eax, [ebp - 0x108]
push 0x10012c0
push eax
call esi
test eax, eax
lea eax, [ebp - 0x108]
push 0x10012bc
push eax
setne bl
call esi
add esp, 0x10
test eax, eax
setne al
or al, bl
or al, bh
mov ebx, dword [ebp - 0x423c]
jne 0x100686f
lea eax, [ebp - 0x108]
push eax
lea eax, [ebx + 0x138]
push eax
call fcn.01006619
xor ecx, ecx
push ecx
push dword [ebp - 0x412c]
push 2
push ecx
push ecx
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x100689e
mov eax, 0x200
jmp 0x1006935
call fcn.01006deb
mov eax, dword [ebx]
call fcn.01005f25
mov edi, 0x4000
jmp 0x10068ca
je 0x10068e4
push 0
lea ecx, [ebp - 0x423c]
push ecx
push eax
lea eax, [ebp - 0x4108]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10068dd
mov eax, dword [ebx]
mov edx, edi
lea ecx, [ebp - 0x4108]
call fcn.0100601d
test eax, eax
jns 0x10068ac
mov byte [ebp - 0x4238], 1
push esi
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x1006915
cmp byte [ebp - 0x4238], 0
jne 0x1006915
lea eax, [ebp - 0x4118]
push eax
lea eax, [ebp - 0x4128]
push eax
lea eax, [ebp - 0x4120]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebx]
call fcn.010061a0
mov ecx, dword [ebp - 0x4238]
movzx eax, cl
neg eax
sbb eax, eax
and eax, 0x400
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01006dd6
leave
ret 4