Function at 0x42aa80
Capabilities:
Check os version
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x46082d
mov eax, dword fs:[0]
push eax
sub esp, 0x3e0
mov eax, dword [0x488180]
xor eax, esp
mov dword [esp + 0x3d8], eax
push ebx
push esi
push edi
mov eax, dword [0x488180]
xor eax, esp
push eax
lea eax, [esp + 0x3f0]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0x14]
xor ebx, ebx
push 0x46985d
lea ecx, [esp + 0x90]
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], ebx
call fcn.004084cc
mov dword [esp + 0x3f8], ebx
cmp byte [ebp + 0x18], bl
je 0x42ab02
push 0x4725a0
lea ecx, [esp + 0x90]
call fcn.004096d2
push str.Shell32.dll
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esp + 0x24], eax
cmp eax, ebx
je 0x42ab29
push str.SHGetKnownFolderPath
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esp + 0x20], eax
push 0x110
lea eax, [esp + 0xcc]
push ebx
push eax
mov byte [esp + 0x404], 1
call fcn.00447690
add esp, 0xc
lea eax, [esp + 0xc4]
push eax
mov dword [esp + 0xc8], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [esp + 0xc8], 6
jb 0x42ad79
mov eax, dword [ebp + 0xc]
cmp eax, 8
ja case.default.0x42ab76
jmp dword [eax*4 + 0x42af28]
mov esi, 0x469554
jmp 0x42abb3
mov esi, 0x469564
jmp 0x42abb3
mov esi, 0x469534
jmp 0x42abb3
mov esi, 0x469514
jmp 0x42abb3
mov esi, 0x469574
jmp 0x42abb3
mov esi, 0x469524
jmp 0x42abb3
mov esi, 0x469504
jmp 0x42abb3
mov esi, 0x469544
lea edi, [esp + 0x70]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [esp + 0x18], ebx
cmp dword [esp + 0x20], ebx
je 0x42ad79
lea eax, [esp + 0x18]
push eax
movzx eax, byte [ebp + 0x10]
neg eax
sbb eax, eax
push ebx
and eax, 0x8000
push eax
lea eax, [esp + 0x7c]
push eax
call dword [esp + 0x30]
cmp eax, 0x80004001
je 0x42ad79
push dword [esp + 0x18]
lea eax, [esp + 0x14]
push eax
call fcn.00410833
mov byte [esp + 0x3f8], 2
cmp dword [esp + 0xa4], 0x10
mov eax, dword [esp + 0x90]
jae 0x42ac1f
lea eax, [esp + 0x90]
push eax
lea esi, [esp + 0x14]
call fcn.0042afa4
push 0x4725a8
call fcn.0042afa4
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [ebp + 0x10], bl
je 0x42ac90
push ebx
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x42ac90
call edi
cmp eax, 0xb7
je 0x42ac90
call edi
push eax
push dword [esp + 0x14]
lea esi, [esp + 0x34]
push str.Failed_to_create_directory__S__error_d
call fcn.0042a6df
add esp, 0xc
push eax
lea eax, [esp + 0x4c]
push eax
mov byte [esp + 0x400], 3
call fcn.00401281
push 0x47b878
lea eax, [esp + 0x4c]
push eax
call fcn.00447fb3
cmp dword [esp + 0x1c], ebx
je 0x42acf6
push dword [esp + 0x1c]
lea esi, [esp + 0x14]
call fcn.0042afa4
cmp byte [ebp + 0x10], bl
je 0x42acf6
push ebx
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x42acf6
call edi
cmp eax, 0xb7
je 0x42acf6
call edi
push eax
push dword [esp + 0x14]
lea esi, [esp + 0x34]
push str.Failed_to_create_subdirectory__S__error_d
call fcn.0042a6df
add esp, 0xc
push eax
lea eax, [esp + 0x4c]
push eax
mov byte [esp + 0x400], 4
call fcn.00401281
push 0x47b878
lea eax, [esp + 0x4c]
jmp 0x42ac8a
push dword [esp + 0x10]
lea eax, [esp + 0x18]
push eax
call fcn.00410833
lea eax, [esp + 0x14]
mov byte [esp + 0x3f8], 5
call fcn.0042b03c
push dword [esp + 0x14]
mov esi, dword [esp + 0x2c]
call fcn.0040858a
lea eax, [esp + 0x14]
call fcn.0040f17c
lea eax, [esp + 0x10]
call fcn.0040f17c
cmp dword [esp + 0x24], ebx
je 0x42ad44
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push ebx
push 1
lea ecx, [esp + 0x94]
call fcn.004097af
mov eax, esi
mov ecx, dword [esp + 0x3f0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d8]
xor ecx, esp
call fcn.00443d6d
mov esp, ebp
pop ebp
ret
movzx edi, byte [ebp + 0x10]
neg edi
sbb edi, edi
lea edx, [esp + 0x8c]
lea ecx, [esp + 0xa8]
and edi, 0x8000
call fcn.0042a528
mov byte [esp + 0x3f8], 6
cmp dword [esp + 0x1c], ebx
je 0x42ae01
push dword [esp + 0x1c]
lea ecx, [esp + 0x74]
call fcn.004084cc
lea edx, [esp + 0x70]
lea ecx, [esp + 0x2c]
mov byte [esp + 0x3f8], 7
call fcn.0042a528
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0xb0]
mov byte [esp + 0x400], 8
call fcn.004097fa
push ebx
push 1
lea esi, [esp + 0x34]
call fcn.00409a53
push ebx
push 1
lea ecx, [esp + 0x78]
mov byte [esp + 0x400], 6
call fcn.004097af
mov eax, dword [ebp + 0xc]
cmp eax, 8
ja case.0x42ae09.7
jmp dword [eax*4 + 0x42af4c]
push 0x1c
pop eax
jmp 0x42ae31
push 0x23
jmp 0x42ae12
push 2
jmp 0x42ae12
push 0x17
jmp 0x42ae12
push 0x26
jmp 0x42ae12
xor eax, eax
jmp 0x42ae31
push 0x1a
jmp 0x42ae12
mov eax, dword [esp + 0x18]
cmp dword [esp + 0xc0], 8
mov ecx, dword [esp + 0xac]
jae 0x42ae49
lea ecx, [esp + 0xac]
lea edx, [esp + 0x1dc]
push edx
push ecx
push ebx
push ebx
or eax, edi
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathAndSubDirW]
cmp eax, ebx
jne 0x42aef5
lea eax, [esp + 0x1dc]
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.00410833
mov byte [esp + 0x3f8], 9
push dword [esp + 0x18]
lea eax, [esp + 0x18]
push eax
call fcn.00410833
lea eax, [esp + 0x14]
mov byte [esp + 0x3f8], 0xa
call fcn.0042b03c
push dword [esp + 0x14]
mov esi, dword [esp + 0x2c]
call fcn.0040858a
lea eax, [esp + 0x14]
call fcn.0040f17c
lea eax, [esp + 0x18]
call fcn.0040f17c
push ebx
push 1
lea esi, [esp + 0xb0]
call fcn.00409a53
cmp dword [esp + 0x24], ebx
je 0x42aedd
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push ebx
push 1
lea ecx, [esp + 0x94]
call fcn.004097af
mov eax, dword [esp + 0x28]
jmp 0x42ad55
push eax
push str.Bad_result_from_SHGetFolderPathAndSubDirW_d
lea esi, [esp + 0x34]
call fcn.0042a6df
pop ecx
pop ecx
push eax
lea eax, [esp + 0x4c]
push eax
mov byte [esp + 0x400], 0xb
call fcn.00401281
push 0x47b878
lea eax, [esp + 0x4c]
jmp 0x42ac8a