joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41009c
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
mov esi, dword [esp + 0x20]
call fcn.0040efb0
mov ebx, eax
mov dword [eax + 4], esi
mov eax, dword [eax + 0xbc]
mov dword [esp], eax
call fcn.0040f96c
test byte [ebx + 0x20], 0x30
je 0x4101b4
mov eax, dword [0x41eaf8]
test eax, eax
je 0x410198
mov eax, dword [eax]
mov dword [esp], eax
call sub.KERNEL32.dll_TlsGetValue
push edx
mov ebx, eax
test eax, eax
je 0x410117
mov eax, dword [eax + 0x14]
test eax, eax
je 0x410174
mov esi, dword [ebx + 4]
mov dword [ebx + 0x70], 1
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x41010a
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
push eax
mov dword [ebx + 0x18], 0
test byte [ebx + 0x24], 4
jne 0x410128
mov dword [esp + 0x20], esi
add esp, 0x14
pop ebx
pop esi
jmp sub.msvcrt.dll__endthreadex
mov dword [ebx], 0xdeadbeef
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
push eax
mov dword [ebx + 0x14], 0
mov eax, ebx
call fcn.0040e37c
mov eax, dword [0x41eaf8]
test eax, eax
je 0x4101a8
mov dword [esp + 4], 0
mov eax, dword [eax]
mov dword [esp], eax
call sub.KERNEL32.dll_TlsSetValue
sub esp, 8
mov dword [esp + 0x20], esi
add esp, 0x14
pop ebx
pop esi
jmp sub.msvcrt.dll__endthreadex
mov dword [ebx], 0xdeadbeef
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x41018a
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
push eax
mov dword [ebx + 0x18], 0
mov esi, dword [ebx + 4]
jmp 0x410141
call fcn.0040e078
mov dword [0x41eaf8], eax
jmp 0x4100d4
call fcn.0040e078
mov dword [0x41eaf8], eax
jmp 0x410151
mov dword [esp + 4], 1
add ebx, 0x78
mov dword [esp], ebx
call sub.msvcrt.dll_longjmp
nop
Function at 0x411d70
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
xor eax, eax
mov ecx, 0xffffffff
mov edi, dword [ebp + 8]
repne scasb al, byte es:[edi]
mov edx, ecx
not edx
lea eax, [edx - 1]
mov dword [ebp - 0x20], eax
lea eax, [edx + 0xe]
mov dword [ebp - 0x24], eax
lea eax, [edx + 0x3f]
and eax, 0xfffffff0
call fcn.0040dae0
sub esp, eax
lea ebx, [esp + 0xc]
mov esi, str.gcc_shmem_tdm2
mov ecx, 0xe
mov edi, ebx
rep movsb byte es:[edi], byte [esi]
mov byte [esp + 0x1a], 0x2d
lea eax, [esp + 0x1b]
mov edi, eax
mov esi, dword [ebp + 8]
mov ecx, dword [ebp - 0x20]
rep movsb byte es:[edi], byte [esi]
lea esi, [ebx + edx + 0xf]
mov cl, 0x20
mov al, 0x61
mov edi, esi
rep stosb byte es:[edi], al
lea edi, [edx + 0x2f]
mov byte [esp + edi + 0xc], 0
mov edx, dword [ebp - 0x24]
mov byte [esp + edx + 0xc], 0
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], 0
call sub.KERNEL32.dll_CreateMutexA
sub esp, 0xc
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0x24]
mov byte [ebx + edx], 0x2d
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call sub.KERNEL32.dll_WaitForSingleObject
sub esp, 8
test eax, eax
je 0x411e20
int3
mov dword [esp], ebx
call sub.KERNEL32.dll_FindAtomA
push ecx
test ax, ax
jne 0x411eb8
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov esi, eax
mov edx, dword [ebp - 0x20]
add edx, 0x10
mov dword [ebp - 0x20], edx
mov eax, edx
add eax, ebx
mov ecx, 0x20
lea esi, [esi]
mov edx, esi
shr edx, cl
and edx, 1
je 0x411e60
mov byte [eax], 0x41
inc eax
dec ecx
jne 0x411e54
mov dword [esp], ebx
call sub.KERNEL32.dll_AddAtomA
push edx
test ax, ax
je 0x411eb4
movzx eax, ax
mov edx, dword [ebp - 0x20]
mov dword [esp], edx
mov ecx, edi
mov edx, ebx
call fcn.00411cfc
mov ebx, eax
cmp eax, esi
je 0x411ed1
mov dword [esp], esi
call fcn.0040df50
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.KERNEL32.dll_ReleaseMutex
push eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
push edx
mov eax, ebx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
int3
movzx eax, ax
mov edx, dword [ebp - 0x20]
add edx, 0x10
mov dword [esp], edx
mov ecx, edi
mov edx, ebx
call fcn.00411cfc
mov ebx, eax
jmp 0x411e92
xor eax, eax
mov edi, esi
mov ecx, dword [ebp + 0xc]
rep stosb byte es:[edi], al
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x411e92
mov dword [esp], esi
mov eax, dword [ebp + 0x10]
call eax
jmp 0x411e92
Function at 0x414590
Capabilities:
Accept command line arguments

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push esi
push ebx
push ecx
sub esp, 0x6c
call fcn.0040c810
call sub.KERNEL32.dll_GetCommandLineA
mov ebx, eax
lea eax, [ebp - 0x5c]
mov dword [esp], eax
call sub.KERNEL32.dll_GetStartupInfoA
sub esp, 4
test ebx, ebx
jne 0x4145c6
jmp 0x414605
add ebx, 1
movzx eax, byte [ebx]
cmp al, 9
je 0x4145c3
cmp al, 0x20
je 0x4145c3
cmp al, 0x22
jne 0x4145e9
jmp 0x414654
cmp al, 0x20
lea esi, [esi]
je 0x4145f0
test al, al
je 0x414605
add ebx, 1
movzx eax, byte [ebx]
cmp al, 9
jne 0x4145d7
movzx eax, byte [ebx]
cmp al, 0x20
jne 0x41466a
add ebx, 1
movzx eax, byte [ebx]
cmp al, 9
je 0x4145f7
cmp al, 0x20
je 0x4145f7
test byte [ebp - 0x30], 1
mov esi, 0xa
je 0x414614
movzx esi, word [ebp - 0x2c]
mov dword [esp], 0
call sub.KERNEL32.dll_GetModuleHandleA
sub esp, 4
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.00401e40
sub esp, 0x10
lea esp, [ebp - 0xc]
pop ecx
pop ebx
pop esi
pop ebp
lea esp, [ecx - 4]
ret
cmp al, 0x22
je 0x41465e
add ebx, 1
movzx eax, byte [ebx]
test al, al
jne 0x414650
cmp al, 0x22
sete al
movzx eax, al
add ebx, eax
jmp 0x4145f0
cmp al, 9
je 0x4145f7
jmp 0x414605
Function at 0x1014af0
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
mov eax, 0x103e0c1
call fcn.0103cb58
push ecx
push ecx
push ebx
push esi
mov esi, ecx
push edi
xor edi, edi
mov dword [ebp - 0x14], esi
mov dword [esi + 0x24], edi
mov dword [esi + 0x28], edi
mov dword [esi + 0x2c], edi
mov dword [ebp - 4], edi
lea eax, [ebp - 0xd]
push eax
lea eax, [ebp - 0xd]
push eax
lea ecx, [esi + 0x40]
call fcn.0100bdc5
xor ebx, ebx
inc ebx
mov byte [ebp - 4], bl
lea eax, [ebp - 0xd]
push eax
lea eax, [ebp - 0xd]
push eax
lea ecx, [esi + 0x50]
call fcn.0100ff14
mov byte [ebp - 4], 2
lea eax, [ebp - 0xd]
push eax
lea eax, [ebp - 0xd]
push eax
lea ecx, [esi + 0x60]
call fcn.01014a92
mov byte [ebp - 4], 3
mov dword [esi + 0x74], edi
mov dword [esi + 0x78], edi
mov dword [esi + 0x7c], edi
mov byte [ebp - 4], 4
lea eax, [esi + 0x80]
mov dword [eax + 4], edi
mov dword [eax + 8], edi
mov dword [eax + 0xc], edi
mov byte [ebp - 4], 5
lea eax, [esi + 0x90]
mov dword [eax + 4], edi
mov dword [eax + 8], edi
mov dword [eax + 0xc], edi
mov byte [ebp - 4], 6
lea eax, [ebp - 0xd]
push eax
lea eax, [ebp - 0xd]
push eax
lea ecx, [esi + 0xa0]
call fcn.0100bdc5
mov byte [ebp - 4], 7
lea eax, [ebp - 0xd]
push eax
lea eax, [ebp - 0xd]
push eax
lea ecx, [esi + 0xfc]
call fcn.0100cf6f
mov byte [ebp - 4], 8
lea eax, [esi + 0x12c]
mov dword [eax + 4], edi
mov dword [eax + 8], edi
mov dword [eax + 0xc], edi
mov byte [ebp - 4], 9
mov dword [esi], edi
mov dword [esi + 4], edi
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
mov dword [esi + 0x10], edi
mov ecx, esi
mov dword [esi + 0x14], edi
mov dword [esi + 0x18], edi
mov dword [esi + 0x1c], edi
mov dword [esi + 0x30], edi
mov dword [esi + 0x34], edi
mov dword [esi + 0x3c], edi
mov dword [esi + 0x38], ebx
mov dword [esi + 0xb4], edi
mov dword [esi + 0xb8], edi
mov dword [esi + 0xb0], 2
mov dword [esi + 0xd0], edi
mov dword [esi + 0xbc], edi
mov dword [esi + 0xcc], edi
mov dword [esi + 0xc4], edi
mov dword [esi + 0xd4], edi
mov dword [esi + 0xd8], edi
mov dword [esi + 0xdc], edi
mov dword [esi + 0xe8], edi
mov dword [esi + 0xe0], edi
mov dword [esi + 0xe4], edi
mov dword [esi + 0xec], edi
mov dword [esi + 0xf4], edi
mov dword [esi + 0xf0], 3
mov dword [esi + 0xc8], edi
mov dword [esi + 0xf8], edi
mov dword [esi + 0xc0], edi
mov dword [esi + 0x10c], ebx
mov dword [esi + 0x110], edi
mov dword [esi + 0x114], edi
mov dword [esi + 0x118], edi
mov dword [esi + 0x11c], edi
mov dword [esi + 0x120], edi
mov dword [esi + 0x124], edi
mov dword [esi + 0x128], edi
mov dword [esi + 0x13c], edi
mov dword [esi + 0x140], edi
mov dword [esi + 0x144], edi
mov dword [esi + 0x148], edi
mov dword [esi + 0x14c], edi
call fcn.01014299
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0xc]
pop edi
mov eax, esi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x1014afd
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
mov eax, 0x103e0c1
call fcn.0103cb58
push ecx
push ecx
push ebx
push esi
mov esi, ecx
push edi
xor edi, edi
mov dword [ebp - 0x14], esi
mov dword [esi + 0x24], edi
mov dword [esi + 0x28], edi
mov dword [esi + 0x2c], edi
mov dword [ebp - 4], edi
lea eax, [ebp - 0xd]
push eax
lea eax, [ebp - 0xd]
push eax
lea ecx, [esi + 0x40]
call fcn.0100bdc5
xor ebx, ebx
inc ebx
mov byte [ebp - 4], bl
lea eax, [ebp - 0xd]
push eax
lea eax, [ebp - 0xd]
push eax
lea ecx, [esi + 0x50]
call fcn.0100ff14
mov byte [ebp - 4], 2
lea eax, [ebp - 0xd]
push eax
lea eax, [ebp - 0xd]
push eax
lea ecx, [esi + 0x60]
call fcn.01014a92
mov byte [ebp - 4], 3
mov dword [esi + 0x74], edi
mov dword [esi + 0x78], edi
mov dword [esi + 0x7c], edi
mov byte [ebp - 4], 4
lea eax, [esi + 0x80]
mov dword [eax + 4], edi
mov dword [eax + 8], edi
mov dword [eax + 0xc], edi
mov byte [ebp - 4], 5
lea eax, [esi + 0x90]
mov dword [eax + 4], edi
mov dword [eax + 8], edi
mov dword [eax + 0xc], edi
mov byte [ebp - 4], 6
lea eax, [ebp - 0xd]
push eax
lea eax, [ebp - 0xd]
push eax
lea ecx, [esi + 0xa0]
call fcn.0100bdc5
mov byte [ebp - 4], 7
lea eax, [ebp - 0xd]
push eax
lea eax, [ebp - 0xd]
push eax
lea ecx, [esi + 0xfc]
call fcn.0100cf6f
mov byte [ebp - 4], 8
lea eax, [esi + 0x12c]
mov dword [eax + 4], edi
mov dword [eax + 8], edi
mov dword [eax + 0xc], edi
mov byte [ebp - 4], 9
mov dword [esi], edi
mov dword [esi + 4], edi
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
mov dword [esi + 0x10], edi
mov ecx, esi
mov dword [esi + 0x14], edi
mov dword [esi + 0x18], edi
mov dword [esi + 0x1c], edi
mov dword [esi + 0x30], edi
mov dword [esi + 0x34], edi
mov dword [esi + 0x3c], edi
mov dword [esi + 0x38], ebx
mov dword [esi + 0xb4], edi
mov dword [esi + 0xb8], edi
mov dword [esi + 0xb0], 2
mov dword [esi + 0xd0], edi
mov dword [esi + 0xbc], edi
mov dword [esi + 0xcc], edi
mov dword [esi + 0xc4], edi
mov dword [esi + 0xd4], edi
mov dword [esi + 0xd8], edi
mov dword [esi + 0xdc], edi
mov dword [esi + 0xe8], edi
mov dword [esi + 0xe0], edi
mov dword [esi + 0xe4], edi
mov dword [esi + 0xec], edi
mov dword [esi + 0xf4], edi
mov dword [esi + 0xf0], 3
mov dword [esi + 0xc8], edi
mov dword [esi + 0xf8], edi
mov dword [esi + 0xc0], edi
mov dword [esi + 0x10c], ebx
mov dword [esi + 0x110], edi
mov dword [esi + 0x114], edi
mov dword [esi + 0x118], edi
mov dword [esi + 0x11c], edi
mov dword [esi + 0x120], edi
mov dword [esi + 0x124], edi
mov dword [esi + 0x128], edi
mov dword [esi + 0x13c], edi
mov dword [esi + 0x140], edi
mov dword [esi + 0x144], edi
mov dword [esi + 0x148], edi
mov dword [esi + 0x14c], edi
call fcn.01014299
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0xc]
pop edi
mov eax, esi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x10275eb
Capabilities:
Identify system language via api

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [0x104a0fc]
push ebx
push esi
xor ebx, ebx
push edi
mov edi, dword [ebp + 8]
inc ebx
test edi, edi
mov dword [ebp - 4], eax
mov esi, ecx
mov dword [ebp - 0x48], ebx
je 0x10276e7
push 0x1002868
push edi
call fcn.010311c6
test eax, eax
jne 0x102766e
push edi
push dword [esi + 0x48]
call fcn.010311c6
test eax, eax
jne 0x10276e7
mov eax, dword [esi + 0x48]
test eax, eax
je 0x1027643
push eax
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
and dword [esi + 0x48], 0
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
test eax, eax
pop ecx
mov dword [esi + 0x48], eax
je 0x10276e3
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
or dword [esi + 0x70], 0x10
jmp 0x10276d8
and dword [ebp - 0x44], 0
push 0xf
pop ecx
xor eax, eax
lea edi, [ebp - 0x40]
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultUILanguage]
movzx eax, ax
push eax
lea eax, [ebp - 0x44]
push 0x1005394
push eax
call dword [sym.imp.msvcrt.dll_swprintf]
add esp, 0xc
lea eax, [ebp - 0x44]
push eax
push dword [esi + 0x48]
call fcn.010311c6
test eax, eax
jne 0x10276e7
mov eax, dword [esi + 0x48]
test eax, eax
je 0x10276ba
push eax
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
and dword [esi + 0x48], 0
pop ecx
push 0x40
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
test eax, eax
pop ecx
mov dword [esi + 0x48], eax
je 0x10276e3
and dword [esi + 0x70], 0xffffffef
lea ecx, [ebp - 0x44]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov dword [esi + 0x7c], ebx
mov dword [esi + 0x74], ebx
mov dword [esi + 0x78], ebx
jmp 0x10276e7
and dword [ebp - 0x48], 0
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x48]
pop edi
pop esi
pop ebx
call fcn.0103c70f
leave
ret 4
Function at 0x102a4e8
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push ebx
push esi
push edi
push 1
mov dword [ebp - 8], eax
call fcn.01029ed9
mov ecx, eax
call fcn.01027c31
mov esi, dword [sym.imp.msvcrt.dll__wfopen]
mov edi, dword [sym.imp.msvcrt.dll_fclose]
mov ebx, eax
test ebx, ebx
je 0x102a599
call fcn.01034c83
cmp eax, 1
jne 0x102a599
push 0x10054fc
push ebx
call esi
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0xc], eax
je 0x102a556
push eax
push 1
lea eax, [ebp - 4]
push 2
push eax
mov byte [ebp - 4], 0xff
mov byte [ebp - 3], 0xfe
call dword [sym.imp.msvcrt.dll_fwrite]
push dword [ebp - 0xc]
call edi
add esp, 0x14
push 0x10054f4
push ebx
call esi
test eax, eax
pop ecx
pop ecx
mov ecx, dword [ebp + 8]
jne 0x102a57e
push 0xac6e
call fcn.01029ed1
mov ecx, eax
call fcn.010127f6
and dword [ebp - 8], 0
jmp 0x102a58d
push 1
push eax
call fcn.01029ed9
mov ecx, eax
call fcn.01027c53
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0xc]
jne 0x102a67b
cmp dword [ebp + 0x10], 0
jne 0x102a67b
mov ecx, dword [ebp + 8]
push 0
call fcn.01029ed9
mov ecx, eax
call fcn.01027c31
test eax, eax
mov dword [ebp + 0x10], eax
je 0x102a67b
call fcn.01034cea
cmp eax, 1
jne 0x102a67b
push 0x10054f0
push dword [ebp + 0x10]
call esi
mov ebx, eax
test ebx, ebx
pop ecx
pop ecx
je 0x102a601
push ebx
call fcn.010314ef
mov ecx, dword [ebp + 8]
push eax
call fcn.01029ed9
mov ecx, eax
call fcn.01027b4e
push ebx
call edi
mov dword [esp], 0x10054f4
jmp 0x102a647
push 0x10054fc
push dword [ebp + 0x10]
call esi
mov ebx, eax
test ebx, ebx
pop ecx
pop ecx
je 0x102a642
push ebx
push 1
lea eax, [ebp + 0xe]
push 2
push eax
mov byte [ebp + 0xe], 0xff
mov byte [ebp + 0xf], 0xfe
call dword [sym.imp.msvcrt.dll_fwrite]
mov ecx, dword [ebp + 8]
add esp, 0x10
push 1
call fcn.01029ed9
mov ecx, eax
call fcn.01027b4e
push ebx
call edi
pop ecx
push 0x10054f4
push dword [ebp + 0x10]
call esi
test eax, eax
pop ecx
pop ecx
mov ecx, dword [ebp + 8]
jne 0x102a66c
push 0xac6d
call fcn.01029ed1
mov ecx, eax
call fcn.010127f6
and dword [ebp - 8], 0
jmp 0x102a67b
push 0
push eax
call fcn.01029ed9
mov ecx, eax
call fcn.01027c53
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret 0xc

