Function at 0x405520
Capabilities:
Check os version
Delete file
Extract resource via kernel32 functions
Get common file path
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x42da8b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2ac
push ebx
push ebp
xor ebx, ebx
push esi
push edi
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
lea eax, [esp + 0x1b8]
mov dword [esp + 0x2c4], ebx
push eax
push 0x104
call dword [sym.imp.KERNEL32.DLL_GetTempPathA]
lea ecx, [esp + 0x20]
mov dword [esp + 0x20], 0x94
push ecx
call dword [sym.imp.KERNEL32.DLL_GetVersionExA]
cmp dword [esp + 0x24], 5
jne 0x405588
cmp dword [esp + 0x28], 2
je 0x405671
push ecx
mov dword [esp + 0x14], esp
mov eax, esp
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push 0x436bb0
mov dword [eax], 0xde
call fcn.00402eb0
lea ecx, [esp + 0x1c]
call fcn.00405960
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.DLL_LockResource]
mov ecx, dword [esp + 0x18]
mov ebp, eax
mov eax, dword [0x45ec18]
push ecx
mov eax, dword [eax + 8]
push eax
call dword [sym.imp.KERNEL32.DLL_SizeofResource]
mov edi, eax
push edi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
cmp edi, ebx
mov esi, eax
jbe 0x4055f0
mov ecx, ebp
mov ebp, edi
sub ecx, esi
mov dl, byte [ecx + eax]
mov byte [eax], dl
inc eax
dec ebp
jne 0x4055e7
lea eax, [esp + 0x10]
lea ecx, [esp + 0x1b8]
push eax
push 0x104
push ecx
call fcn.004057f0
test eax, eax
jl 0x405629
mov eax, dword [esp + 0x10]
mov edx, 0x104
sub edx, eax
push str.360fixreg.reg
lea eax, [esp + eax + 0x1bc]
push edx
push eax
call fcn.004057a0
push ebx
push 0x80
push 2
push ebx
push 2
lea ecx, [esp + 0x1cc]
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x405668
lea edx, [esp + 0x1c]
push ebx
push edx
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
push ebp
jne 0x405687
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push esi
call fcn.0042d5f4
add esp, 4
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x405680
push eax
call dword [sym.imp.KERNEL32.DLL_FreeResource]
xor eax, eax
jmp 0x405786
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, dword [esp + 0x14]
mov edi, dword [sym.imp.KERNEL32.DLL_FreeResource]
cmp eax, ebx
je 0x4056a6
push eax
call edi
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
push esi
call fcn.0042d5f4
add esp, 4
lea eax, [esp + 0xb4]
push 0x104
push eax
call dword [sym.imp.KERNEL32.DLL_GetWindowsDirectoryA]
mov ecx, 0x104
lea eax, [esp + 0xb4]
cmp byte [eax], bl
je 0x4056d8
inc eax
dec ecx
jne 0x4056ce
jmp 0x40570b
cmp ecx, ebx
je 0x40570b
lea edx, [esp + 0x10]
test edx, edx
je 0x4056ed
mov eax, 0x104
sub eax, ecx
jmp 0x4056f1
mov eax, dword [esp + 0x10]
mov ecx, 0x104
push str._regedit.exe__s
sub ecx, eax
lea edx, [esp + eax + 0xb8]
push ecx
push edx
call fcn.004057a0
mov ecx, 0x104
lea eax, [esp + 0xb4]
cmp byte [eax], bl
je 0x405721
inc eax
dec ecx
jne 0x405717
jmp 0x405757
cmp ecx, ebx
je 0x405757
lea eax, [esp + 0x10]
test eax, eax
je 0x405736
mov eax, 0x104
sub eax, ecx
jmp 0x40573a
mov eax, dword [esp + 0x10]
mov edx, 0x104
lea ecx, [esp + 0x1b8]
sub edx, eax
push ecx
lea eax, [esp + eax + 0xb8]
push edx
push eax
call fcn.004057a0
lea ecx, [esp + 0xb4]
push ebx
push ecx
call fcn.0040da50
add esp, 8
lea edx, [esp + 0x1b8]
push edx
call dword [sym.imp.KERNEL32.DLL_DeleteFileA]
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x405781
push eax
call edi
mov eax, 1
mov ecx, dword [esp + 0x2bc]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x2b8
ret