Function at 0x10001219
Capabilities:
Create thread
Enumerate gui resources
Read file on windows
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x86c
mov eax, dword [0x101a2ce4]
xor eax, esp
mov dword [esp + 0x868], eax
cmp byte [0x101a4ae0], 0
push ebx
push esi
push edi
jne 0x100015ac
xor eax, eax
mov byte [0x101a4ae0], 1
lea edi, [esp + 0x34]
mov esi, 0x1000
stosd dword es:[edi], eax
xor ebx, ebx
push ecx
push esi
lea ecx, [esp + 0x3c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], 7
mov word [esp + 0x3c], ax
call fcn.10001674
cmp dword [esp + 0x48], 8
lea eax, [esp + 0x34]
push esi
cmovae eax, dword [esp + 0x38]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp dword [esp + 0x48], 8
lea edx, [esp + 0x34]
mov eax, dword [esp + 0x44]
cmovae edx, dword [esp + 0x34]
test eax, eax
je 0x100012c9
dec eax
or ecx, 0xffffffff
cmp eax, ecx
push 0x5c
cmovb ecx, eax
pop eax
lea esi, [edx + ecx*2]
jmp 0x100012be
cmp esi, edx
je 0x100012c9
sub esi, 2
cmp word [esi], ax
jne 0x100012b7
sub esi, edx
sar esi, 1
jmp 0x100012cc
or esi, 0xffffffff
push 1
call fcn.10169f88
pop ecx
lea ecx, [esp + 0x30]
push ecx
push ebx
push eax
push 0x10001ba0
push ebx
push ebx
call fcn.1016dad8
add esp, 0x18
mov dword [esp + 0x2c], eax
test eax, eax
je 0x100015cd
cmp dword [esp + 0x30], ebx
je 0x100015c9
call sub.KERNEL32.dll_GetCurrentThreadId
cmp dword [esp + 0x30], eax
je 0x100015c5
push ebx
push dword [esp + 0x34]
push dword [esp + 0x34]
call fcn.10169dcc
add esp, 0xc
test eax, eax
jne 0x100015c1
push 1
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
call fcn.10169f88
pop ecx
lea ecx, [esp + 0x28]
push ecx
push ebx
push eax
push 0x10001ba0
push ebx
push ebx
call fcn.1016dad8
add esp, 0x18
mov dword [esp + 0x24], eax
test eax, eax
je 0x100015dd
cmp dword [esp + 0x28], ebx
je 0x100015c9
call sub.KERNEL32.dll_GetCurrentThreadId
cmp dword [esp + 0x28], eax
je 0x100015c5
push ebx
push dword [esp + 0x2c]
push dword [esp + 0x2c]
call fcn.10169dcc
add esp, 0xc
test eax, eax
jne 0x100015c1
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
cmp dword [esp + 0x30], ebx
jne 0x100015d3
cmp dword [esp + 0x44], esi
lea edi, [esp + 0xc]
stosd dword es:[edi], eax
lea ecx, [esp + 0xc]
cmovb esi, dword [esp + 0x44]
cmp dword [esp + 0x48], 8
push esi
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [esp + 0x38]
cmovae eax, dword [esp + 0x38]
push eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
call fcn.1000187f
lea ecx, [esp + 0x34]
call fcn.10001646
push 6
pop ecx
lea esi, [esp + 0xc]
lea edi, [esp + 0x34]
rep movsd dword es:[edi], dword [esi]
push 8
pop edi
cmp dword [esp + 0x48], edi
lea eax, [esp + 0x34]
cmovae eax, dword [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push str.libcontroller.dll
call esi
mov eax, 0x7ffffffe
mov dword [esp + 0x4c], ebx
sub eax, dword [esp + 0x44]
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
cmp eax, 1
jb 0x100015d8
cmp dword [esp + 0x48], edi
lea eax, [esp + 0x34]
push 1
cmovae eax, dword [esp + 0x38]
push ecx
push dword [esp + 0x4c]
push eax
push ecx
push dword [esp + 0x40]
lea ecx, [esp + 0x24]
call fcn.10001a26
push ecx
lea edx, [esp + 0x10]
lea ecx, [esp + 0x5c]
call fcn.1000171f
pop ecx
lea ecx, [esp + 0xc]
call fcn.10001646
push ecx
lea ecx, [esp + 0x50]
call fcn.100015f3
cmp dword [esp + 0x6c], edi
lea eax, [esp + 0x58]
push 0x1019eccc
cmovae eax, dword [esp + 0x5c]
push eax
lea eax, [esp + 0x2c]
mov dword [esp + 0x2c], ebx
push eax
call fcn.1016d6f9
add esp, 0xc
push ebx
push 0xa7519
push dword [esp + 0x2c]
call fcn.1016de52
add esp, 0xc
push dword [esp + 0x24]
push 0x24c9
push 1
push dword [esp + 0x58]
call fcn.1016e0a1
cmp dword [esp + 0x58], edi
lea ecx, [esp + 0x3c]
lea eax, [esp + 0x44]
mov dword [esp + 0x3c], ebx
cmovae eax, dword [esp + 0x44]
push ecx
push eax
call fcn.100d7720
push dword [esp + 0x3c]
call fcn.1016d94c
add esp, 0x1c
push 0x1019ec64
call esi
push 0x24c9
push ebx
lea esi, [eax + 0x1000]
push esi
call fcn.1016bd70
mov edi, dword [esp + 0x58]
add esp, 0xc
movzx eax, bl
lea edx, [ebx + edi]
imul eax, eax, 0x11
mov cl, 0xc0
sub cl, al
mov eax, 0x24c9
add byte [edx], cl
inc ebx
cmp ebx, eax
jb 0x100014ff
push eax
push dword [esp + 0x50]
push esi
call fcn.1016b7f0
add esp, 0xc
xor edi, edi
push edi
push esi
call dword [sym.imp.USER32.dll_EnumWindowStationsW]
push 0x40
push 0xffffffffffffffff
lea eax, [esp + 0x478]
push eax
lea eax, [esp + 0x7c]
push eax
push 0x40
call fcn.10001be0
add esp, 0x14
lea ecx, [esp + 0x70]
mov esi, eax
call fcn.10001132
push esi
call fcn.10001f10
pop ecx
push esi
call fcn.10001c00
pop ecx
lea ecx, [esp + 0x58]
call fcn.10001646
mov ecx, dword [esp + 0x4c]
test ecx, ecx
je 0x10001590
mov eax, dword [esp + 0x54]
sub eax, ecx
push eax
push ecx
call fcn.100019a8
pop ecx
pop ecx
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], edi
mov eax, dword [esp + 0x48]
cmp eax, 8
jb 0x100015ac
lea eax, [eax*2 + 2]
push eax
push dword [esp + 0x38]
call fcn.100019a8
pop ecx
pop ecx
mov ecx, dword [esp + 0x874]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10169f7a
mov esp, ebp
pop ebp
ret
push 2
jmp 0x100015e3
push 5
jmp 0x100015e3
push 1
jmp 0x100015e3
mov dword [esp + 0x30], ebx
jmp 0x100015e1
call fcn.1016de8c
call fcn.10001127
mov dword [esp + 0x28], ebx
push 6
call fcn.10169b34
int3