Function at 0x4277cb
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
and esp, 0xfffffff8
sub esp, 0xa5c
mov eax, dword [0x42b004]
xor eax, esp
mov dword [esp + 0xa58], eax
cmp dword [0x42cc40], 0
push ebx
push esi
push edi
mov edi, edx
je 0x42780e
cmp edi, dword [0x42cc3c]
jg 0x427c46
cmp dword [0x42bd78], 0xffffffff
jne 0x427c46
xor ecx, ecx
lea eax, [esp + 0x18]
push eax
inc ecx
xor ebx, ebx
push ecx
push ebx
push 0x401b18
push SysReAllocString
mov dword [esp + 0x2c], ebx
mov esi, ebx
mov dword [esp + 0x24], ebx
mov dword [0x42cc40], ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x42794a
lea eax, [esp + 0x1c]
mov dword [esp + 0x14], 1
push eax
lea eax, [esp + 0x34]
mov dword [esp + 0x20], 0x104
push eax
lea eax, [esp + 0x1c]
push eax
push ebx
push 0x409458
push dword [esp + 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4278fa
cmp dword [esp + 0x14], 1
jne 0x4278fa
push ebx
push 0x8000080
push 3
push ebx
push ebx
push SysReAllocString
lea eax, [esp + 0x48]
mov byte [esp + 0x14b], bl
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4278cb
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push ebx
lea ecx, [eax + 1]
neg ecx
sbb ecx, ecx
and ecx, eax
mov eax, 0x7a120
cmp eax, ecx
sbb esi, esi
neg esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
xor ebx, ebx
test esi, esi
push ebx
sete al
push 0x8000080
lea eax, [eax*2 + 2]
push eax
push ebx
push 1
push 0x40000000
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x42bd78], eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 4
push eax
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x1c]
push eax
push ebx
push 0x409468
push dword [esp + 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x427932
cmp dword [esp + 0x14], 4
jne 0x427932
mov eax, dword [esp + 0x10]
jmp 0x427938
mov eax, ebx
mov dword [esp + 0x10], eax
push dword [esp + 0x18]
movzx eax, ax
mov dword [0x42cc3c], eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [0x42bd78]
cmp eax, 0xffffffff
jne 0x427ac9
mov eax, dword [0x42cc3c]
test eax, eax
jne 0x427969
push 4
pop eax
mov dword [0x42cc3c], eax
cmp edi, eax
jg 0x427c46
push 0x104
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x427abb
lea eax, [esp + 0x30]
test eax, eax
je 0x427998
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
push str.wmsetup.log
lea ecx, [esp + 0x34]
call fcn.00424c59
test eax, eax
js 0x427abb
push ebx
push 0x8000080
push 3
push ebx
push ebx
push SysReAllocString
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x4279f2
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push edi
lea ecx, [eax + 1]
neg ecx
sbb ecx, ecx
and ecx, eax
mov eax, 0x7a120
cmp eax, ecx
sbb esi, esi
neg esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x42bd78]
cmp eax, 0xffffffff
jne 0x427ac9
lea eax, [esp + 0x138]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x427abb
lea eax, [esp + 0x138]
test eax, eax
je 0x427a2d
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
push 0x409484
lea ecx, [esp + 0x13c]
call fcn.00424c59
test eax, eax
js 0x427abb
push ebx
push 0x8000080
push 3
push ebx
push ebx
push SysReAllocString
lea eax, [esp + 0x150]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x427a89
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push edi
lea ecx, [eax + 1]
neg ecx
sbb ecx, ecx
and ecx, eax
mov eax, 0x7a120
cmp eax, ecx
sbb esi, esi
neg esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
test esi, esi
push ebx
sete al
push 0x8000080
lea eax, [eax*2 + 2]
push eax
push ebx
push 1
push 0x40000000
lea eax, [esp + 0x150]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x42bd78], eax
jmp 0x427ac0
mov eax, dword [0x42bd78]
cmp eax, 0xffffffff
je 0x427c46
test esi, esi
jne 0x427ad8
push 2
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push dword [0x42cc3c]
movzx eax, word [esp + 0x30]
push eax
movzx eax, word [esp + 0x32]
push eax
movzx eax, word [esp + 0x34]
push eax
movzx eax, word [esp + 0x36]
push eax
movzx eax, word [esp + 0x36]
push eax
movzx eax, word [esp + 0x38]
push eax
push 0x409490
lea eax, [esp + 0x50]
push 0x104
push eax
call fcn.0042768d
add esp, 0x28
test eax, eax
js 0x427b54
lea ecx, [esp + 0x30]
mov dword [esp + 0x10], ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x427b33
push ebx
lea eax, [esp + 0x14]
sub ecx, edx
push eax
push ecx
lea eax, [esp + 0x3c]
push eax
push dword [0x42bd78]
call dword [sym.imp.KERNEL32.dll_WriteFile]
call fcn.00425097
push edx
push eax
push 0x7f
pop edx
lea ecx, [esp + 0x350]
call fcn.00424f8b
mov edx, 0x208
lea ecx, [esp + 0x650]
call fcn.00425644
test eax, eax
je 0x427b8d
lea ecx, [esp + 0x650]
call fcn.00425a90
jmp 0x427b91
mov eax, ebx
mov edx, ebx
push edx
push eax
mov edx, 0x103
lea ecx, [esp + 0x860]
call fcn.00424f8b
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultLangID]
lea ecx, [esp + 0x448]
movzx edi, ax
call fcn.004263a6
test eax, eax
je 0x427c46
call fcn.0042520d
mov esi, 0x4094ec
test eax, eax
jne 0x427bd4
mov esi, 0x4094f0
lea eax, [esp + 0x448]
push eax
lea eax, [esp + 0x85c]
push eax
push edi
push ecx
call fcn.00427719
pop ecx
push eax
lea eax, [esp + 0x358]
push eax
push esi
push 0x4094f8
lea eax, [esp + 0x25c]
push 0x104
push eax
call fcn.0042768d
add esp, 0x24
test eax, eax
js 0x427c46
lea ecx, [esp + 0x240]
mov dword [esp + 0x10], ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x427c22
push ebx
lea eax, [esp + 0x14]
sub ecx, edx
push eax
push ecx
lea eax, [esp + 0x24c]
push eax
push dword [0x42bd78]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esp + 0xa64]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00429770
mov esp, ebp
pop ebp
ret 4