Function at 0x101270c0
Capabilities:
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1010
call fcn.10212f90
mov eax, dword [0x10250150]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
xor eax, eax
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x1008], eax
lea eax, [ebx + 8]
mov dword [ebp - 0x1010], eax
push edi
test esi, esi
je 0x1012715c
push esi
push 0x208
push eax
call fcn.1005a910
call fcn.10003ae0
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp dword [eax + 0x140], 2
jne 0x10127132
call fcn.10003ae0
cmp dword [eax + 0x140], 2
jne 0x10127127
mov eax, dword [eax + 0x3c]
jmp 0x10127129
xor eax, eax
test eax, eax
je 0x10127132
push esi
call eax
jmp 0x10127135
push esi
call edi
cmp eax, 0xffffffff
je 0x10127159
test al, 0x10
lea eax, [ebx + 8]
jne 0x1012715c
push eax
call edi
mov dword [ebp - 0x1008], eax
lea eax, [ebx + 8]
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [ebx + 8]
push 0
push 0x80
push 2
push 0
push 3
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x10127191
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10212f74
mov esp, ebp
pop ebp
ret 4
cmp dword [ebx + 4], 2
jne 0x101271b9
push 0
lea eax, [ebp - 0x100c]
mov word [ebp - 0x1004], 0xfeff
push eax
push 2
lea eax, [ebp - 0x1004]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebx + 0x210]
mov ecx, dword [eax]
mov dword [ebx + 0x218], ecx
cmp ecx, eax
je 0x10127330
nop
cmp dword [ebx + 4], 2
jne 0x101272af
mov esi, dword [ecx + 8]
lea eax, [ebp - 0x1004]
mov ecx, eax
mov edx, 0x800
sub esi, ecx
lea esp, [esp]
lea ecx, [edx + 0x7ffff7fe]
test ecx, ecx
je 0x10127217
movzx ecx, word [esi + eax]
test cx, cx
je 0x10127210
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x101271f0
jmp 0x10127214
test edx, edx
jne 0x10127217
sub eax, 2
xor ecx, ecx
mov word [eax], cx
lea ecx, [ebp - 0x1004]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10127225
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 1]
mov byte [ebp + ecx*2 - 0x1004], 0xd
cmp eax, 0x1000
jae 0x1012736d
mov byte [ebp + eax - 0x1004], 0
lea eax, [ecx*2 + 3]
mov byte [ebp + ecx*2 - 0x1002], 0xa
cmp eax, 0x1000
jae 0x1012736d
mov byte [ebp + eax - 0x1004], 0
lea eax, [ecx*2 + 4]
cmp eax, 0x1000
jae 0x1012736d
lea ecx, [ecx*2 + 5]
mov byte [ebp + eax - 0x1004], 0
cmp ecx, 0x1000
jae 0x1012736d
mov byte [ebp + ecx - 0x1004], 0
jmp 0x101272fe
mov edx, dword [ecx + 8]
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x101272b7
push 0
push 0
push 0x1000
sub ecx, esi
lea eax, [ebp - 0x1004]
push eax
sar ecx, 1
push ecx
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov word [ebp + eax - 0x1004], 0xa0d
add eax, 2
cmp eax, 0x1000
jae 0x1012736d
mov byte [ebp + eax - 0x1004], 0
push 0
lea ecx, [ebp - 0x100c]
push ecx
push eax
lea eax, [ebp - 0x1004]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebx + 0x218]
mov ecx, dword [eax]
mov dword [ebx + 0x218], ecx
cmp ecx, dword [ebx + 0x210]
jne 0x101271d0
push edi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x1008]
test eax, eax
je 0x10127355
push eax
push dword [ebp - 0x1010]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10212f74
mov esp, ebp
pop ebp
ret 4
call fcn.101e2490
int3