joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402019
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x2c
mov eax, dword [0x42e040]
xor eax, esp
mov dword [esp + 0x24], eax
push ebx
push ebp
push esi
mov esi, dword [0x4842b8]
xor ebx, ebx
push edi
mov dword [esp + 0x14], edx
mov eax, dword [esi + 0x3c]
mov ebp, dword [eax + esi + 0x78]
add ebp, esi
mov edi, dword [ebp + 0x20]
mov eax, dword [ebp + 0x18]
add edi, esi
mov dword [esp + 0x18], eax
test eax, eax
je 0x402080
mov eax, dword [edi]
lea ecx, [esp + 0x1c]
add eax, esi
push eax
call fcn.004029ba
lea ecx, [esp + 0x1c]
call fcn.00401e49
cmp eax, dword [esp + 0x14]
je 0x402098
lea ecx, [esp + 0x1c]
add edi, 4
call fcn.00402a47
inc ebx
cmp ebx, dword [esp + 0x18]
jb 0x402050
xor edi, edi
mov ecx, dword [esp + 0x34]
lea eax, [esi + edi]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040708b
add esp, 0x2c
ret
mov edx, str.QwruxAA
call fcn.00402da7
push eax
call fcn.00403020
mov eax, dword [ebp + 0x24]
pop ecx
lea eax, [eax + ebx*2]
movzx ecx, word [eax + esi]
mov eax, dword [ebp + 0x1c]
lea eax, [eax + ecx*4]
mov edi, dword [eax + esi]
lea ecx, [esp + 0x1c]
call fcn.00402a47
jmp 0x402082
Function at 0x404fd9
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
push edi
mov edi, dword [ebp + 0xc]
test eax, eax
jg 0x404ffa
jl 0x404ff1
test edi, edi
jne 0x404ffa
xor eax, eax
xor edx, edx
jmp 0x4050bb
cmp dword [ebx + 0x38], 0
je 0x40500f
push eax
push edi
push dword [ebp + 8]
call fcn.004050c1
jmp 0x4050bb
mov eax, dword [ebx + 0x1c]
push esi
mov esi, edi
mov ecx, dword [eax]
test ecx, ecx
je 0x405056
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax]
mov dword [ebp - 4], eax
test eax, eax
je 0x405056
cmp eax, edi
jb 0x405030
mov eax, edi
mov dword [ebp - 4], edi
push eax
push ecx
push dword [ebp + 8]
call fcn.00408090
mov ecx, dword [ebp - 4]
add esp, 0xc
mov eax, dword [ebp + 8]
sub esi, ecx
add eax, ecx
mov dword [ebp - 4], eax
mov eax, dword [ebx + 0x2c]
sub dword [eax], ecx
mov eax, dword [ebx + 0x1c]
add dword [eax], ecx
jmp 0x40505c
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
cmp dword [ebx + 0x4c], 0
je 0x4050b0
mov ecx, ebx
call fcn.00404828
mov ecx, dword [ebp - 4]
mov edx, esi
mov eax, 0xfff
cmp esi, eax
jbe 0x40509b
push dword [ebx + 0x4c]
push eax
push 1
push ecx
call fcn.0040ee8b
mov ecx, dword [ebp - 4]
sub esi, eax
add ecx, eax
add esp, 0x10
mov dword [ebp - 4], ecx
mov edx, esi
cmp eax, 0xfff
jne 0x4050b0
jmp 0x40506e
test edx, edx
je 0x4050b0
push dword [ebx + 0x4c]
push esi
push 1
push ecx
call fcn.0040ee8b
add esp, 0x10
sub esi, eax
mov edx, dword [ebp + 0x10]
sub edi, esi
mov eax, edi
sbb edx, 0
pop esi
pop edi
pop ebx
leave
ret 0xc

Function at 0x407e73
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x407eb2
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x407eb2
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x407eb2
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x407eb2
cmp dword [ecx + 0x74], 0xe
jbe 0x407eb2
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x414381
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4269b8
push 0x4269b0
push str.FlsAlloc
push 0x1e
call fcn.0041426a
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4143b5
push dword [ebp + 8]
mov ecx, esi
call dword [0x423130]
call esi
jmp 0x4143bb
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x4143ff
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4269c8
push 0x4269c0
push str.FlsGetValue
push 0x20
call fcn.0041426a
mov esi, eax
add esp, 0x10
test esi, esi
je 0x414436
push dword [ebp + 8]
mov ecx, esi
call dword [0x423130]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x4171e2
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00416e84

