joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1001892a
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x100189c7
push ebx
push esi
call fcn.100188f3
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.10018887
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x10018974
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x100189c6
push edi
push eax
call fcn.1001568c
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x10018994
call fcn.10015652
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x100189c5
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.10018887
add esp, 0x20
test eax, eax
jne 0x100189b3
push edi
call fcn.10015652
jmp 0x100189bb
push ebx
call fcn.10015652
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x10018c34
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x100233d0
push 0x100233c8
push str.FlsAlloc
push 0x1f
call fcn.10018b50
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10018c68
push dword [ebp + 8]
mov ecx, esi
call dword [0x100211c4]
call esi
jmp 0x10018c6e
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x10018cb2
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x100233e0
push 0x100233d8
push str.FlsGetValue
push 0x21
call fcn.10018b50
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10018ce9
push dword [ebp + 8]
mov ecx, esi
call dword [0x100211c4]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x10018cf1
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x100233e8
push 0x100233e0
push str.FlsSetValue
push 0x22
call fcn.10018b50
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10018d2b
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x100211c4]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x10020440
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x1002046d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x1002046d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x6460611d
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x41c
mov eax, dword [0x646170a0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
mov eax, dword [0x64617004]
cmp eax, 0x64617004
je 0x64606165
test dword [eax + 0x1c], 0x200
je 0x64606165
cmp byte [eax + 0x19], 4
jb 0x64606165
push dword [eax + 0x14]
mov edx, 0x64601f68
push dword [eax + 0x10]
push 0xd
pop ecx
call fcn.64604453
mov ebx, 0x208
lea eax, [ebp - 0x210]
push ebx
xor esi, esi
push esi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x418]
push ebx
push esi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x210]
mov ebx, 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x646061af
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x6460622c
lea eax, [ebp - 0x418]
push eax
push esi
push 0x64601518
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x646061a5
lea eax, [ebp - 0x418]
mov edx, ebx
push eax
mov ecx, edi
call fcn.646042d0
mov edi, eax
test edi, edi
jns 0x64606237
mov ecx, dword [0x64617004]
cmp ecx, 0x64617004
je 0x64606219
test dword [ecx + 0x1c], 0x200
je 0x64606219
cmp byte [ecx + 0x19], 2
jb 0x64606219
push edi
push 0x6460130c
push dword [ecx + 0x14]
mov edx, 0x64601f68
push dword [ecx + 0x10]
push 0xe
pop ecx
call fcn.64604495
mov eax, edi
movzx esi, di
and eax, 0x1fff0000
cmp eax, 0x70000
je 0x6460622c
mov esi, edi
test esi, esi
je 0x64606237
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 4]
xor eax, eax
test esi, esi
pop edi
sete al
xor ecx, ebp
pop esi
pop ebx
call fcn.64615dc0
leave
ret
Function at 0x6460ca65
Capabilities:
Check for time delay via gettickcount

Disassembly:
mov edi, edi
push esi
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [0x64617490]
cmp eax, 0xc8
jbe 0x6460ca9d
mov eax, dword [esi + 0x1c]
push 0
push eax
mov ecx, dword [eax]
mov esi, dword [ecx + 0x34]
mov ecx, esi
call dword [0x64618384]
call esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x64617490], eax
pop esi
ret

