Function at 0x10b172d
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x10de03c]
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 0xf0]
push edi
xor edi, edi
inc edi
cmp dword [esi + 0x388], 0
mov dword [ebp - 4], eax
mov dword [ebp - 0x2c], edi
jne 0x10b177d
push edi
push 0x800
call dword [sym.imp.msvcrt.dll_calloc]
test eax, eax
pop ecx
pop ecx
mov dword [esi + 0x388], eax
je 0x10b1802
mov word [esi + reloc.ADVAPI32.dll_RegDeleteValueW], 0x800
mov eax, dword [esi + 0x388]
push 0x1011f8c
push dword [0x10ecab4]
mov dword [ebp - 0x34], eax
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
push dword [0x10ecab0]
call fcn.010b97e7
test eax, eax
je 0x10b1802
push 0x1011f6c
push dword [0x10ecab0]
call dword [sym.imp.msvcrt.dll_wcscat]
push dword [0x10ecab4]
lea eax, [esi + 0x134]
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
add esp, 0x10
push 0
push dword [0x10ecab0]
call fcn.010828b1
xor ecx, ecx
cmp eax, ecx
mov dword [ebp - 0x30], eax
mov dword [esi + 0xf4], eax
jne 0x10b17f2
push edi
push ecx
jmp 0x10b18e7
push ecx
push ecx
push ebx
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0xc
test eax, eax
je 0x10b1854
push edi
push 0
jmp 0x10b18e7
movzx eax, word [esi + reloc.ADVAPI32.dll_RegDeleteValueW]
push ebx
push eax
push edi
push dword [ebp - 0x34]
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
test byte [ebx + 0xc], 0x20
mov dword [ebp - 0x38], eax
jne 0x10b1802
test eax, eax
je 0x10b1849
push dword [ebp - 0x30]
push eax
push edi
push dword [ebp - 0x34]
call dword [sym.imp.msvcrt.dll_fwrite]
add esp, 0x10
cmp eax, dword [ebp - 0x38]
jne 0x10b1802
and dword [ebp - 0x2c], 0
jmp 0x10b1854
cmp word [ebp - 0x2c], 0
jne 0x10b18f4
test byte [ebx + 0xc], 0x10
je 0x10b180a
xor ebx, ebx
push ebx
push ebx
push dword [ebp - 0x30]
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0xc
test eax, eax
jne 0x10b18e5
push dword [esi + 0xf0]
call dword [sym.imp.msvcrt.dll_fclose]
pop ecx
push esi
mov dword [esi + 0xf0], ebx
call fcn.010af4de
test ax, ax
jne 0x10b18e5
push dword [ebp - 0x30]
mov eax, dword [esi + 0xf0]
push edi
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x28]
push reloc.ADVAPI32.dll_CloseServiceHandle
push eax
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, edi
jne 0x10b18e5
mov eax, dword [esi + 0x3a0]
mov dword [eax], ebx
mov eax, dword [ebp - 0x30]
mov word [esi + reloc.ADVAPI32.dll_RegDeleteValueW], bx
mov word [esi + reloc.ADVAPI32.dll_RegDeleteValueW], bx
test byte [eax + 0xc], 0x10
je 0x10b1908
mov eax, dword [ebp - 0x30]
test byte [eax + 0xc], 0x10
jne 0x10b18f4
push edi
push 0xffffffffffffffdc
push eax
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0xc
test eax, eax
je 0x10b18f4
push edi
push ebx
push esi
call fcn.010af580
mov word [esi + 0xd4], di
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ax, ax
pop ebx
call fcn.01075aef
leave
ret 8
xor ebx, ebx
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp + 0xc]
jae 0x10b18cb
mov ecx, dword [ebp - 0x28]
xor eax, eax
mov ax, word [esi + reloc.ADVAPI32.dll_RegDeleteValueW]
add ecx, 0xffffffdc
cmp ax, cx
mov dword [ebp - 0x2c], ecx
jae 0x10b1957
lea ebx, [eax + 0x200]
movzx eax, bx
push eax
push dword [esi + 0x388]
call dword [sym.imp.msvcrt.dll_realloc]
test eax, eax
pop ecx
pop ecx
je 0x10b1802
mov dword [esi + 0x388], eax
mov word [esi + reloc.ADVAPI32.dll_RegDeleteValueW], bx
mov dword [ebp - 0x34], eax
movzx eax, word [ebp - 0x2c]
push dword [ebp - 0x30]
mov ebx, dword [ebp - 0x34]
push eax
push edi
push ebx
mov dword [ebp - 0x2c], eax
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, dword [ebp - 0x2c]
jne 0x10b1802
lea ecx, [ebp - 0x26]
mov ecx, dword [ecx]
mov eax, 0x1011bd4
cmp ecx, dword [eax]
jne 0x10b19a5
movzx eax, word [ebx + 0x1a]
lea ecx, [eax + ebx - 0x24]
lea eax, [ebp - 0x28]
push eax
mov ax, word [ebx + 0x18]
call fcn.010b1362
test ax, ax
jne 0x10b1802
push dword [ebp - 0x38]
mov ebx, dword [sym.imp.msvcrt.dll_fwrite]
push edi
lea eax, [ebp - 0x28]
push reloc.ADVAPI32.dll_CloseServiceHandle
push eax
call ebx
add esp, 0x10
cmp eax, edi
jne 0x10b1802
push dword [ebp - 0x38]
push dword [ebp - 0x2c]
push edi
push dword [ebp - 0x34]
call ebx
add esp, 0x10
cmp eax, dword [ebp - 0x2c]
jne 0x10b1802
mov ebx, dword [ebp - 0x30]
push ebx
push edi
lea eax, [ebp - 0x28]
push reloc.ADVAPI32.dll_CloseServiceHandle
push eax
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, edi
je 0x10b19fc
test byte [ebx + 0xc], 0x10
je 0x10b1802
test byte [ebx + 0xc], 0x10
je 0x10b1906
xor ebx, ebx
jmp 0x10b18cb