Function at 0x4171ed
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00417013

Function at 0x4175e7
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00407fe0
mov eax, dword [0x42e040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.00415916
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x417629
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x417785
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00422570
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x483f78]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.004187b7
mov ecx, dword [esi*4 + 0x483f78]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [edi + ecx + 0x20]
jne 0x41777e
cmp eax, dword [edi + ecx + 0x24]
jne 0x41777e
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [edi + ecx + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41777e
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004187b7
add esp, 0x14
test edx, edx
jl 0x41777e
jg 0x4176f4
test eax, eax
jb 0x41777e
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x41777e
jl 0x41770e
cmp dword [ebp - 0x1008], eax
ja 0x41777e
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x41772c
test ebx, ebx
je 0x417765
cmp ecx, edi
jae 0x417765
mov al, byte [ecx]
cmp al, 0xd
jne 0x417746
lea eax, [edi - 1]
cmp ecx, eax
jae 0x417752
cmp byte [ecx + 1], 0xa
jne 0x417752
inc ecx
jmp 0x417752
movzx eax, al
movsx eax, byte [eax + 0x42e308]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x41772c
cmp edx, ebx
jne 0x41772c
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x417783
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0040708b
leave
ret
Function at 0x417c55
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x483f78]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x417c95
cmp byte [ebx], 0xa
jne 0x417c95
or byte [eax + edi + 0x28], 4
jmp 0x417c9a
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x417d98
mov al, byte [edx]
cmp al, 0x1a
je 0x417d7a
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x417cc9
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x417cee
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x417cf8
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add edx, eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov ecx, dword [ebp - 0xc]
inc esi
cmp edx, ecx
jb 0x417cab
jmp 0x417d98
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x417d75
cmp dword [ebp - 0xc], 0
je 0x417d75
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x483f78]
test byte [eax + edi + 0x28], 0x48
je 0x417d4f
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x417d3a
mov byte [esi], dl
jmp 0x417d4b
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x483f78]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x417d98
cmp byte [ebp - 1], 0xa
jne 0x417d5e
cmp esi, ebx
jne 0x417d5e
mov byte [esi], 0xa
jmp 0x417d97
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004187d5
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x417d98
mov byte [esi], 0xd
jmp 0x417d97
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x483f78]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x417d94
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x417d98
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x417da1
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x483f78]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x417de4
cmp word [esi], dx
jne 0x417de4
or byte [edi + eax + 0x28], 4
jmp 0x417de9
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x417f3c
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x417f1c
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x417e2b
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x417e61
cmp eax, edx
jae 0x417e6d
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x417e03
jmp 0x417f3c
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x417f18
cmp dword [ebp - 0x14], 0
je 0x417f18
mov eax, dword [ebx*4 + 0x483f78]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x417ef0
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x417eb9
mov word [esi], cx
jmp 0x417eec
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x483f78]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x483f78]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x483f78]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x417f3c
pop ebx
cmp word [ebp - 4], bx
jne 0x417f01
cmp esi, dword [ebp + 0xc]
jne 0x417f01
mov word [esi], bx
jmp 0x417f39
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.004187d5
add esp, 0x10
cmp word [ebp - 4], bx
je 0x417f3c
push 0xd
jmp 0x417f35
mov ecx, dword [ebx*4 + 0x483f78]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x417f33
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x417f3c
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x1010641
Capabilities:
Terminate thread

Disassembly:
push 0x28
mov eax, 0x104af46
call fcn.0102eab0
mov edi, ecx
lea ecx, [edi + 0x10]
call fcn.01014783
lea esi, [edi + 0x6c]
mov eax, dword [esi]
xor ebx, ebx
cmp eax, ebx
je 0x10106a7
mov dword [ebp - 0x18], ebx
lea eax, [ebp - 0x34]
push eax
mov ecx, edi
mov dword [ebp - 4], ebx
mov dword [ebp - 0x34], 6
call fcn.01010307
mov ecx, dword [esi]
cmp ecx, ebx
je 0x1010695
push ebx
call fcn.01011b78
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push ebx
mov ecx, esi
call fcn.0102fb18
mov ecx, dword [ebp - 0x18]
or dword [ebp - 4], 0xffffffff
cmp ecx, ebx
je 0x10106a7
push 1
call fcn.0100cec0
push ebx
add edi, 0x70
push edi
call fcn.0100d39e
call fcn.0102eb9c
ret
Function at 0x1011d6d
Capabilities:
Create thread

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push dword [ebp + 0x1c]
mov esi, ecx
push dword [ebp + 0x18]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_CreateThread]
push eax
mov ecx, esi
call fcn.01011caa
mov dword [esi], fcn.01011da7
mov eax, esi
pop esi
pop ebp
ret 0x18

