Function at 0x4021a0
Capabilities:
Check if file exists
Check os version
Contain obfuscated stackstrings
Create directory
Create process on windows
Get common file path
Read .ini file
Resolve function by parsing pe exports
Set registry value
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x19a4
call fcn.00415750
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x19a0], eax
push ebx
push esi
push edi
push str.WEIDUAN
push 0
push 0x1f0001
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
test eax, eax
jne 0x402c98
push 0x206
push eax
mov word [esp + 0x15a0], ax
lea eax, [esp + 0x15a2]
push eax
call fcn.0040bd20
add esp, 0xc
lea ecx, [esp + 0x1598]
call fcn.00402080
mov bl, al
xor eax, eax
push 0x206
push eax
mov word [esp + 0x358], ax
lea eax, [esp + 0x35a]
push eax
mov byte [esp + 0x18], bl
call fcn.0040bd20
mov edi, dword [sym.imp.USER32.dll_GetDesktopWindow]
lea eax, [esp + 0x35c]
add esp, 0xc
push 0
push 0x1a
push eax
call edi
push eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push 0x4226fc
lea eax, [esp + 0x354]
push 0x104
push eax
call fcn.004098f1
add esp, 0xc
lea eax, [esp + 0x350]
push str.23a7k7kLegend_
push 0x104
push eax
call fcn.004098f1
add esp, 0xc
xor eax, eax
mov word [esp + 0xd78], ax
push 0x206
push eax
lea eax, [esp + 0xd82]
push eax
call fcn.0040bd20
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [esp + 0x35c]
add esp, 0xc
push eax
push 0x5c2c08
call esi
push str.softinfo.ini
push 0x104
push 0x5c2c08
call fcn.004098f1
add esp, 0xc
push 0x5c2a00
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jg 0x4022f9
push 0x5c2c08
push 0x104
push 0x5c2a00
push 0x422700
push str.REName
push str.config
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov ecx, 0x5c2a00
call fcn.00401cf0
call fcn.00401c10
mov ax, word [0x4228e4]
mov dword [esp + 0x2b8], 0x4034b50
mov dword [esp + 0x2bc], 0x14
movq xmm0, qword [esp + 0x2b8]
movq qword [0x427340], xmm0
movdqu xmm0, xmmword [0x4228cc]
push 0x4a
mov word [esp + 0x2c], ax
lea eax, [esp + 0x2e]
movdqu xmmword [esp + 0x14], xmm0
push 0
movq xmm0, qword [str..exe]
push eax
movq qword [esp + 0x2c], xmm0
call fcn.0040bd20
add esp, 0xc
xor eax, eax
mov word [esp + 0xb70], ax
push 0x206
push eax
lea eax, [esp + 0xb7a]
push eax
call fcn.0040bd20
add esp, 0xc
test bl, bl
jne 0x40239c
push 0x4228cc
lea eax, [esp + 0xb74]
push eax
call esi
jmp 0x402405
push 0
call fcn.00409bd5
add esp, 4
push eax
call fcn.00409bc5
add esp, 4
call fcn.00409ba4
cdq
mov esi, 0x1a
idiv esi
add edx, 0x61
push edx
call fcn.00409ba4
cdq
idiv esi
add edx, 0x61
push edx
call fcn.00409ba4
cdq
idiv esi
add edx, 0x61
push edx
call fcn.00409ba4
cdq
idiv esi
add edx, 0x61
push edx
call fcn.00409ba4
cdq
idiv esi
lea eax, [esp + 0xb80]
add edx, 0x61
push edx
push str._c_c_c_c_c.exe
push eax
call fcn.00402cc0
add esp, 0x1c
push ecx
mov dword [0x427340], 0x4034b50
mov byte [0x427344], 0x14
call fcn.00406ae0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x402631
xor eax, eax
xor edi, edi
push 0x206
push eax
mov word [esp + 0xf88], ax
lea eax, [esp + 0xf8a]
push eax
call fcn.0040bd20
add esp, 0xc
xor eax, eax
mov word [esp + 0x760], ax
push 0x206
push eax
lea eax, [esp + 0x76a]
push eax
call fcn.0040bd20
add esp, 0xc
lea eax, [esp + 0x350]
push eax
lea eax, [esp + 0xf84]
push 0x104
push eax
call fcn.0040995d
add esp, 0xc
lea eax, [esp + 0xf80]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4024ab
push edi
lea eax, [esp + 0xf84]
push eax
call esi
lea eax, [esp + 0x78]
xor edx, edx
push eax
mov ecx, ebx
call fcn.00406bb0
add esp, 4
test eax, eax
jne 0x40262b
jmp 0x4024d0
lea eax, [esp + 0xf80]
push eax
lea eax, [esp + 0x764]
push 0x104
push eax
call fcn.0040995d
add esp, 0xc
lea eax, [esp + 0x10]
lea ecx, [esp + 0x7c]
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x40251b
test dx, dx
je 0x402517
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x40251b
add ecx, 4
add eax, 4
test dx, dx
jne 0x4024f5
xor eax, eax
jmp 0x402520
sbb eax, eax
or eax, 1
test eax, eax
lea eax, [esp + 0xb70]
je 0x40252f
lea eax, [esp + 0x7c]
push eax
lea eax, [esp + 0x764]
push 0x104
push eax
call fcn.004098f1
mov eax, dword [esp + 0x290]
add esp, 0xc
test al, 0x10
je 0x402563
push 0
lea eax, [esp + 0x764]
push eax
call esi
mov eax, dword [esp + 0x284]
test al, 0x20
je 0x402611
push 0x422908
lea eax, [esp + 0x764]
push eax
lea eax, [esp + 0x2c0]
push eax
call fcn.00409ce2
add esp, 0xc
cmp dword [esp + 0x2b8], 0
je 0x402611
push dword [esp + 0x2a4]
call fcn.00409df1
add esp, 4
mov esi, eax
push dword [esp + 0x2a4]
push 0
push esi
call fcn.0040bd20
add esp, 0xc
cmp dword [ebx], 1
je 0x4025c6
mov dword [0x5c301c], 0x80000
jmp 0x4025dd
push ecx
push dword [esp + 0x2a8]
mov ecx, dword [ebx + 4]
push esi
push edi
call fcn.004069e0
mov dword [0x5c301c], eax
push dword [esp + 0x2b8]
push dword [esp + 0x2a8]
push 1
push esi
call fcn.00409f53
push dword [esp + 0x2c8]
call fcn.0040a041
add esp, 0x14
push esi
call fcn.00409af9
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
add esp, 4
lea eax, [esp + 0x78]
inc edi
push eax
mov edx, edi
mov ecx, ebx
call fcn.00406bb0
add esp, 4
test eax, eax
je 0x4024d0
mov edi, dword [sym.imp.USER32.dll_GetDesktopWindow]
push 0
push 0
push 0
push 0
push 5
push 0x10000000
push 0x5c2c08
call dword [sym.imp.KERNEL32.dll_CreateFileW]
xor eax, eax
push 0x206
push eax
mov word [esp + 0x560], ax
lea eax, [esp + 0x562]
push eax
call fcn.0040bd20
add esp, 0xc
lea eax, [esp + 0x350]
push eax
lea eax, [esp + 0x55c]
push 0x104
push eax
call fcn.0040995d
add esp, 0xc
lea eax, [esp + 0xb70]
push eax
lea eax, [esp + 0x55c]
push 0x104
push eax
call fcn.004098f1
mov bl, byte [esp + 0x18]
add esp, 0xc
test bl, bl
je 0x40270a
lea eax, [esp + 0x760]
mov dword [esp + 0x760], 0x114
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [esp + 0x764], 5
jne 0x4026f7
cmp dword [esp + 0x768], 1
jne 0x4026f7
push dword [esp + 0xc]
lea edx, [esp + 0x354]
push ecx
lea ecx, [esp + 0x560]
call fcn.00401180
add esp, 8
jmp 0x40270a
push dword [esp + 0xc]
lea ecx, [esp + 0x55c]
call fcn.00401430
add esp, 4
lea eax, [esp + 0x2a8]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
xor eax, eax
push 0x206
push eax
mov word [esp + 0x970], ax
lea eax, [esp + 0x972]
push eax
call fcn.0040bd20
add esp, 0xc
lea eax, [esp + 0x968]
push 0
push 2
push eax
call edi
push eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [esp + 0x968]
push 0x4226fc
push eax
call esi
push str.7k7k
lea eax, [esp + 0x96c]
push eax
call esi
push 0x4226fc
lea eax, [esp + 0x96c]
push eax
call esi
push str.7k7k
sub esp, 0xc
lea edx, [esp + 0x568]
lea ecx, [esp + 0x978]
call fcn.00401770
mov edi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
lea eax, [esp + 0x978]
add esp, 0x10
push 0x5c2c08
push eax
push str.StartMenuPath
push str.config
call edi
xor eax, eax
push 0x206
push eax
mov word [esp + 0x1190], ax
lea eax, [esp + 0x1192]
push eax
call fcn.0040bd20
add esp, 0xc
lea eax, [esp + 0x350]
push eax
lea eax, [esp + 0x118c]
push 0x104
push eax
call fcn.0040995d
add esp, 0xc
lea eax, [esp + 0x1188]
push str.unins000.exe
push eax
call esi
lea edx, [esp + 0x1188]
lea ecx, [esp + 0x968]
test bl, bl
je 0x402822
push 0x422940
jmp 0x402827
push 0x422948
sub esp, 0xc
call fcn.00401770
add esp, 0x10
xor eax, eax
mov word [esp + 0x17a0], ax
push 0x206
push eax
lea eax, [esp + 0x17aa]
push eax
call fcn.0040bd20
add esp, 0xc
mov dword [esp + 0x2dc], 0x2f0020
lea eax, [esp + 0x558]
mov dword [esp + 0x2e0], 0x750061
mov dword [esp + 0x2e4], 0x6f0074
mov dword [esp + 0x2e8], 0x750072
push eax
lea eax, [esp + 0x17a4]
mov dword [esp + 0x2f0], 0x6e
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [esp + 0x2dc]
push eax
lea eax, [esp + 0x55c]
push 0x104
push eax
call fcn.004098f1
add esp, 0xc
mov dword [esp + 0x2f0], 0x4f0053
lea eax, [esp + 0xc]
mov dword [esp + 0x2f4], 0x540046
xor esi, esi
mov dword [esp + 0x2f8], 0x410057
mov dword [esp + 0x2fc], 0x450052
push eax
push 2
push esi
lea eax, [esp + 0x2fc]
mov dword [esp + 0x30c], 0x4d005c
push eax
push 0x80000002
mov dword [esp + 0x318], 0x630069
mov dword [esp + 0x31c], 0x6f0072
mov dword [esp + 0x320], 0x6f0073
mov dword [esp + 0x324], 0x740066
mov dword [esp + 0x328], 0x57005c
mov dword [esp + 0x32c], 0x6e0069
mov dword [esp + 0x330], 0x6f0064
mov dword [esp + 0x334], 0x730077
mov dword [esp + 0x338], 0x43005c
mov dword [esp + 0x33c], 0x720075
mov dword [esp + 0x340], 0x650072
mov dword [esp + 0x344], 0x74006e
mov dword [esp + 0x348], 0x650056
mov dword [esp + 0x34c], 0x730072
mov dword [esp + 0x350], 0x6f0069
mov dword [esp + 0x354], 0x5c006e
mov dword [esp + 0x358], 0x750052
mov dword [esp + 0x35c], 0x6e
mov dword [esp + 0x20], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x402a2c
mov esi, dword [esp + 0xc]
lea ecx, [esp + 0x558]
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4029f0
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [esp + 0x55c]
push eax
push 1
push 0
push str.7k7kLegend
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test esi, esi
je 0x402a2c
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor esi, esi
xor eax, eax
push 0x206
push eax
mov word [esp + 0x1398], ax
lea eax, [esp + 0x139a]
push eax
call fcn.0040bd20
add esp, 0xc
lea eax, [esp + 0x350]
push eax
lea eax, [esp + 0x1394]
push 0x104
push eax
call fcn.0040995d
add esp, 0xc
lea eax, [esp + 0xb70]
push eax
lea eax, [esp + 0x1394]
push 0x104
push eax
call fcn.004098f1
add esp, 4
lea ecx, [esp + 0x1398]
call fcn.00401ea0
add esp, 8
push 0x5c2c08
test bl, bl
je 0x402aa5
push 0x422968
jmp 0x402aaa
push 0x422988
push 0x42296c
push str.config
call edi
lea eax, [esp + 0x350]
push eax
lea eax, [esp + 0xd7c]
push 0x104
push eax
call fcn.0040995d
add esp, 0xc
lea eax, [esp + 0xb70]
push eax
lea eax, [esp + 0xd7c]
push 0x104
push eax
call fcn.004098f1
xor eax, eax
mov dword [esp + 0x2d4], 0x2f0020
add esp, 0xc
mov word [esp + 0x2d8], ax
lea eax, [esp + 0x2c8]
mov dword [esp + 0x2cc], 0x6e0069
mov dword [esp + 0x2d0], 0x740069
mov dword [esp + 0x2d4], 0x630061
push eax
lea eax, [esp + 0xd7c]
push 0x104
push eax
call fcn.004098f1
add esp, 0xc
mov dword [esp + 0x10], 0x44
xor eax, eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
lea eax, [esp + 0x2b8]
push eax
lea eax, [esp + 0x14]
mov dword [esp + 0x1c], 0x422700
push eax
push 0
push 0
push 0x200
push 0
push 0
push 0
lea eax, [esp + 0xd98]
mov dword [esp + 0x3c], 0
push eax
push 0
mov dword [esp + 0x64], 1
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x402bbd
push dword [esp + 0x2bc]
call ebx
push dword [esp + 0x2b8]
call ebx
push 0x5c2c08
lea eax, [esp + 0xb74]
push eax
push str.REName
push str.config
call edi
push 0x5c2c08
lea eax, [esp + 0x159c]
push eax
push 0x42298c
push str.config
call edi
push 0x5c2c08
lea eax, [esp + 0x354]
push eax
push str.InstallPath
push str.config
call edi
sub esp, 8
call fcn.00407770
add esp, 8
mov dword [esp + 0x10], 0x44
lea eax, [esp + 0x2b8]
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0x422700
mov dword [esp + 0x1c], 0
push eax
lea eax, [esp + 0x14]
mov dword [esp + 0x40], 1
push eax
push 0
push 0
push 0x200
push 0
push 0
push 0
lea eax, [esp + 0x578]
mov dword [esp + 0x60], 5
push eax
push 0
mov dword [esp + 0x6c], 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x402c8d
push dword [esp + 0x2bc]
call ebx
push dword [esp + 0x2b8]
call ebx
test esi, esi
je 0x402c98
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x19ac]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00409818
mov esp, ebp
pop ebp
ret 0x10