Function at 0x10314ef
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
push dword [ebp + 8]
xor eax, eax
mov byte [ebp - 4], 0
lea edi, [ebp - 3]
push 1
stosb byte es:[edi], al
lea eax, [ebp - 4]
push 2
push eax
xor esi, esi
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
test eax, eax
je 0x1031565
lea ecx, [ebp - 4]
mov cx, word [ecx]
mov eax, 0x1005904
cmp cx, word [eax]
jne 0x103152e
inc esi
jmp 0x1031555
lea ecx, [ebp - 4]
mov cx, word [ecx]
mov eax, 0x1005900
cmp cx, word [eax]
jne 0x1031542
push 2
jmp 0x1031554
lea ecx, [ebp - 4]
mov cx, word [ecx]
mov eax, 0x10058fc
cmp cx, word [eax]
jne 0x1031555
push 3
pop esi
push 0
push 0
push dword [ebp + 8]
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0xc
pop edi
mov eax, esi
pop esi
leave
ret 4
Function at 0x10319b7
Capabilities:
Manipulate console buffer

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
and dword [ebp - 4], 0
push edi
push 0x800
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
mov edi, eax
test edi, edi
pop ecx
mov dword [ebp - 8], edi
je 0x1031a7f
push ebx
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebx, eax
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
mov edx, dword [ebp + 8]
movsx ecx, word [edx + 6]
movsx eax, word [ebp - 0x1a]
sub eax, ecx
movsx ecx, word [ebp - 0xe]
imul eax, ecx
movsx ecx, word [edx + 4]
sub eax, ecx
movsx ecx, word [ebp - 0x1c]
add eax, ecx
mov ecx, 0x400
cmp eax, ecx
mov dword [ebp - 4], eax
jbe 0x1031a23
mov eax, ecx
mov dword [ebp - 4], eax
mov ecx, eax
xor eax, eax
cmp ebx, 0xffffffff
rep stosw word es:[edi], ax
je 0x1031a3b
movsx eax, word [edx + 0x10]
movsx ecx, word [edx + 0xc]
sub eax, ecx
jmp 0x1031a3d
xor eax, eax
test eax, eax
jle 0x1031a75
mov ax, word [edx + 6]
and word [ebp + 8], 0
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
mov word [ebp + 0xa], ax
push dword [ebp + 8]
push ebx
call esi
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push dword [ebp - 8]
push ebx
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
push dword [ebp + 8]
push ebx
call esi
pop esi
push dword [ebp - 8]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
pop ebx
pop edi
leave
ret 4