Function at 0x10144a6
Capabilities:
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
xor esi, esi
push edi
xor edi, edi
mov ebx, ecx
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], esi
mov dword [ebp - 4], esi
cmp dword [ebp + 8], esi
je 0x10145ed
test dword [ebp + 8], 0xfffffff8
jne 0x10145ed
cmp dword [ebx + 0x14], esi
jne 0x10144e2
push 0x32
jmp 0x10145ef
push esi
lea eax, [ebp - 8]
push eax
push esi
push 0x2001f
push esi
push esi
push esi
push 0x100319c
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov edi, eax
cmp edi, esi
je 0x101450e
mov dword [ebp - 8], esi
jmp 0x10145f5
push esi
lea eax, [ebp - 4]
push eax
push esi
push 0x2001f
push esi
push esi
push esi
mov ecx, ebx
call fcn.010136b9
push eax
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov edi, eax
push esi
lea eax, [ebp - 8]
push eax
call fcn.01012df6
cmp edi, esi
je 0x1014545
mov dword [ebp - 4], esi
jmp 0x10145f5
test byte [ebp + 8], 1
je 0x1014568
push dword [ebx + 0xfc]
push 0x1003190
push dword [ebp - 4]
call fcn.01025c31
mov edi, eax
cmp edi, esi
jne 0x10145f5
test byte [ebp + 8], 4
je 0x10145a0
mov eax, dword [ebx + 0x30]
cmp eax, esi
je 0x10145a0
cmp dword [ebx + 0x34], 8
jb 0x1014580
mov ecx, dword [ebx + 0x20]
jmp 0x1014583
lea ecx, [ebx + 0x20]
lea eax, [eax + eax + 2]
push eax
push ecx
push 1
push esi
push 0x100317c
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
cmp edi, esi
jne 0x10145f5
test byte [ebp + 8], 2
je 0x10145e2
lea edi, [ebx + 0x124]
mov ecx, edi
call fcn.01022161
test al, al
jne 0x10145e2
mov ecx, edi
call fcn.0102216f
lea eax, [eax + eax + 2]
push eax
mov ecx, edi
call fcn.010136b9
push eax
push 1
push esi
push 0x1003170
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
cmp edi, esi
jne 0x10145f5
xor edi, edi
mov dword [ebp - 0xc], 1
jmp 0x10145f5
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
push esi
lea eax, [ebp - 8]
push eax
call fcn.01012df6
push esi
lea eax, [ebp - 4]
push eax
call fcn.01012df6
cmp dword [ebp - 0xc], esi
jne 0x1014619
cmp edi, esi
je 0x1014619
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x1017f4b
Capabilities:
Get geographical location

