Function at 0x102aa9f
Capabilities:
Get common file path
Get file size
Query or enumerate registry value
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x32c
mov eax, dword [0x1048628]
mov ecx, dword [ebp + 0x10]
push ebx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
cmp dword [0x104a444], ebx
mov dword [ebp - 0x314], eax
mov dword [ebp - 0x328], ecx
je 0x102aae7
mov ecx, dword [ebp + 0xc]
cmp ecx, dword [0x104a448]
jg 0x102ae39
cmp dword [eax], 0xffffffff
jne 0x102ae39
push esi
push edi
xor eax, eax
inc eax
lea ecx, [ebp - 0x320]
push ecx
push eax
push ebx
push 0x1005984
push 0x80000001
mov dword [ebp - 0x320], ebx
mov dword [ebp - 0x310], ebx
mov dword [ebp - 0x318], eax
mov dword [0x104a444], eax
call fcn.0101c02d
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, 0x8000080
jne 0x102ac47
lea eax, [ebp - 0x324]
push eax
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x31c]
push eax
push ebx
push 0x1006518
push dword [ebp - 0x320]
mov dword [ebp - 0x31c], 1
mov dword [ebp - 0x324], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x102abec
cmp dword [ebp - 0x31c], 1
jne 0x102abec
push ebx
push edi
push 3
push ebx
push ebx
push 0x80000000
lea eax, [ebp - 0x108]
push eax
call esi
cmp eax, 0xffffffff
mov dword [ebp - 0x32c], eax
je 0x102abc1
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x102aba4
xor eax, eax
push dword [ebp - 0x32c]
mov ecx, 0x7a120
cmp ecx, eax
sbb eax, eax
neg eax
mov dword [ebp - 0x318], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
cmp dword [ebp - 0x318], ebx
push ebx
sete al
push edi
lea eax, [eax + eax + 2]
push eax
push ebx
push 1
push 0x40000000
lea eax, [ebp - 0x108]
push eax
call esi
mov ecx, dword [ebp - 0x314]
mov dword [ecx], eax
lea eax, [ebp - 0x324]
push eax
lea eax, [ebp - 0x310]
push eax
lea eax, [ebp - 0x31c]
push eax
push ebx
push 0x10064fc
push dword [ebp - 0x320]
mov dword [ebp - 0x324], 4
call fcn.0101c24b
test eax, eax
jne 0x102ac29
cmp dword [ebp - 0x31c], 4
je 0x102ac2f
mov dword [ebp - 0x310], ebx
movzx eax, word [ebp - 0x310]
push dword [ebp - 0x320]
mov dword [0x104a448], eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x314]
cmp dword [eax], 0xffffffff
jne 0x102ad3c
mov eax, dword [0x104a448]
cmp eax, ebx
jne 0x102ac67
push 5
pop eax
mov dword [0x104a448], eax
cmp dword [ebp + 0xc], eax
jg 0x102ad3c
push 0x104
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x102ad3c
lea eax, [ebp - 0x108]
push eax
call fcn.01025337
lea eax, [ebp - 0x108]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x102ac9f
sub eax, ecx
mov ecx, 0x104
sub ecx, eax
push ecx
push dword [ebp - 0x328]
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.msvcrt.dll_strncat]
add esp, 0xc
push ebx
push edi
push 3
push ebx
push ebx
push 0x80000000
lea eax, [ebp - 0x108]
push eax
call esi
cmp eax, 0xffffffff
mov dword [ebp - 0x328], eax
je 0x102ad11
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x102acf4
xor eax, eax
push dword [ebp - 0x328]
mov ecx, 0x7a120
cmp ecx, eax
sbb eax, eax
neg eax
mov dword [ebp - 0x318], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
cmp dword [ebp - 0x318], ebx
push ebx
sete al
push edi
lea eax, [eax + eax + 2]
push eax
push ebx
push 1
push 0x40000000
lea eax, [ebp - 0x108]
push eax
call esi
mov ecx, dword [ebp - 0x314]
mov dword [ecx], eax
mov eax, dword [ebp - 0x314]
mov eax, dword [eax]
cmp eax, 0xffffffff
je 0x102ae37
cmp dword [ebp - 0x318], ebx
jne 0x102ad60
push 2
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [0x104a448]
mov edi, 0x81
push 0x10064c8
lea eax, [ebp - 0x108]
push edi
push eax
call fcn.01017ed4
lea eax, [ebp - 0x108]
add esp, 0x10
mov dword [ebp - 0x310], ebx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x102ad8f
push ebx
sub eax, esi
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [ebp - 0x310]
push ecx
push eax
lea eax, [ebp - 0x108]
push eax
mov eax, dword [ebp - 0x314]
push dword [eax]
call esi
push 0x7f
lea eax, [ebp - 0x30c]
push eax
call fcn.0102583d
push edx
push eax
call fcn.01027470
push ebx
push 4
call fcn.010259af
test eax, eax
mov eax, 0x10064c4
jne 0x102ade3
mov eax, 0x10064c0
push 0x10018e0
lea ecx, [ebp - 0x30c]
push ecx
push eax
push 0x1006490
lea eax, [ebp - 0x20c]
push edi
push eax
call fcn.01017ed4
lea eax, [ebp - 0x20c]
add esp, 0x18
mov dword [ebp - 0x310], ebx
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x102ae14
push ebx
sub eax, edi
lea ecx, [ebp - 0x310]
push ecx
push eax
lea eax, [ebp - 0x20c]
push eax
mov eax, dword [ebp - 0x314]
push dword [eax]
call esi
pop edi
pop esi
mov ecx, dword [ebp - 4]
pop ebx
call fcn.01018732
leave
ret 0xc