Function at 0x10af686
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x10de03c]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], ecx
mov ecx, dword [eax + 4]
mov ax, word [ecx + reloc.ADVAPI32.dll_RegDeleteValueW]
push edi
or edi, 0xffffffff
mov word [ebp - 0x30], ax
mov eax, edi
xor edx, edx
div dword [ecx + 0xa4]
mov ebx, dword [esi + 0x38]
sub edi, edx
cmp edi, 0xffffffff
jne 0x10af6d4
mov eax, dword [ebp - 0x38]
mov eax, dword [eax + 4]
or edi, edi
sub edi, dword [eax + 0xa4]
mov eax, dword [esi + 0x44]
cmp edi, eax
jb 0x10af6dd
mov edi, eax
and dword [esi + 0x50], 0
push edi
push ebx
push dword [ebp - 0x30]
call fcn.01097196
test ax, ax
je 0x10af707
mov ax, 0xfdff
mov ecx, dword [ebp - 4]
pop edi
pop ebx
call fcn.01075aef
leave
ret 4
call fcn.01075a13
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x30]
call fcn.0109766f
cmp ax, 1
je 0x10af702
mov dx, word [ebp - 0x20]
test dx, dx
je 0x10af72c
cmp dx, 5
jne 0x10af839
mov eax, dword [esi + 0x40]
mov ecx, dword [ebp - 0x24]
cmp ecx, eax
jb 0x10af73b
mov dword [esi + 0x48], eax
jmp 0x10af73e
mov dword [esi + 0x48], ecx
push 0xa
push ebx
mov word [esi + 0x58], dx
call fcn.010af2d5
cmp ax, word [ebx + 0x14]
je 0x10af756
mov ax, 0xfdf6
jmp 0x10af6f4
mov ebx, dword [ebx + 8]
push 0x16
push esi
call fcn.010ac2d2
jmp 0x10af7ec
mov eax, dword [esi + 0x48]
push dword [ebp - 0x34]
sub ebx, eax
push eax
mov eax, dword [esi + 0x38]
add eax, dword [esi + 0x50]
push 1
push eax
call dword [sym.imp.msvcrt.dll_fwrite]
add esp, 0x10
cmp eax, dword [esi + 0x48]
jne 0x10af81f
cmp word [esi + 0x58], 5
je 0x10af828
and dword [esi + 0x50], 0
push edi
push dword [esi + 0x38]
push dword [ebp - 0x30]
call fcn.01097196
test ax, ax
jne 0x10af6f0
jmp 0x10af7b5
call fcn.01075a13
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x30]
call fcn.0109766f
cmp ax, 1
je 0x10af7b0
mov dx, word [ebp - 0x20]
test dx, dx
je 0x10af7d6
cmp dx, 5
jne 0x10af839
mov eax, dword [esi + 0x40]
mov ecx, dword [ebp - 0x24]
cmp ecx, eax
jb 0x10af7e5
mov dword [esi + 0x48], eax
jmp 0x10af7e8
mov dword [esi + 0x48], ecx
mov word [esi + 0x58], dx
cmp ebx, dword [esi + 0x48]
ja 0x10af766
push dword [ebp - 0x34]
mov eax, dword [esi + 0x38]
add eax, dword [esi + 0x50]
xor edi, edi
push ebx
inc edi
push edi
push eax
call dword [sym.imp.msvcrt.dll_fwrite]
add esp, 0x10
cmp eax, ebx
jne 0x10af81f
push dword [ebp - 0x34]
call dword [sym.imp.msvcrt.dll_fflush]
test eax, eax
pop ecx
je 0x10af842
mov ax, 0xfde7
jmp 0x10af6f4
mov eax, dword [ebp - 0x38]
mov eax, dword [eax + 4]
or word [eax + reloc.ADVAPI32.dll_RegDeleteValueW], 0x204
jmp 0x10af895
mov ax, 0xfdf8
jmp 0x10af6f4
cmp word [esi + 0x58], 5
je 0x10af87c
push 0
push edi
push dword [ebp - 0x30]
call fcn.0109759c
test ax, ax
jne 0x10af6f0
jmp 0x10af864
call fcn.01075a13
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x30]
call fcn.0109766f
cmp ax, di
je 0x10af85f
cmp word [ebp - 0x20], 0
jne 0x10af839
mov ecx, dword [ebp - 0x38]
mov eax, dword [ecx + 4]
and word [eax + reloc.ADVAPI32.dll_RegDeleteValueW], 0xfefa
mov eax, dword [ecx + 4]
or dword [eax + 0x528], 2
xor ax, ax
jmp 0x10af6f4