Function at 0x41e30f
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 [0x4424f4]
xor eax, esp
mov dword [esp + 0x850], eax
cmp dword [0x443f9c], 0
push ebx
push esi
push edi
mov edi, edx
je 0x41e352
cmp edi, dword [0x443f98]
jg 0x41e750
cmp dword [0x442534], 0xffffffff
jne 0x41e750
xor ecx, ecx
lea eax, [esp + 0x18]
push eax
inc ecx
xor ebx, ebx
push ecx
push ebx
push 0x404110
push SysReAllocStringLen
mov dword [esp + 0x2c], ebx
mov esi, ebx
mov dword [esp + 0x24], ebx
mov dword [0x443f9c], ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x41e488
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 0x404150
push dword [esp + 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x41e438
cmp dword [esp + 0x14], 1
jne 0x41e438
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 0x41e40b
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 [0x442534], 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 0x404160
push dword [esp + 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x41e470
cmp dword [esp + 0x14], 4
jne 0x41e470
mov eax, dword [esp + 0x10]
jmp 0x41e476
mov eax, ebx
mov dword [esp + 0x10], eax
push dword [esp + 0x18]
movzx eax, ax
mov dword [0x443f98], eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [0x442534]
cmp eax, 0xffffffff
jne 0x41e609
mov ecx, dword [0x443f98]
test ecx, ecx
jne 0x41e4a9
push 4
pop ecx
mov dword [0x443f98], ecx
cmp edi, ecx
jg 0x41e600
push 0x104
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x41e5fb
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.0041da6a
test eax, eax
js 0x41e5fb
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 0x41e533
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 [0x442534]
cmp eax, 0xffffffff
jne 0x41e609
lea eax, [esp + 0x138]
mov edi, 0x104
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x41e5fb
lea eax, [esp + 0x138]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
push 0x40417c
mov edx, edi
lea ecx, [esp + 0x13c]
call fcn.0041da6a
test eax, eax
js 0x41e5fb
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 0x41e5c9
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 [0x442534], eax
jmp 0x41e600
mov eax, dword [0x442534]
cmp eax, 0xffffffff
je 0x41e750
test esi, esi
jne 0x41e618
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 [0x443f98]
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 0x404188
lea eax, [esp + 0x50]
push edi
push eax
call fcn.0041db0e
add esp, 0x28
test eax, eax
js 0x41e695
lea ecx, [esp + 0x30]
mov dword [esp + 0x10], ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41e674
push ebx
lea eax, [esp + 0x14]
sub ecx, edx
push eax
push ecx
lea eax, [esp + 0x3c]
push eax
push dword [0x442534]
call dword [sym.imp.KERNEL32.dll_WriteFile]
call fcn.0041f368
push edx
push eax
push 0x7f
pop edx
lea ecx, [esp + 0x350]
call fcn.0041ed98
call fcn.00420034
push edx
push eax
mov edx, 0x103
lea ecx, [esp + 0x658]
call fcn.0041ed98
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultLangID]
mov edx, edi
movzx esi, ax
lea ecx, [esp + 0x448]
call fcn.00422817
test eax, eax
je 0x41e750
lea eax, [esp + 0x448]
push eax
lea eax, [esp + 0x654]
push eax
push esi
push ecx
call fcn.0041e01e
pop ecx
push eax
lea eax, [esp + 0x358]
push eax
push 0x4041e4
push 0x4041e8
lea eax, [esp + 0x25c]
push edi
push eax
call fcn.0041db0e
add esp, 0x24
test eax, eax
js 0x41e750
lea ecx, [esp + 0x240]
mov dword [esp + 0x10], ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41e72c
push ebx
lea eax, [esp + 0x14]
sub ecx, edx
push eax
push ecx
lea eax, [esp + 0x24c]
push eax
push dword [0x442534]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esp + 0x85c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00441130
mov esp, ebp
pop ebp
ret 4