Disassembly:
push 0x8c
mov eax, 0x104b8b2
call fcn.0102eab0
mov ebx, dword [ebp + 0xc]
xor ecx, ecx
cmp dword [ebx + 0x18], 8
mov dword [ebp - 0x2c], ecx
lea edi, [ebx + 4]
jb 0x1017f6f
mov eax, dword [edi]
jmp 0x1017f71
mov eax, edi
mov esi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
push ecx
push ecx
push dword [ebp + 0x10]
push eax
call esi
test eax, eax
jg 0x1017fae
push 0x1003728
lea ecx, [ebp - 0x28]
call fcn.0100efcb
and dword [ebp - 4], 0
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x70]
call fcn.01011b81
push 0x104ebf0
lea eax, [ebp - 0x70]
push eax
call sub.msvcrt.dll__CxxThrowException
inc eax
push eax
lea ecx, [ebp - 0x1c]
call fcn.01017da4
xor eax, eax
mov dword [ebp - 4], 1
cmp dword [ebp - 0x18], eax
je 0x1017fce
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x18]
sar eax, 1
cmp dword [ebx + 0x18], 8
jb 0x1017fd6
mov edi, dword [edi]
push eax
push dword [ebp - 0x18]
push dword [ebp + 0x10]
push edi
call esi
test eax, eax
jg 0x1018011
push 0x10036fc
lea ecx, [ebp - 0x48]
call fcn.0100efcb
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x98]
mov byte [ebp - 4], 2
call fcn.01011bf1
push 0x104e680
lea eax, [ebp - 0x98]
jmp 0x1017fa8
push dword [ebp - 0x18]
mov ecx, dword [ebp + 8]
call fcn.01010e7e
lea ecx, [ebp - 0x1c]
call fcn.01037371
mov eax, dword [ebp + 8]
call fcn.0102eb9c
ret 0xc
Function at 0x101d41a
Capabilities:
Create process on windows
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24c
mov eax, dword [0x1054254]
xor eax, ebp
mov dword [ebp - 4], eax
and dword [ebp - 0x210], 0
push esi
mov esi, dword [ebp + 8]
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x1004c48
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x101d4fd
push 0x38
lea eax, [ebp - 0x248]
push 0
push eax
call sub.msvcrt.dll_memset
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x23c], eax
add esp, 0xc
lea eax, [ebp - 0x24c]
push eax
mov dword [ebp - 0x24c], 0x3c
mov dword [ebp - 0x230], 5
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x101d4d7
push 0
push 5
push 0x471
push esi
call dword [sym.imp.USER32.dll_PostMessageW]
mov dword [ebp - 0x210], 1
jmp 0x101d4fd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1004be8
call fcn.0101c26a
pop ecx
pop ecx
push 1
push 0xffff
push 1
push 0x837
call fcn.0101c743
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x210]
xor ecx, ebp
pop esi
call fcn.0102ea9b
leave
ret 4
Function at 0x101e6ec
Capabilities:
Shutdown system
Terminate process

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
call fcn.0102a206
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
mov dword [ebp - 4], eax
call fcn.0101318a
xor ebx, ebx
push ebx
push 0x1057cd0
call fcn.0101d1bd
push ebx
push 0x1057cb0
call fcn.0101d1bd
mov ecx, dword [0x1057cd4]
cmp ecx, ebx
je 0x101e749
cmp dword [0x1054154], 1
jne 0x101e73e
call fcn.01029ffe
mov dword [0x1057cb4], eax
mov ecx, dword [0x1057cd4]
call fcn.0102bc15
push 1
call fcn.01025b2f
cmp dword [0x1057cb4], ebx
je 0x101e780
mov ecx, dword [0x1057cd4]
cmp ecx, ebx
je 0x101e771
cmp dword [ecx + 0x14], 2
je 0x101e771
push ebx
call fcn.0102a03b
push eax
jmp 0x101e774
push 1
push ebx
call fcn.0101c8d8
mov dword [0x1057cb4], eax
jmp 0x101e7b2
cmp dword [0x1057cc4], ebx
je 0x101e7ba
push 0x1004f18
call fcn.0101c26a
pop ecx
push 0x80040002
push ebx
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x101e7b2
call esi
push eax
push 0x1004ed0
call fcn.0101c26a
pop ecx
pop ecx
cmp dword [0x1057cb4], ebx
jne 0x101e7c9
cmp byte [0x1057cc0], bl
jne 0x101e7c9
push 1
call fcn.010283e1
push ebx
mov ecx, 0x1057cd4
call fcn.0101d771
mov esi, dword [ebp + 8]
cmp esi, ebx
jge 0x101e83f
cmp dword [0x105431c], ebx
je 0x101e832
mov al, byte [0x1054320]
cmp al, 2
jae 0x101e7f0
cmp al, bl
jne 0x101e832
mov ecx, dword [0x105430c]
mov edx, 0x40000000
and ecx, edx
xor eax, eax
or eax, ecx
je 0x101e832
mov ecx, dword [0x1054314]
mov eax, ecx
and eax, edx
xor edx, edx
cmp edx, dword [0x1054310]
jne 0x101e832
cmp eax, ecx
jne 0x101e832
push esi
push 0x10018d0
push dword [0x10542f4]
push dword [0x10542f0]
call fcn.0100d347
push esi
push 0x1004e70
call fcn.0101c26a
pop ecx
pop ecx
cmp dword [0x105431c], ebx
je 0x101e895
mov al, byte [0x1054320]
cmp al, 4
jae 0x101e854
cmp al, bl
jne 0x101e895
mov ecx, dword [0x105430c]
mov edx, 0x20000000
and ecx, edx
xor eax, eax
or eax, ecx
je 0x101e895
mov ecx, dword [0x1054314]
mov eax, ecx
and eax, edx
xor edx, edx
cmp edx, dword [0x1054310]
jne 0x101e895
cmp eax, ecx
jne 0x101e895
push 0x1001930
push dword [0x10542f4]
push dword [0x10542f0]
call fcn.0101d19c
push 0x10542f0
call fcn.0101d16b
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp byte [ebp + 0xc], bl
je 0x101e8b4
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebx
leave
ret 8