Function at 0x6460d7d2
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x218
mov eax, dword [0x646170a0]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
push 0x208
xor esi, esi
lea eax, [ebp - 0x214]
push esi
push eax
mov ebx, edx
mov edi, ecx
call sub.msvcrt.dll_memset
add esp, 0xc
mov eax, dword [0x64617004]
cmp eax, 0x64617004
je 0x6460d830
test byte [eax + 0x1c], 2
je 0x6460d830
cmp byte [eax + 0x19], 5
jb 0x6460d830
push dword [eax + 0x14]
mov edx, 0x646025d0
push dword [eax + 0x10]
push 0xa
pop ecx
call fcn.64604453
lea eax, [ebp - 0x214]
push eax
push esi
push esi
push edi
push esi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov edi, eax
test edi, edi
jns 0x6460d87f
mov eax, dword [0x64617004]
cmp eax, 0x64617004
je 0x6460d873
test byte [eax + 0x1c], 2
je 0x6460d873
cmp byte [eax + 0x19], 2
jb 0x6460d873
push edi
push dword [eax + 0x14]
mov edx, 0x646025d0
push dword [eax + 0x10]
push 0xb
pop ecx
call fcn.64604471
movzx eax, di
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x6460d8ce
lea eax, [ebp - 0x214]
mov edx, 0x105
push eax
mov ecx, ebx
call fcn.646042d0
mov edi, eax
test edi, edi
jns 0x6460d8cb
mov ecx, dword [0x64617004]
cmp ecx, 0x64617004
je 0x6460d873
test byte [ecx + 0x1c], 2
je 0x6460d873
cmp byte [ecx + 0x19], 2
jb 0x6460d873
movzx eax, di
mov edx, 0x646025d0
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
push 0xc
pop ecx
call fcn.64604471
jmp 0x6460d873
xor esi, esi
inc esi
mov ecx, dword [ebp - 8]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.64615dc0
leave
ret 4
Function at 0x6460d8e1
Capabilities:
Get common file path
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x63c
mov eax, dword [0x646170a0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, 0x20a
lea eax, [ebp - 0x630]
push edi
xor ebx, ebx
mov esi, ecx
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x218]
push edi
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x420]
push 0x208
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x63c], edi
test esi, esi
je 0x6460dad7
push 1
xor eax, eax
mov edx, 0x646022e0
push 1
mov ecx, 0x80000001
mov word [esi], ax
call fcn.6460f208
mov edi, eax
test edi, edi
je 0x6460dad7
lea eax, [ebp - 0x63c]
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x634]
push eax
push ebx
push 0x646023a4
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push edi
mov ebx, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x6460d9a8
cmp ebx, 2
jne 0x6460dad7
mov edi, 0x646023c0
jmp 0x6460da19
cmp dword [ebp - 0x634], 1
je 0x6460d9be
cmp dword [ebp - 0x634], 2
jne 0x6460dad7
and dword [ebp - 0x638], 0
lea eax, [ebp - 0x638]
mov ebx, 0x105
lea ecx, [ebp - 0x218]
push eax
mov edx, ebx
call fcn.6460d6b0
test eax, eax
jns 0x6460d9e6
xor ecx, ecx
jmp 0x6460d9ec
mov ecx, dword [ebp - 0x638]
lea edi, [ebp - 0x218]
test eax, eax
js 0x6460da19
push 0x5c
pop eax
cmp word [ebp + ecx*2 - 0x21a], ax
je 0x6460da19
push 0x64601328
mov edx, ebx
mov ecx, edi
call fcn.64604305
test eax, eax
js 0x6460dacd
push ecx
push 5
lea edx, [ebp - 0x630]
pop ecx
call fcn.6460d7d2
test eax, eax
jne 0x6460da44
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x646023f4
call fcn.6460eec0
pop ecx
pop ecx
jmp 0x6460dad7
lea eax, [ebp - 0x630]
mov ebx, 0x104
push eax
mov edx, ebx
mov ecx, esi
call fcn.646042d0
test eax, eax
js 0x6460dacd
push 0x5c
pop eax
cmp word [edi], ax
je 0x6460da77
push 0x64601328
mov edx, ebx
mov ecx, esi
call fcn.64604305
test eax, eax
js 0x6460dacd
push edi
mov edx, ebx
mov ecx, esi
call fcn.64604305
test eax, eax
js 0x6460dacd
lea eax, [ebp - 0x420]
push eax
push 0x64602430
push 0
push 0
push 0x8005
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathAndSubDirW]
test eax, eax
js 0x6460dacd
push 0x93d
push 0x64602468
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.SHELL32.dll_SHSetLocalizedName]
test eax, eax
js 0x6460dacd
mov ecx, esi
call fcn.6460e70f
xor eax, eax
inc eax
jmp 0x6460dad9
movzx eax, ax
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.64615dc0
leave
ret
Function at 0x6460e9cf
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebx
push esi
push edi
mov ebx, ecx
mov eax, dword [0x64617004]
mov edi, 0x64617004
mov esi, 0x64602670
cmp eax, edi
je 0x6460ea05
test byte [eax + 0x1c], 2
je 0x6460ea05
cmp byte [eax + 0x19], 5
jb 0x6460ea05
push dword [eax + 0x14]
mov edx, esi
push dword [eax + 0x10]
push 0x17
pop ecx
call fcn.64604453
push 0x25
push ebx
call dword [sym.imp.msvcrt.dll_wcschr]
pop ecx
pop ecx
test eax, eax
jne 0x6460ea53
mov ecx, ebx
call fcn.6460e5b9
test eax, eax
jne 0x6460eb33
mov eax, dword [0x64617004]
cmp eax, edi
je 0x6460eb31
test byte [eax + 0x1c], 2
je 0x6460eb31
cmp byte [eax + 0x19], 2
jb 0x6460eb31
push dword [eax + 0x14]
mov edx, esi
push dword [eax + 0x10]
push 0x18
jmp 0x6460ead9
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x6460eaa5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x64617004]
cmp ecx, edi
je 0x6460eb31
test byte [ecx + 0x1c], 2
je 0x6460eb31
cmp byte [ecx + 0x19], 2
jb 0x6460eb31
push eax
push dword [ecx + 0x14]
mov edx, 0x64602670
push dword [ecx + 0x10]
push 0x19
pop ecx
call fcn.64604471
jmp 0x6460eb31
inc esi
lea ecx, [esi + esi]
call fcn.6460cd43
mov edi, eax
test edi, edi
jne 0x6460eae1
mov eax, dword [0x64617004]
cmp eax, 0x64617004
je 0x6460eb31
test byte [eax + 0x1c], 2
je 0x6460eb31
cmp byte [eax + 0x19], 2
jb 0x6460eb31
push dword [eax + 0x14]
mov edx, 0x64602670
push dword [eax + 0x10]
push 0x1a
pop ecx
call fcn.64604453
jmp 0x6460eb31
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x6460eaf6
cmp eax, esi
ja 0x6460eaf6
mov eax, edi
jmp 0x6460eb33
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x64617004]
cmp ecx, 0x64617004
je 0x6460eb2a
test byte [ecx + 0x1c], 2
je 0x6460eb2a
cmp byte [ecx + 0x19], 2
jb 0x6460eb2a
push eax
push dword [ecx + 0x14]
mov edx, 0x64602670
push dword [ecx + 0x10]
push 0x1b
pop ecx
call fcn.64604471
mov ecx, edi
call fcn.6460cda9
xor eax, eax
pop edi
pop esi
pop ebx
ret
Function at 0x6460ec42
Capabilities:
Get hostname

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x646170a0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x28], 0x10
mov eax, dword [0x64617004]
mov ebx, 0x64617004
cmp eax, ebx
je 0x6460ec8d
test byte [eax + 0x1c], 2
je 0x6460ec8d
cmp byte [eax + 0x19], 5
jb 0x6460ec8d
push dword [eax + 0x14]
mov edx, 0x64602670
push dword [eax + 0x10]
push 0x27
pop ecx
call fcn.64604453
test esi, esi
je 0x6460ed42
mov ecx, esi
xor edx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, dx
jne 0x6460ec9c
sub ecx, edi
sar ecx, 1
je 0x6460ed42
mov ecx, esi
mov eax, 0x6460266c
mov di, word [eax]
cmp di, word [ecx]
jne 0x6460ecdc
test di, di
je 0x6460ece1
mov di, word [eax + 2]
cmp di, word [ecx + 2]
jne 0x6460ecdc
add eax, 4
add ecx, 4
test di, di
jne 0x6460ecb8
jmp 0x6460ece1
sbb edx, edx
or edx, 1
test edx, edx
je 0x6460ed42
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
test eax, eax
jne 0x6460ed2d
mov eax, dword [0x64617004]
cmp eax, ebx
je 0x6460ed3e
test byte [eax + 0x1c], 2
je 0x6460ed3e
cmp byte [eax + 0x19], 2
jb 0x6460ed3e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [0x64617004]
mov edx, 0x64602670
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x28
pop ecx
call fcn.64604471
jmp 0x6460ed3e
lea eax, [ebp - 0x24]
push esi
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x6460ed42
xor eax, eax
jmp 0x6460ed45
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.64615dc0
leave
ret

