Function at 0x409e80
Capabilities:
Create process on windows
Get thread local storage value
Hide graphical window
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f051b
mov eax, dword fs:[0]
push eax
sub esp, 0x158
mov eax, dword [0x53ba20]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
push 2
mov dword [ebp - 0xfc], ebx
mov dword [ebp - 0x120], esi
mov dword [ebp - 0x108], 0
call fcn.004c8c9a
xor ecx, ecx
mov dword [ebp - 0xf4], eax
mov dword [ebp - 0xf0], eax
mov word [eax], cx
push 2
mov dword [ebp - 4], ecx
call fcn.004c8c9a
mov edi, eax
add esp, 8
xor eax, eax
mov dword [ebp - 0x10c], edi
mov word [edi], ax
mov eax, 0xdc
mov byte [ebp - 4], 1
mov word [ebp - 0xa8], ax
lea eax, [ebp - 0xec]
push eax
push 0xffffffffffffffff
push 0
call dword [sym.imp.USER32.dll_EnumDisplaySettingsW]
cmp word [ebx], 0x30
jne 0x409f3b
push 0x30
push 0x4fc6f4
push 0x4fc718
push esi
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x40a6ab
push 4
push 0x4fbe6c
push ebx
call fcn.004c928a
add esp, 0xc
mov esi, 0x4fbd20
test eax, eax
jne 0x40a040
push 0x4fc794
call fcn.004c8c20
mov ebx, eax
push 0
mov dword [ebp - 0xf8], ebx
call fcn.004c8c7f
mov ecx, dword [ebp - 0xfc]
mov edx, esi
add ecx, 8
cmovne edx, ecx
push edx
call fcn.004c8c20
push 0
mov esi, eax
call fcn.004c8c7f
test ebx, ebx
mov eax, 0x4fbd20
cmovne eax, ebx
push eax
call fcn.004c8c20
push 0
mov dword [ebp - 0xf0], eax
call fcn.004c8c7f
add esp, 0x18
lea ecx, [ebp - 0xf0]
push esi
call fcn.00405090
push esi
call fcn.004c8c7f
mov ebx, dword [ebp - 0xf0]
mov eax, 0x4fbd20
mov esi, dword [ebp - 0xf4]
test ebx, ebx
cmovne eax, ebx
push eax
call fcn.004c8c20
push esi
mov dword [ebp - 0xf4], eax
mov dword [ebp - 0xf0], eax
call fcn.004c8c7f
push ebx
call fcn.004c8c7f
push dword [ebp - 0xf8]
call fcn.004c8c7f
add esp, 0x14
push dword [0x540000]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
or eax, 0x20019
lea ecx, [ebp - 0x104]
push ecx
push eax
mov eax, dword [ebp - 0xfc]
push 0
add eax, 0xa
push eax
push dword [0x534a0c]
call fcn.00408690
mov ebx, dword [ebp - 0xf4]
add esp, 0x14
jmp 0x40a2dd
push 4
push 0x4fbe60
push ebx
call fcn.004c928a
add esp, 0xc
test eax, eax
jne 0x40a12a
push 0x4fc7bc
call fcn.004c8c20
mov ebx, eax
push 0
mov dword [ebp - 0xf8], ebx
call fcn.004c8c7f
mov ecx, dword [ebp - 0xfc]
mov edx, esi
add ecx, 8
cmovne edx, ecx
push edx
call fcn.004c8c20
push 0
mov esi, eax
call fcn.004c8c7f
test ebx, ebx
mov eax, 0x4fbd20
cmovne eax, ebx
push eax
call fcn.004c8c20
push 0
mov dword [ebp - 0xf0], eax
call fcn.004c8c7f
add esp, 0x18
lea ecx, [ebp - 0xf0]
push esi
call fcn.00405090
push esi
call fcn.004c8c7f
mov ebx, dword [ebp - 0xf0]
mov eax, 0x4fbd20
mov esi, dword [ebp - 0xf4]
test ebx, ebx
cmovne eax, ebx
push eax
call fcn.004c8c20
push esi
mov dword [ebp - 0xf4], eax
mov dword [ebp - 0xf0], eax
call fcn.004c8c7f
push ebx
call fcn.004c8c7f
push dword [ebp - 0xf8]
call fcn.004c8c7f
add esp, 0x14
lea eax, [ebp - 0x104]
push eax
mov eax, dword [ebp - 0xfc]
add eax, 0xa
push eax
push dword [0x534a10]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
mov ebx, dword [ebp - 0xf4]
jmp 0x40a2dd
push 4
push 0x4fbe80
push ebx
call fcn.004c928a
add esp, 0xc
test eax, eax
jne 0x40a1d7
push 0x4fc7e4
call fcn.004c8c20
mov esi, eax
push 0
mov dword [ebp - 0xf8], esi
call fcn.004c8c7f
lea eax, [ebx + 8]
push eax
lea eax, [ebp - 0xf8]
push eax
lea eax, [ebp - 0x100]
push eax
call fcn.00404e70
mov ebx, dword [ebp - 0xf4]
mov ecx, 0x4fbd20
mov eax, dword [eax]
test eax, eax
cmovne ecx, eax
push ecx
call fcn.004c8c20
push ebx
mov dword [ebp - 0xf4], eax
mov dword [ebp - 0xf0], eax
call fcn.004c8c7f
push dword [ebp - 0x100]
call fcn.004c8c7f
push esi
call fcn.004c8c7f
add esp, 0x24
lea eax, [ebp - 0x104]
push eax
mov eax, dword [ebp - 0xfc]
add eax, 0xa
push eax
push htons
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
mov ebx, dword [ebp - 0xf4]
jmp 0x40a2dd
push 4
push 0x4fbe54
push ebx
call fcn.004c928a
add esp, 0xc
test eax, eax
jne 0x40a250
push 0x4fc810
call fcn.004c8c20
mov esi, eax
push 0
mov dword [ebp - 0x100], esi
call fcn.004c8c7f
lea eax, [ebx + 8]
push eax
lea eax, [ebp - 0x100]
push eax
lea eax, [ebp - 0xf8]
push eax
call fcn.00404e70
add esp, 0x14
lea ecx, [ebp - 0xf0]
push eax
call fcn.00404de0
push dword [ebp - 0xf8]
call fcn.004c8c7f
push esi
call fcn.004c8c7f
add esp, 8
lea eax, [ebp - 0x104]
push eax
lea eax, [ebx + 0xa]
push eax
push SysReAllocStringLen
jmp 0x40a2cb
push 3
push 0x4fbe78
push ebx
call fcn.004c928a
add esp, 0xc
test eax, eax
jne 0x40a304
push 0x4fc838
call fcn.004c8c20
mov esi, eax
push 0
mov dword [ebp - 0x100], esi
call fcn.004c8c7f
lea eax, [ebx + 6]
push eax
lea eax, [ebp - 0x100]
push eax
lea eax, [ebp - 0xf8]
push eax
call fcn.00404e70
add esp, 0x14
lea ecx, [ebp - 0xf0]
push eax
call fcn.00404de0
push dword [ebp - 0xf8]
call fcn.004c8c7f
push esi
call fcn.004c8c7f
add esp, 8
lea eax, [ebp - 0x104]
push eax
lea eax, [ebx + 8]
push eax
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
mov ebx, dword [ebp - 0xf0]
mov dword [ebp - 0xf4], ebx
test eax, eax
je 0x40a31e
push 0x5c
push ebx
call fcn.004c5688
add eax, 2
push 0x5c
push ebx
mov dword [ebp - 0x108], eax
call fcn.004c5688
add esp, 0x10
xor ecx, ecx
mov word [eax], cx
jmp 0x40a346
push ebx
call fcn.004c8c20
push dword [ebp - 0xf4]
mov dword [ebp - 0xf0], eax
call fcn.004c8c7f
add esp, 8
push dword [ebp - 0x104]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x4fbdfc
lea ecx, [ebp - 0xf0]
call fcn.00405090
mov eax, dword [ebp - 0xf0]
mov dword [ebp - 0xf4], eax
push 0
push 0x4fc850
call dword [sym.imp.USER32.dll_FindWindowW]
mov ebx, dword [sym.imp.USER32.dll_WaitForInputIdle]
mov esi, eax
mov dword [ebp - 0xfc], esi
test esi, esi
jne 0x40a48b
mov eax, dword [0x54000c]
test eax, eax
je 0x40a387
push 0
call eax
push 0x100
push dword [0x540000]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
xor eax, eax
mov dword [ebp - 0x164], 0x44
xorps xmm0, xmm0
mov word [ebp - 0x122], ax
mov eax, 1
movlpd qword [ebp - 0x160], xmm0
mov word [ebp - 0x134], ax
lea eax, [ebp - 0x100]
push 0x4fc870
push eax
movlpd qword [ebp - 0x158], xmm0
movlpd qword [ebp - 0x150], xmm0
movlpd qword [ebp - 0x148], xmm0
movlpd qword [ebp - 0x140], xmm0
movlpd qword [ebp - 0x132], xmm0
movlpd qword [ebp - 0x12a], xmm0
mov dword [ebp - 0x138], 1
call fcn.00414b30
mov ecx, 0x4fbd20
mov esi, edi
mov eax, dword [eax]
test eax, eax
cmovne ecx, eax
push ecx
call fcn.004c8c20
mov edi, eax
push esi
mov dword [ebp - 0x10c], edi
call fcn.004c8c7f
push dword [ebp - 0x100]
call fcn.004c8c7f
push edi
call fcn.00414c30
add esp, 0x18
lea eax, [ebp - 0x11c]
push eax
lea eax, [ebp - 0x164]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x40a46e
push 0xffffffffffffffff
push dword [ebp - 0x11c]
call ebx
push dword [ebp - 0x118]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0x4fc850
call dword [sym.imp.USER32.dll_FindWindowW]
mov esi, eax
mov dword [ebp - 0xfc], esi
jmp 0x40a4af
lea eax, [ebp - 0x100]
push eax
push esi
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
push dword [ebp - 0x100]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x11c], eax
test esi, esi
jne 0x40a4d0
push 0x30
push 0x4fc6f4
push 0x4fc8a8
push dword [ebp - 0x120]
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x40a6ab
push 5
push esi
call dword [sym.imp.USER32.dll_ShowWindow]
mov edi, dword [sym.imp.USER32.dll_SetForegroundWindow]
push esi
call edi
push 0
push 0x4fc948
push 0
push esi
call dword [sym.imp.USER32.dll_FindWindowExW]
mov esi, eax
push esi
mov dword [ebp - 0xf8], esi
call edi
push esi
call dword [sym.imp.USER32.dll_SetFocus]
push 0xffffffffffffffff
push dword [ebp - 0x11c]
call ebx
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
push 0
push 0x10288
push 0x111
push dword [ebp - 0xfc]
call esi
push 0xffffffffffffffff
push dword [ebp - 0x11c]
call ebx
mov edi, dword [ebp - 0xf8]
mov dword [ebp - 0xf0], 0x1e
push 0
push 0x25
push 0x100
push edi
call esi
push 0xffffffffffffffff
push dword [ebp - 0x11c]
call ebx
sub dword [ebp - 0xf0], 1
jne 0x40a542
mov eax, dword [ebp - 0xf4]
mov edi, dword [ebp - 0x10c]
mov dword [ebp - 0xf0], eax
movzx eax, word [eax]
test ax, ax
je 0x40a5d4
mov edi, dword [ebp - 0xf8]
mov ecx, eax
cmp cx, 0x5c
jne 0x40a594
push 0
push 0x27
push 0x100
jmp 0x40a5a8
push ecx
call fcn.004c8e0d
add esp, 4
movzx eax, ax
push 0
push eax
push 0x102
push edi
call esi
push 0xffffffffffffffff
push dword [ebp - 0x11c]
call ebx
mov edx, dword [ebp - 0xf0]
add edx, 2
mov dword [ebp - 0xf0], edx
movzx eax, word [edx]
mov ecx, eax
test ax, ax
jne 0x40a583
mov edi, dword [ebp - 0x10c]
push 0xffffffffffffffff
push dword [ebp - 0x11c]
call ebx
cmp dword [ebp - 0x108], 0
je 0x40a68b
push 0
push 0x4fbf3c
push 0
push dword [ebp - 0xfc]
call dword [sym.imp.USER32.dll_FindWindowExW]
push eax
mov dword [ebp - 0xf0], eax
call dword [sym.imp.USER32.dll_SetForegroundWindow]
push dword [ebp - 0xf0]
call dword [sym.imp.USER32.dll_SetFocus]
cmp dword [ebp - 0x44], 8
jbe 0x40a62a
push 0x2ee
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push 0x24
push 0x100
push dword [ebp - 0xf0]
call esi
mov eax, dword [ebp - 0x108]
movzx eax, word [eax]
test ax, ax
je 0x40a68b
mov edi, dword [ebp - 0x108]
mov ecx, eax
push ecx
call fcn.004c8e0d
add esp, 4
movzx eax, ax
push 0
push eax
push 0x102
push dword [ebp - 0xf0]
call esi
push 0xffffffffffffffff
push dword [ebp - 0x11c]
call ebx
movzx eax, word [edi + 2]
lea edi, [edi + 2]
mov ecx, eax
test ax, ax
jne 0x40a651
mov edi, dword [ebp - 0x10c]
mov ebx, dword [ebp - 0xfc]
push ebx
call dword [sym.imp.USER32.dll_SetForegroundWindow]
push ebx
call dword [sym.imp.USER32.dll_SetFocus]
push dword [ebp - 0x11c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.004c8c7f
push dword [ebp - 0xf4]
call fcn.004c8c7f
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004c3287
mov esp, ebp
pop ebp
ret