Function at 0x101e946
Capabilities:
Create thread

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
xor esi, esi
push esi
push esi
push esi
push esi
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [edi + 0x30], eax
cmp eax, esi
jne 0x101e967
xor eax, eax
jmp 0x101e98d
push ebx
lea eax, [ebp - 4]
push eax
push esi
push edi
push 0x101d7c5
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ebx, eax
cmp ebx, esi
jne 0x101e98a
push dword [edi + 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
pop ebx
pop edi
pop esi
leave
ret
Function at 0x1022178
Capabilities:
Check if file exists

Disassembly:
cmp dword [ecx + 0x18], 8
jb 0x1022183
mov ecx, dword [ecx + 4]
jmp 0x1022186
add ecx, 4
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
neg eax
sbb eax, eax
neg eax
ret

Function at 0x1022221
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push 0x48
mov eax, 0x104b1fd
call fcn.0102eab0
cmp dword [ecx + 0x18], 8
jb 0x1022238
mov ecx, dword [ecx + 4]
jmp 0x102223b
add ecx, 4
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1022273
push 0x10057dc
lea ecx, [ebp - 0x28]
call fcn.0100efcb
and dword [ebp - 4], 0
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x54]
push eax
call fcn.01011df2
push 0x104e428
lea eax, [ebp - 0x54]
push eax
call sub.msvcrt.dll__CxxThrowException
call fcn.0102eb9c
ret

Function at 0x1022de8
Capabilities:
Get token membership

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x1054254]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
xor ebx, ebx
lea eax, [ebp - 0x14]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [ebp - 0xc]
push eax
mov dword [ebp - 0x10], ebx
mov byte [ebp - 0xc], bl
mov byte [ebp - 0xb], bl
mov byte [ebp - 0xa], bl
mov byte [ebp - 9], bl
mov byte [ebp - 8], bl
mov byte [ebp - 7], 5
mov dword [ebp - 0x14], ebx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
mov dword [ebp - 0x10], eax
cmp eax, ebx
je 0x1022e5d
cmp dword [ebp - 0x14], ebx
je 0x1022e5d
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x14]
push ebx
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
jne 0x1022e54
mov dword [ebp - 0x10], ebx
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x10]
xor ecx, ebp
pop ebx
call fcn.0102ea9b
leave
ret
Function at 0x10236cd
Capabilities:
Check if file exists
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x424
mov eax, dword [0x1054254]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov eax, ecx
push edi
xor edi, edi
lea esi, [eax + 0xc]
mov ebx, 0x104
mov dword [ebp - 0x424], edi
mov dword [ebp - 0x420], edi
mov dword [ebp - 0x418], edi
mov dword [ebp - 0x41c], ebx
cmp word [esi], di
jne 0x1023799
push ebx
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jne 0x1023728
xor eax, eax
jmp 0x102379b
push edi
push 0x1003ce4
lea eax, [ebp - 0x414]
push eax
push ebx
lea eax, [ebp - 0x20c]
push eax
call fcn.0100e11f
test eax, eax
jge 0x102375f
jmp 0x1023724
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x1023799
mov dword [ebp - 0x418], edi
mov dword [ebp - 0x41c], ebx
lea eax, [ebp - 0x424]
push eax
lea eax, [ebp - 0x41c]
push eax
push esi
lea eax, [ebp - 0x418]
push eax
push edi
lea eax, [ebp - 0x20c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileMUIPath]
test eax, eax
jne 0x1023748
push 0x208
push edi
push esi
call sub.msvcrt.dll_memset
add esp, 0xc
jmp 0x1023724
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0102ea9b
leave
ret