Function at 0x103208f
Capabilities:
Get token privileges

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
lea eax, [ebp - 4]
push eax
xor ebx, ebx
push 0x28
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x1032166
cmp dword [ebp + 8], ebx
jne 0x10320de
push ebx
push ebx
push ebx
push ebx
push 1
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x103215b
mov ebx, 0x80041003
jmp 0x103215b
push esi
push edi
xor eax, eax
lea edi, [ebp - 0x10]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov edi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea eax, [ebp - 8]
push eax
push 8
lea eax, [ebp - 0x10]
push eax
push 3
push dword [ebp - 4]
call edi
push dword [ebp - 8]
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
cmp esi, ebx
pop ecx
je 0x1032154
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push esi
push 3
push dword [ebp - 4]
call edi
test eax, eax
je 0x1032146
xor ecx, ecx
cmp dword [esi], ebx
jbe 0x1032134
lea eax, [esi + 0xc]
or dword [eax], 2
inc ecx
add eax, 0xc
cmp ecx, dword [esi]
jb 0x1032129
push ebx
push ebx
push ebx
push esi
push ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x103214b
mov ebx, 0x80041003
push esi
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
jmp 0x1032159
mov ebx, 0x80041006
pop edi
pop esi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x103216b
mov ebx, 0x80041003
mov eax, ebx
pop ebx
leave
ret 4
Function at 0x1035a56
Capabilities:
Create thread

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push edi
xor esi, esi
push esi
push esi
push esi
push esi
mov dword [ebp - 8], esi
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [ebp - 4], eax
lea eax, [ebp - 8]
push eax
push esi
lea eax, [ebp - 4]
push eax
push 0x1035a1c
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
push dword [ebp + 8]
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, eax
push edi
call esi
cmp eax, 0x102
jne 0x1035aaa
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0xffffffffffffffff
push edi
call esi
push dword [ebp - 4]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push edi
call esi
pop edi
pop esi
leave
ret 4

