Function at 0x475470
Capabilities:
Check os version
Extract resource via kernel32 functions
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x587020
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1e0
push ebx
push esi
push edi
lea eax, [ebp - 0x18]
mov dword [ebp - 0x10], esp
push eax
xor esi, esi
push 0x5c3f20
push 1
push esi
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 4], esi
push 0x59d068
mov dword [ebp - 0x20], esi
mov byte [ebp - 4], 1
mov dword [ebp - 0x18], esi
call dword [sym.imp.ole32.dll_CoCreateInstance]
cmp eax, esi
mov dword [ebp - 0x14], eax
jl 0x4754f4
mov ecx, dword [ebp - 0x18]
cmp ecx, esi
je 0x4754f4
mov edx, dword [ecx]
lea eax, [ebp - 0x20]
push eax
push 0x59c990
push ecx
call dword [edx]
jmp 0x4754f4
cmp eax, esi
mov dword [ebp - 4], esi
jl 0x475504
cmp dword [ebp - 0x20], esi
jne 0x4757db
mov ecx, 0x27
xor eax, eax
lea edi, [ebp - 0xe8]
lea edx, [ebp - 0xe8]
rep stosd dword es:[edi], eax
push edx
mov dword [ebp - 0xe8], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp eax, esi
je 0x4755b9
cmp dword [ebp - 0xd8], 2
jne 0x4755b9
mov eax, dword [ebp - 0xe4]
cmp eax, 4
jbe 0x4755b9
cmp eax, 6
jne 0x4755b9
cmp dword [ebp - 0xe0], esi
jne 0x4755b9
push 0x104
push ecx
mov ecx, esp
mov dword [ebp - 0x18], esp
push 0x5ea678
call fcn.0056877a
lea eax, [ebp - 0x18]
push eax
call fcn.00441aa0
add esp, 8
mov ecx, eax
mov byte [ebp - 4], 3
call fcn.0040d0c0
lea ecx, [ebp - 0x1ec]
push eax
push ecx
call fcn.0043a0b0
add esp, 0xc
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0
call fcn.0056870c
push 1
push ecx
lea edx, [ebp - 0x1ec]
mov ecx, esp
mov dword [ebp - 0x18], esp
push edx
call fcn.0056877a
call fcn.004416c0
add esp, 8
jmp 0x4755cb
lea eax, [ebp - 0x1ec]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea edi, [ebp - 0x1ec]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [ebp + ecx - 0x1ed], 0x5c
jne 0x4755fc
lea edi, [ebp - 0x1ec]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [ebp + ecx - 0x1ed], al
mov ecx, dword [0x5f9f88]
mov dword [ebp - 0x14], ecx
lea edx, [ebp - 0x1ec]
lea ecx, [ebp - 0x18]
push edx
mov byte [ebp - 4], 4
call fcn.0056877a
push 0x5ecc84
push eax
lea eax, [ebp - 0x1c]
mov bl, 5
push eax
mov byte [ebp - 4], bl
call fcn.005689a1
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 6
call fcn.00568845
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], bl
call fcn.0056870c
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 4
call fcn.0056870c
lea ecx, [ebp - 0x4c]
call fcn.00548510
mov ecx, dword [ebp - 0x14]
push esi
mov bl, 7
push ecx
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], bl
call fcn.005485d3
cmp eax, esi
jne 0x475753
call fcn.00578d59
mov eax, dword [eax + 4]
push 0x5ecc7c
push 0x11d
mov edx, dword [eax + 0x68]
push edx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
je 0x4756fd
call fcn.00578d59
mov eax, dword [eax + 4]
push esi
mov eax, dword [eax + 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
call fcn.00578d59
mov eax, dword [eax + 4]
push esi
mov ecx, dword [eax + 0x68]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
test esi, esi
je 0x4756fd
lea ecx, [ebp - 0x30]
call fcn.0056c8a0
mov edx, dword [ebp - 0x14]
push 0
push 0x9002
push edx
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 8
call fcn.0056c9b2
test eax, eax
je 0x4756f2
push esi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x475728
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], bl
call fcn.0056c8f5
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 4
call fcn.0054854d
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.0056870c
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x30]
push 0
push 0
lea ecx, [ebp - 0x30]
call dword [eax + 0x28]
mov edx, dword [ebp - 0x30]
push edi
push esi
lea ecx, [ebp - 0x30]
call dword [edx + 0x38]
lea ecx, [ebp - 0x30]
call fcn.0056cbcd
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], bl
call fcn.0056c8f5
lea ecx, [ebp - 0x4c]
call fcn.00548589
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x475784
push 0x5ecc68
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x47577d
call eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 9
push ecx
push 0x5c3f20
push 1
push 0
push 0x59d068
mov dword [ebp - 0x1c], 0
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jl 0x4757c0
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x4757c0
mov edx, dword [eax]
lea ecx, [ebp - 0x20]
push ecx
push 0x59c990
push eax
call dword [edx]
lea ecx, [ebp - 0x4c]
mov dword [ebp - 4], 4
call fcn.0054854d
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.0056870c
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov eax, 1
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret