Function at 0xa6d190
Capabilities:
Check os version
Create thread
Resume thread
Set environment variable
Suspend thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0xb13f78
mov eax, dword fs:[0]
push eax
sub esp, 0x13c
mov eax, dword [0xb37f34]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 3
push 0
call fcn.00aaab20
add esp, 8
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x40], eax
push str.SetProcessShutdownParameters
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
je 0xa6d1f8
push 1
push 0x100
call dword [ebp - 0x38]
mov dword [ebp - 0xfc], 0x94
lea ecx, [ebp - 0xfc]
push ecx
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0xec], 2
jne 0xa6d221
mov byte [0xb52c4d], 1
jmp 0xa6d23d
cmp dword [ebp - 0xf8], 4
jne 0xa6d238
cmp dword [ebp - 0xf4], 0x5a
jb 0xa6d238
call fcn.00a6ddc0
call fcn.00a6dea0
movzx edx, byte [0xb52c4d]
test edx, edx
jne 0xa6d24e
cli
not esp
not esp
sti
mov eax, dword [0xb52c98]
mov ecx, dword [0xb52c98]
mov edx, dword [eax + 0x34]
xor edx, dword [ecx + 0x2c]
mov eax, dword [0xb52c98]
xor edx, dword [eax + 0x88]
and edx, 4
je 0xa6d276
mov byte [0xb52c49], 1
mov ecx, dword [0xb52c98]
mov edx, dword [0xb52c98]
mov eax, dword [ecx + 0x34]
xor eax, dword [edx + 0x2c]
mov ecx, dword [0xb52c98]
xor eax, dword [ecx + 0x88]
and eax, 0x200
je 0xa6d2a2
mov byte [0xb52c4b], 1
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edx, dword [0xb52c98]
mov ecx, dword [0xb52c98]
mov edx, dword [edx + 0x18]
xor edx, dword [ecx + 0x2c]
mov ecx, dword [0xb52c98]
xor edx, dword [ecx + 0x80]
add eax, edx
mov dword [0xb52c58], eax
mov edx, dword [0xb52c98]
mov eax, dword [0xb52c98]
mov ecx, dword [edx + 0x1c]
xor ecx, dword [eax + 0x40]
mov edx, dword [0xb52c98]
xor ecx, dword [edx + 0x88]
add ecx, 0xfff
shr ecx, 0xc
mov dword [0xb52c6c], ecx
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x30], 0xffffffff
push 0
call fcn.00a721e0
add esp, 4
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor esi, eax
mov eax, dword [0xb52c98]
xor esi, dword [eax + 0x80]
push esi
lea ecx, [ebp - 0x118]
call fcn.00a6a610
lea ecx, [ebp - 0x118]
call fcn.00a6aa90
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x114], 0xc
mov dword [ebp - 0x110], 0
mov dword [ebp - 0x10c], 1
push 0
push 0x1000
push 0
push 4
lea ecx, [ebp - 0x114]
push ecx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
jne 0xa6d38a
xor al, al
jmp 0xa6d8fe
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [ebp - 0x104], eax
mov dword [ebp - 0x108], 0
push 2
push 1
push 0
lea edx, [ebp - 0x108]
push edx
mov eax, dword [ebp - 0x104]
push eax
mov ecx, dword [ebp - 0x104]
push ecx
mov edx, dword [ebp - 0x104]
push edx
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
push 0x1000
push 0
push 0
push 2
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [0xb52c68], eax
movzx ecx, byte [0xb52de0]
test ecx, ecx
je 0xa6d400
lea ecx, [ebp - 0x118]
call fcn.00a6aa90
mov dword [ebp - 0x140], eax
jmp 0xa6d409
mov edx, dword [ebp - 0x5c]
mov dword [ebp - 0x140], edx
mov eax, dword [0xb52c98]
mov ecx, dword [ebp - 0x140]
xor ecx, dword [eax + 0x40]
mov edx, dword [0xb52c98]
xor ecx, dword [edx + 0x84]
mov eax, dword [0xb52c98]
xor ecx, dword [eax + 0xc]
mov edx, dword [0xb52c98]
xor ecx, dword [edx + 0x64]
mov eax, dword [0xb52c98]
xor ecx, dword [eax + 0x5c]
mov edx, dword [0xb52c68]
mov dword [edx], ecx
mov eax, dword [0xb52c68]
mov ecx, dword [ebp - 0x108]
mov dword [eax + 4], ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edx, dword [0xb52c68]
mov dword [edx + 8], eax
mov eax, dword [0xb52c68]
mov dword [eax + 0x20], 0
mov ecx, dword [0xb52c68]
add ecx, 0xe00
mov dword [0xb52c88], ecx
mov edx, dword [0xb52c88]
mov byte [edx], 0
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x124], eax
lea ecx, [ebp - 0x124]
push ecx
lea edx, [ebp - 0x2c]
push edx
call fcn.00a6f710
add esp, 8
mov dword [ebp - 0x144], eax
mov eax, dword [ebp - 0x144]
mov dword [ebp - 0x148], eax
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x148]
call fcn.00a7ad70
push eax
push 0xb3a89c
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00a663e0
xor ecx, ecx
mov eax, dword [0xb52c6c]
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00ac4cec
add esp, 4
mov dword [ebp - 0x128], eax
mov eax, dword [ebp - 0x128]
mov dword [0xb52c74], eax
mov eax, dword [0xb52c6c]
shl eax, 4
xor ecx, ecx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00ac4cec
add esp, 4
mov dword [ebp - 0x12c], eax
mov eax, dword [ebp - 0x12c]
mov dword [0xb52c54], eax
xor ecx, ecx
mov eax, dword [0xb52c6c]
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00ac4cec
add esp, 4
mov dword [ebp - 0x130], eax
mov eax, dword [ebp - 0x130]
mov dword [0xb52c78], eax
xor ecx, ecx
mov eax, dword [0xb52c6c]
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00ac4cec
add esp, 4
mov dword [ebp - 0x134], eax
mov eax, dword [ebp - 0x134]
mov dword [0xb52c7c], eax
push 0x1000
call fcn.00ac4cec
add esp, 4
mov dword [ebp - 0x138], eax
mov ecx, dword [ebp - 0x138]
mov dword [0xb52c80], ecx
xor ecx, ecx
mov eax, dword [0xb52c6c]
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00ac4cec
add esp, 4
mov dword [ebp - 0x13c], eax
mov eax, dword [ebp - 0x13c]
mov dword [0xb52c50], eax
mov ecx, dword [0xb52c98]
mov edx, dword [ecx + 0x84]
xor edx, dword [ebp - 0x5c]
push edx
lea ecx, [ebp - 0x4c]
call fcn.00a6a610
mov dword [ebp - 0x11c], 0
jmp 0xa6d623
mov eax, dword [ebp - 0x11c]
add eax, 1
mov dword [ebp - 0x11c], eax
mov ecx, dword [0xb52c6c]
shl ecx, 4
cmp dword [ebp - 0x11c], ecx
jge 0xa6d67d
lea ecx, [ebp - 0x4c]
call fcn.00a6aa90
mov edx, dword [0xb52c98]
xor eax, dword [edx + 0x40]
mov ecx, dword [0xb52c98]
xor eax, dword [ecx + 0x84]
mov edx, dword [0xb52c98]
xor eax, dword [edx + 0xc]
mov ecx, dword [0xb52c98]
xor eax, dword [ecx + 0x64]
mov edx, dword [0xb52c98]
xor eax, dword [edx + 0x5c]
mov ecx, dword [ebp - 0x11c]
mov edx, dword [0xb52c54]
mov dword [edx + ecx*4], eax
jmp 0xa6d614
mov dword [ebp - 0x120], 0
jmp 0xa6d698
mov eax, dword [ebp - 0x120]
add eax, 1
mov dword [ebp - 0x120], eax
mov ecx, dword [ebp - 0x120]
cmp ecx, dword [0xb52c6c]
jge 0xa6d6f2
mov edx, dword [ebp - 0x120]
mov eax, dword [0xb52c74]
mov dword [eax + edx*4], 0xffffffff
mov ecx, dword [ebp - 0x120]
mov edx, dword [0xb52c78]
mov dword [edx + ecx*4], 0
mov eax, dword [ebp - 0x120]
mov ecx, dword [0xb52c7c]
mov dword [ecx + eax*4], 0xffffffff
mov edx, dword [ebp - 0x120]
mov eax, dword [0xb52c50]
mov dword [eax + edx*4], 0
jmp 0xa6d689
mov ecx, dword [0xb52c6c]
sar ecx, 1
add ecx, 1
mov dword [0xb369d8], ecx
movzx edx, byte [0xb52c4a]
test edx, edx
jne 0xa6d723
cmp dword [0xb369d8], 6
jae 0xa6d721
mov dword [0xb369d8], 6
jmp 0xa6d736
cmp dword [0xb369d8], 0x12
jae 0xa6d736
mov dword [0xb369d8], 0x12
push str.Kernel32
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x60], eax
push 0xb3a87c
mov eax, dword [ebp - 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x48], eax
push 0xb3a868
mov ecx, dword [ebp - 0x60]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x50], eax
mov edx, dword [0xb52c98]
mov eax, dword [0xb52c98]
mov ecx, dword [edx]
xor ecx, dword [eax + 0x2c]
mov edx, dword [0xb52c98]
xor ecx, dword [edx + 0x88]
and ecx, 2
je 0xa6d78e
call fcn.00aa8560
movzx eax, byte [ebp + 8]
push eax
call fcn.00a6daa0
add esp, 4
movzx ecx, al
test ecx, ecx
jne 0xa6d7a9
xor al, al
jmp 0xa6d8fe
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0x100], eax
mov edx, dword [ebp - 0x100]
mov eax, dword [ebp - 0x100]
add eax, dword [edx + 0x3c]
mov dword [ebp - 0x58], eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ecx, dword [ebp - 0x58]
add eax, dword [ecx + 0x28]
mov dword [ebp - 0x34], eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edx, dword [ebp - 0x58]
sub eax, dword [edx + 0x34]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x34]
push eax
push 1
mov ecx, dword [0xb369d0]
push ecx
call fcn.00a6d920
add esp, 0xc
mov edx, dword [ebp - 0x34]
push edx
mov eax, dword [0xb369d0]
push eax
call fcn.00a6da00
add esp, 8
mov ecx, dword [0xb369d0]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, dword [0xb369d0]
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_DebugActiveProcess]
mov dword [ebp - 0x54], eax
mov edx, dword [0xb369d0]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_SuspendThread]
mov ecx, dword [ebp - 0x34]
push ecx
push 0
mov edx, dword [0xb369d0]
push edx
call fcn.00a6d920
add esp, 0xc
mov eax, dword [0xb369d0]
mov ecx, dword [eax + 4]
push ecx
mov edx, dword [0xb369d0]
mov eax, dword [edx + 0xc]
push eax
call fcn.00a6cee0
add esp, 8
mov dword [ebp - 0x3c], 0
lea ecx, [ebp - 0x3c]
push ecx
push 0
mov edx, dword [0xb369d0]
mov eax, dword [edx]
push eax
push 0xa6a1f0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
movzx ecx, byte [ebp + 8]
test ecx, ecx
je 0xa6d8ae
call dword [sym.imp.KERNEL32.dll_FreeConsole]
push 0xb52c1c
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea edx, [ebp - 0x4c]
push edx
mov eax, dword [ebp - 0x44]
push eax
call fcn.00a6ac70
add esp, 8
movzx ecx, al
test ecx, ecx
jne 0xa6d8d4
xor al, al
jmp 0xa6d8fe
mov edx, dword [0xb52c68]
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [0xb52c68], 0
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x30], 0xffffffff
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00ad1fa3
mov esp, ebp
pop ebp
ret