Function at 0x6460ed54
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push edi
xor edi, edi
lea eax, [ebp - 4]
push eax
push edi
lea eax, [ebp - 8]
mov dword [ebp - 8], edi
push eax
push 8
mov dword [ebp - 4], edi
mov esi, edi
mov dword [ebp - 0xc], edi
call dword [sym.imp.KERNEL32.dll_GetUserPreferredUILanguages]
test eax, eax
jne 0x6460ed8b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x6460edda
mov eax, dword [ebp - 4]
push ebx
push 2
pop ebx
test eax, eax
je 0x6460edaa
xor ecx, ecx
mul ebx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.646157dc
pop ecx
mov esi, eax
test esi, esi
je 0x6460edd9
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp - 8]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetUserPreferredUILanguages]
test eax, eax
je 0x6460edd9
cmp word [esi], di
je 0x6460edd9
push ebx
lea eax, [ebp - 0xc]
push eax
push 0x20000070
push esi
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
pop ebx
cmp dword [ebp - 0xc], 1
jne 0x6460ede3
xor edi, edi
inc edi
test esi, esi
je 0x6460edee
push esi
call sub.msvcrt.dll_free
pop ecx
mov eax, edi
pop edi
pop esi
leave
ret
Function at 0x6460ee56
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
lea eax, [ebp - 4]
push eax
push 0x20019
push 0
push 0x646024ac
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x6460ee81
xor eax, eax
leave
ret
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 4
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
push 0
push 0x64602680
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x6460eeae
cmp dword [ebp - 0x10], 4
je 0x6460eeb2
and dword [ebp - 8], 0
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 8]
leave
ret

