Function at 0x1027986
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 [0x102e0fc]
mov ecx, dword [ebp + 0x10]
push ebx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
cmp dword [0x10307b8], ebx
mov dword [ebp - 0x314], eax
mov dword [ebp - 0x328], ecx
je 0x10279ce
mov ecx, dword [ebp + 0xc]
cmp ecx, dword [0x10307bc]
jg 0x1027d20
cmp dword [eax], 0xffffffff
jne 0x1027d20
push esi
push edi
xor eax, eax
inc eax
lea ecx, [ebp - 0x320]
push ecx
push eax
push ebx
push 0x1001d24
push 0x80000001
mov dword [ebp - 0x320], ebx
mov dword [ebp - 0x310], ebx
mov dword [ebp - 0x318], eax
mov dword [0x10307b8], eax
call fcn.0102b456
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, 0x8000080
jne 0x1027b2e
lea eax, [ebp - 0x324]
push eax
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x31c]
push eax
push ebx
push 0x100c214
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 0x1027ad3
cmp dword [ebp - 0x31c], 1
jne 0x1027ad3
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 0x1027aa8
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x1027a8b
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 0x100c1f8
push dword [ebp - 0x320]
mov dword [ebp - 0x324], 4
call fcn.0102b674
test eax, eax
jne 0x1027b10
cmp dword [ebp - 0x31c], 4
je 0x1027b16
mov dword [ebp - 0x310], ebx
movzx eax, word [ebp - 0x310]
push dword [ebp - 0x320]
mov dword [0x10307bc], eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x314]
cmp dword [eax], 0xffffffff
jne 0x1027c23
mov eax, dword [0x10307bc]
cmp eax, ebx
jne 0x1027b4e
push 5
pop eax
mov dword [0x10307bc], eax
cmp dword [ebp + 0xc], eax
jg 0x1027c23
push 0x104
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x1027c23
lea eax, [ebp - 0x108]
push eax
call fcn.010168f3
lea eax, [ebp - 0x108]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x1027b86
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 0x1027bf8
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x1027bdb
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 0x1027d1e
cmp dword [ebp - 0x318], ebx
jne 0x1027c47
push 2
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [0x10307bc]
mov edi, 0x81
push 0x100c1c4
lea eax, [ebp - 0x108]
push edi
push eax
call fcn.010181d3
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 0x1027c76
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.01016d87
push edx
push eax
call fcn.010183fa
push ebx
push 4
call fcn.01016ef9
test eax, eax
mov eax, 0x100c1c0
jne 0x1027cca
mov eax, 0x100c1bc
push 0x100c1ac
lea ecx, [ebp - 0x30c]
push ecx
push eax
push 0x100c17c
lea eax, [ebp - 0x20c]
push edi
push eax
call fcn.010181d3
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 0x1027cfb
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.01016306
leave
ret 0xc