Function at 0x1035b74
Capabilities:
Set registry value

Disassembly:
mov eax, 0x1040509
call fcn.0103cb58
sub esp, 0x128
mov eax, dword [0x104a0fc]
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x128], ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x12c], eax
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x118], 1
xor esi, esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x114], esi
push 0x3f
pop ecx
xor eax, eax
lea edi, [ebp - 0x110]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x124], esi
cmp esi, dword [ebp + 0x10]
jae 0x1035c39
cmp dword [ebp - 0x118], 0
je 0x1035c39
push 0xa
lea eax, [ebp - 0x114]
push eax
push dword [ebx + esi*8 + 4]
push dword [ebx + esi*8]
call dword [sym.imp.msvcrt.dll__i64tow]
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.msvcrt.dll_wcslen]
add esp, 0x14
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x114]
push eax
push 1
push 0
mov eax, dword [ebp - 0x12c]
push dword [eax + esi*4]
mov eax, dword [ebp - 0x128]
push dword [eax + 0x3e4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x1035c36
and dword [ebp - 0x118], 0
inc esi
jmp 0x1035bc6
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x118]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x14]
call fcn.0103c70f
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x1035c98
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x54
mov eax, dword [0x104a0fc]
push ebx
push esi
push edi
push 0xf
xor esi, esi
mov ebx, ecx
pop ecx
mov dword [ebp - 4], eax
xor eax, eax
mov dword [ebp - 0x44], esi
lea edi, [ebp - 0x40]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
lea ecx, [ebp - 0x54]
push ecx
lea eax, [ebx + 0x3e4]
push eax
push esi
push 0xf003f
push esi
push 0x1004a18
push esi
push 0x1005d78
push 0x80000002
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x50], eax
call edi
cmp eax, esi
jne 0x1035e20
push 0x1005d70
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push esi
add ebx, 0x3e8
push ebx
push esi
push 0xf003f
push esi
push 0x1004a18
push esi
push 0x1005d78
push 0x80000001
mov dword [ebp - 0x4c], esi
call edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
xor eax, eax
inc eax
cmp dword [ebp - 0x54], eax
jne 0x1035d7c
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
push eax
lea eax, [ebp - 0x44]
push eax
mov eax, dword [ebp - 0x50]
push 1
push esi
push 0x1005d54
push dword [eax]
call edi
cmp eax, esi
jne 0x1035e20
push 4
lea eax, [ebp - 0x4c]
push eax
push 4
push esi
push 0x1005d44
push dword [ebx]
call edi
cmp eax, esi
jne 0x1035e20
mov eax, dword [ebp - 0x50]
push esi
push esi
push esi
push esi
push 0x1005d54
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, 2
jne 0x1035db8
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
push eax
lea eax, [ebp - 0x44]
push eax
mov eax, dword [ebp - 0x50]
push 1
push esi
push 0x1005d54
push dword [eax]
call edi
cmp eax, esi
jne 0x1035e20
push esi
push esi
push esi
push esi
push 0x1005d44
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, 2
jne 0x1035de4
push 4
lea eax, [ebp - 0x4c]
push eax
push 4
push esi
push 0x1005d44
push dword [ebx]
call edi
cmp eax, esi
jne 0x1035e20
push esi
push esi
push esi
push esi
push 0x1005d20
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, 2
jne 0x1035e10
push 4
lea eax, [ebp - 0x4c]
push eax
push 4
push esi
push 0x1005d20
push dword [ebx]
call edi
cmp eax, esi
jne 0x1035e20
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x48]
pop edi
pop esi
pop ebx
call fcn.0103c70f
leave
ret
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x48], eax
push 0x1042d04
lea eax, [ebp - 0x48]
push eax
call sub.msvcrt.dll__CxxThrowException
int3