Function at 0x41e530
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, 0x854
mov eax, dword [0x4434f4]
xor eax, esp
mov dword [esp + 0x850], eax
cmp dword [0x444f9c], 0
push ebx
push esi
push edi
mov edi, edx
je 0x41e573
cmp edi, dword [0x444f98]
jg 0x41e971
cmp dword [0x443534], 0xffffffff
jne 0x41e971
xor ecx, ecx
lea eax, [esp + 0x18]
push eax
inc ecx
xor ebx, ebx
push ecx
push ebx
push 0x404100
push SysReAllocStringLen
mov dword [esp + 0x2c], ebx
mov esi, ebx
mov dword [esp + 0x24], ebx
mov dword [0x444f9c], ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x41e6a9
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 0x404140
push dword [esp + 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x41e659
cmp dword [esp + 0x14], 1
jne 0x41e659
push ebx
push 0x8000080
push 3
push ebx
push ebx
push SysReAllocStringLen
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 0x41e62c
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]
mov eax, esi
xor ebx, ebx
push ebx
xor eax, 1
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 [0x443534], 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 0x404150
push dword [esp + 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x41e691
cmp dword [esp + 0x14], 4
jne 0x41e691
mov eax, dword [esp + 0x10]
jmp 0x41e697
mov eax, ebx
mov dword [esp + 0x10], eax
push dword [esp + 0x18]
movzx eax, ax
mov dword [0x444f98], eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [0x443534]
cmp eax, 0xffffffff
jne 0x41e82a
mov ecx, dword [0x444f98]
test ecx, ecx
jne 0x41e6ca
push 4
pop ecx
mov dword [0x444f98], ecx
cmp edi, ecx
jg 0x41e821
push 0x104
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x41e81c
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
push str.wmsetup.log
mov edx, 0x104
lea ecx, [esp + 0x34]
call fcn.0041dc6a
test eax, eax
js 0x41e81c
push ebx
push 0x8000080
push 3
push ebx
push ebx
push SysReAllocStringLen
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x41e754
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 [0x443534]
cmp eax, 0xffffffff
jne 0x41e82a
lea eax, [esp + 0x138]
mov edi, 0x104
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x41e81c
lea eax, [esp + 0x138]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
push 0x40416c
mov edx, edi
lea ecx, [esp + 0x13c]
call fcn.0041dc6a
test eax, eax
js 0x41e81c
push ebx
push 0x8000080
push 3
push ebx
push ebx
push SysReAllocStringLen
lea eax, [esp + 0x150]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x41e7ea
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 [0x443534], eax
jmp 0x41e821
mov eax, dword [0x443534]
cmp eax, 0xffffffff
je 0x41e971
test esi, esi
jne 0x41e839
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 [0x444f98]
movzx eax, word [esp + 0x30]
mov edi, 0x104
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 0x404178
lea eax, [esp + 0x50]
push edi
push eax
call fcn.0041dd0e
add esp, 0x28
test eax, eax
js 0x41e8b6
lea ecx, [esp + 0x30]
mov dword [esp + 0x10], ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41e895
push ebx
lea eax, [esp + 0x14]
sub ecx, edx
push eax
push ecx
lea eax, [esp + 0x3c]
push eax
push dword [0x443534]
call dword [sym.imp.KERNEL32.dll_WriteFile]
call fcn.0041f5df
push edx
push eax
push 0x7f
pop edx
lea ecx, [esp + 0x350]
call fcn.0041efe6
call fcn.004202bb
push edx
push eax
mov edx, 0x103
lea ecx, [esp + 0x658]
call fcn.0041efe6
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultLangID]
mov edx, edi
movzx esi, ax
lea ecx, [esp + 0x448]
call fcn.00422b05
test eax, eax
je 0x41e971
lea eax, [esp + 0x448]
push eax
lea eax, [esp + 0x654]
push eax
push esi
push ecx
call fcn.0041e231
pop ecx
push eax
lea eax, [esp + 0x358]
push eax
push 0x4041d4
push 0x4041d8
lea eax, [esp + 0x25c]
push edi
push eax
call fcn.0041dd0e
add esp, 0x24
test eax, eax
js 0x41e971
lea ecx, [esp + 0x240]
mov dword [esp + 0x10], ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41e94d
push ebx
lea eax, [esp + 0x14]
sub ecx, edx
push eax
push ecx
lea eax, [esp + 0x24c]
push eax
push dword [0x443534]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esp + 0x85c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00441b90
mov esp, ebp
pop ebp
ret 4