Function at 0x6460eec0
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x804
mov eax, dword [0x646170a0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, 0x800
lea eax, [ebp - 0x804]
push edi
xor esi, esi
push esi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
cmp dword [0x64617484], esi
jne 0x6460ef0d
call fcn.6460ee56
mov dword [0x646170bc], eax
mov dword [0x64617484], 1
jmp 0x6460ef12
mov eax, dword [0x646170bc]
test eax, eax
jle 0x6460ef9a
lea eax, [ebp + 0xc]
mov edx, 0x400
push eax
push dword [ebp + 8]
lea ecx, [ebp - 0x804]
call fcn.6460edf4
test eax, eax
js 0x6460ef9a
lea ecx, [ebp - 0x804]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x6460ef3e
sub ecx, edx
mov eax, 0x3fd
sar ecx, 1
cmp ecx, eax
jb 0x6460ef58
mov ecx, eax
push 0xa
pop edx
cmp word [ebp + ecx*2 - 0x806], dx
je 0x6460ef8d
push 0xd
pop eax
mov word [ebp + ecx*2 - 0x804], ax
mov word [ebp + ecx*2 - 0x802], dx
lea ecx, [ecx*2 + 4]
cmp ecx, edi
jae 0x6460efa8
xor eax, eax
mov word [ebp + ecx - 0x804], ax
lea eax, [ebp - 0x804]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.64615dc0
leave
ret
call fcn.64615f08
int3
Function at 0x6460efae
Capabilities:
Check os version

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x12c
mov eax, dword [0x646170a0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x118
lea eax, [ebp - 0x124]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov eax, dword [0x64617004]
mov esi, 0x64617004
mov edi, 0x646026c0
push 2
pop ebx
cmp eax, esi
je 0x6460f00d
test byte [eax + 0x1c], bl
je 0x6460f00d
cmp byte [eax + 0x19], 5
jb 0x6460f00d
push dword [eax + 0x14]
mov edx, edi
push dword [eax + 0x10]
push 0xa
pop ecx
call fcn.64604453
lea eax, [ebp - 0x128]
mov dword [ebp - 0x128], 0x11c
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x6460f059
mov eax, dword [0x64617004]
cmp eax, esi
je 0x6460f0ac
test byte [eax + 0x1c], bl
je 0x6460f0ac
cmp byte [eax + 0x19], bl
jb 0x6460f0ac
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [0x64617004]
mov edx, edi
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0xc
pop ecx
call fcn.64604471
jmp 0x6460f0ac
cmp dword [ebp - 0x118], ebx
je 0x6460f07f
mov eax, dword [0x64617004]
cmp eax, esi
je 0x6460f0ac
test byte [eax + 0x1c], bl
je 0x6460f0ac
cmp byte [eax + 0x19], 3
jb 0x6460f0ac
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0xd
jmp 0x6460f0a4
cmp dword [ebp - 0x124], 5
jae 0x6460f0b0
mov eax, dword [0x64617004]
cmp eax, esi
je 0x6460f0ac
test byte [eax + 0x1c], bl
je 0x6460f0ac
cmp byte [eax + 0x19], 3
jb 0x6460f0ac
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0xe
mov edx, edi
pop ecx
call fcn.64604453
xor eax, eax
jmp 0x6460f10b
mov eax, dword [ebp - 0x10]
test al, 0x40
je 0x6460f0c9
xor eax, eax
cmp byte [ebp - 0xe], 1
setne al
dec eax
and eax, 0xffffffe0
add eax, 0x40
jmp 0x6460f10b
test eax, 0x200
je 0x6460f0d5
xor eax, eax
inc eax
jmp 0x6460f10b
test bl, al
je 0x6460f0dd
push 8
jmp 0x6460f10a
test al, al
jns 0x6460f0e5
push 0x10
jmp 0x6460f10a
test eax, 0x400
je 0x6460f0f3
mov eax, 0x80
jmp 0x6460f10b
mov cl, byte [ebp - 0xe]
cmp cl, 1
jne 0x6460f0ff
mov eax, ebx
jmp 0x6460f10b
cmp cl, 3
je 0x6460f108
cmp cl, bl
jne 0x6460f0ac
push 4
pop eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.64615dc0
leave
ret
Function at 0x6460f291
Capabilities:
Query environment variable
Query or enumerate registry value
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
mov eax, ecx
mov edi, edx
xor edx, edx
mov dword [ebp - 0x10], edi
lea ecx, [ebp - 4]
mov dword [ebp - 0xc], eax
push ecx
push edx
lea ecx, [ebp - 8]
mov esi, edx
push ecx
push edx
push dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ebx, dword [ebp + 0xc]
test eax, eax
je 0x6460f309
cmp eax, 2
jne 0x6460f301
test ebx, ebx
je 0x6460f2ee
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x6460f2d3
sub ecx, edx
sar ecx, 1
lea ecx, [ecx*2 + 2]
mov dword [ebp - 4], ecx
jmp 0x6460f315
push 2
push 0x64602798
call fcn.6460eec0
pop ecx
pop ecx
jmp 0x6460f42f
push eax
push 0x64602828
jmp 0x6460f2f5
cmp dword [ebp - 8], edi
jne 0x6460f488
mov ecx, dword [ebp - 4]
test ecx, ecx
jne 0x6460f31f
push 0x20
pop ecx
mov dword [ebp - 4], ecx
mov edi, ecx
and edi, 1
add edi, ecx
lea ecx, [edi + 2]
call fcn.6460cd43
mov esi, eax
test esi, esi
je 0x6460f42f
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp - 8]
push eax
xor eax, eax
push eax
push dword [ebp + 8]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
xor ecx, ecx
mov word [edi + esi], cx
test byte [ebp - 4], 1
je 0x6460f360
mov byte [edi + esi - 1], cl
test eax, eax
je 0x6460f3c4
cmp eax, 2
jne 0x6460f301
test ebx, ebx
je 0x6460f3b5
push ebx
lea edx, [edi + 2]
mov ecx, esi
call fcn.64605b4d
test eax, eax
jns 0x6460f387
push eax
push 0x64602868
jmp 0x6460f2f5
push dword [ebp - 4]
mov edi, dword [ebp - 0x10]
xor eax, eax
push esi
push edi
push eax
push dword [ebp + 8]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x6460f3c9
push eax
push dword [ebp + 8]
push 0x64602900
call fcn.6460eec0
add esp, 0xc
jmp 0x6460f42f
push 0x646028a8
call fcn.6460eec0
jmp 0x6460f2fb
mov edi, dword [ebp - 0x10]
jmp 0x6460f3cb
xor ecx, ecx
cmp edi, 2
jne 0x6460f40e
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov edi, eax
test edi, edi
je 0x6460f42f
lea ecx, [edi*2 + 2]
mov dword [ebp - 4], ecx
call fcn.6460cd43
mov ebx, eax
test ebx, ebx
je 0x6460f42c
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x6460f412
cmp eax, edi
jg 0x6460f412
mov ecx, esi
call fcn.6460cda9
mov esi, ebx
mov eax, esi
jmp 0x6460f48a
mov ecx, ebx
call fcn.6460cda9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x64602948
call fcn.6460eec0
pop ecx
pop ecx
mov ebx, dword [ebp + 0xc]
mov ecx, esi
call fcn.6460cda9
test ebx, ebx
je 0x6460f488
mov ecx, ebx
xor esi, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x6460f441
sub ecx, edx
sar ecx, 1
lea ecx, [ecx*2 + 2]
mov dword [ebp - 4], ecx
call fcn.6460cd43
mov esi, eax
test esi, esi
je 0x6460f488
mov edx, dword [ebp - 4]
mov ecx, esi
push ebx
call fcn.64605b4d
test eax, eax
jns 0x6460f40e
push eax
push 0x6460299c
call fcn.6460eec0
pop ecx
pop ecx
mov ecx, esi
call fcn.6460cda9
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0xc