joyce8/EMBER2024-capa huggingface dataset:
Function at 0x451300
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c81f5
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x519100]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov ebx, dword [ebp + 8]
mov eax, dword [edi + 0x88]
cmp dword [ebx], eax
jl 0x451462
call fcn.00451ab0
sub esp, 8
mov ecx, ebx
mov eax, esp
mov dword [eax], 0x5041b4
mov dword [eax + 4], 2
lea eax, [ebp - 0x38]
push eax
call fcn.00455990
xorps xmm0, xmm0
mov dword [ebp - 4], 0
lea esi, [edi + 0x44]
movlpd qword [ebp - 0x1c], xmm0
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0x60]
test eax, eax
je 0x451384
lock inc dword [eax + 4]
mov eax, dword [edi + 0x5c]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x1c], eax
mov eax, dword [edi + 0x60]
push esi
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x38]
cmp dword [ebp - 0x24], 0xf
mov eax, dword [ebp - 0x3c]
cmova ecx, dword [ebp - 0x38]
mov dword [ebp - 0x20], 0
test eax, eax
je 0x4513bb
mov eax, dword [eax]
jmp 0x4513be
or eax, 0xffffffff
push 0
lea edx, [ebp - 0x20]
push edx
push dword [ebp - 0x28]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x451480
mov eax, dword [edi + 0x8c]
cmp dword [ebx], eax
jl 0x4513f6
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x4513ec
mov eax, dword [eax]
jmp 0x4513ef
or eax, 0xffffffff
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov edi, dword [ebp - 0x18]
test edi, edi
je 0x451432
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [edi + 4], eax
jne 0x451432
mov eax, dword [edi]
mov esi, dword [eax]
mov ecx, esi
call dword [0x4cc2f8]
mov ecx, edi
call esi
lock xadd dword [edi + 8], ebx
dec ebx
jne 0x451432
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4cc2f8]
mov ecx, edi
call esi
mov ecx, dword [ebp - 0x24]
cmp ecx, 0xf
jbe 0x451462
mov edx, dword [ebp - 0x38]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x451458
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x45149c
push ecx
push edx
call fcn.00484729
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 - 0x14]
xor ecx, ebp
call fcn.0048471b
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x4c]
call fcn.00436470
push 0x516930
mov eax, ecx
push eax
call fcn.00486900
call fcn.0049091f
int3
Function at 0x457b30
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c8cd6
mov eax, dword fs:[0]
push eax
push ecx
push esi
mov eax, dword [0x519100]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x10], esi
mov dword [esi + 4], 0
mov dword [esi + 8], 0
lea eax, [esi + 0xc]
mov dword [ebp - 4], 0
push eax
mov dword [esi], vtable.asw::mi::ModuleDestructions.0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov byte [ebp - 4], 1
mov dword [esi + 0x24], 0
push 0x40
mov dword [esi + 0x28], 0
mov dword [esi + 0x2c], 0
call fcn.00484763
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [esi + 0x28], eax
mov byte [ebp - 4], 2
push 0x40
mov dword [esi + 0x30], 0
mov dword [esi + 0x34], 0
call fcn.00484763
add esp, 8
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [esi + 0x30], eax
mov eax, esi
mov byte [esi + 0x38], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x459330
Capabilities:
Hash data with md5

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x6c
mov eax, dword [0x519100]
xor eax, esp
mov dword [esp + 0x68], eax
push esi
mov esi, dword [ebp + 8]
push edx
mov edx, ecx
mov dword [esp + 0x20], 0
lea ecx, [esp + 0xc]
mov dword [esp + 0x1c], 0
mov dword [esp + 0xc], 0x67452301
mov dword [esp + 0x10], 0xefcdab89
mov dword [esp + 0x14], 0x98badcfe
mov dword [esp + 0x18], 0x10325476
call fcn.004593f0
add esp, 4
test esi, esi
je 0x4593de
mov edx, dword [esp + 0x18]
mov ecx, 0x78
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x64], edx
shr edx, 3
mov dword [esp + 0x68], eax
and edx, 0x3f
sub ecx, edx
mov eax, 0x38
sub eax, edx
cmp edx, 0x38
mov edx, 0x506bb0
cmovae eax, ecx
lea ecx, [esp + 8]
push eax
call fcn.004593f0
push 8
lea edx, [esp + 0x6c]
lea ecx, [esp + 0x10]
call fcn.004593f0
movups xmm0, xmmword [esp + 0x10]
add esp, 8
movups xmmword [esi], xmm0
mov ecx, dword [esp + 0x6c]
pop esi
xor ecx, esp
call fcn.0048471b
mov esp, ebp
pop ebp
ret
Function at 0x460090
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x418
mov eax, dword [0x519100]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
lea esi, [ebp - 0x20c]
mov dword [ebp - 0x418], edx
push 0x104
mov eax, esi
mov ebx, ecx
push eax
push ebx
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp eax, 0x104
jne 0x4600ec
push 0x10000
call fcn.00498320
mov esi, eax
add esp, 4
test esi, esi
je 0x460155
push 0x8000
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x46015d
cmp byte [ebp + 8], 0
je 0x460126
push 0x104
lea eax, [ebp - 0x414]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
test eax, eax
je 0x460126
lea eax, [ebp - 0x20c]
cmp esi, eax
je 0x460120
push esi
call fcn.00490970
add esp, 4
lea esi, [ebp - 0x414]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x46015d
mov edx, esi
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x460137
sub edx, ecx
mov ecx, dword [ebp - 0x418]
sar edx, 1
push edx
push esi
call fcn.0040b920
jmp 0x460165
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
lea eax, [ebp - 0x20c]
cmp esi, eax
je 0x460182
lea eax, [ebp - 0x414]
cmp esi, eax
je 0x460182
push esi
call fcn.00490970
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0048471b
mov esp, ebp
pop ebp
ret
Function at 0x460410
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x519100]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, edx
mov edx, ecx
mov dword [ebp - 0x218], eax
mov dword [ebp - 0x21c], edx
push edi
mov edi, dword [ebp + 8]
test edx, edx
je 0x460580
test eax, eax
je 0x460580
cmp dword [edi + 0x14], 7
mov ecx, edi
jbe 0x460451
mov ecx, dword [edi]
push ebx
push esi
xor esi, esi
mov dword [edi + 0x10], 0
mov word [ecx], si
xor ecx, ecx
mov word [ebp - 0x20c], cx
lea ecx, [ebp - 0x210]
push ecx
lea ecx, [ebp - 0x20c]
mov dword [ebp - 0x210], 0x208
push ecx
push esi
push esi
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
cmp esi, 0xea
jne 0x46053b
mov eax, dword [ebp - 0x210]
add eax, 2
push 0x4ed614
push eax
mov dword [ebp - 0x214], eax
call fcn.00484ca6
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x460523
lea eax, [ebp - 0x214]
push eax
push ebx
push 0
push 0
push dword [ebp - 0x218]
push dword [ebp - 0x21c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
test esi, esi
jne 0x460507
mov eax, dword [ebp - 0x214]
shr eax, 1
je 0x4604fe
lea edx, [eax - 1]
lea edx, [ebx + edx*2]
nop
cmp word [edx], 0
jne 0x4604fe
sub edx, 2
sub eax, 1
jne 0x4604f0
push eax
push ebx
mov ecx, edi
call fcn.0040b920
push ebx
call fcn.00484967
add esp, 4
mov eax, esi
pop esi
pop ebx
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048471b
mov esp, ebp
pop ebp
ret
mov esi, 8
mov eax, esi
pop esi
pop ebx
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048471b
mov esp, ebp
pop ebp
ret
test esi, esi
jne 0x46056d
mov eax, dword [ebp - 0x210]
shr eax, 1
je 0x46055e
lea ecx, [ebp + eax*2 - 0x20e]
cmp word [ecx], 0
jne 0x46055e
sub ecx, 2
sub eax, 1
jne 0x460550
push eax
lea eax, [ebp - 0x20c]
mov ecx, edi
push eax
call fcn.0040b920
mov eax, esi
pop esi
pop ebx
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048471b
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 0x57
xor ecx, ebp
pop edi
call fcn.0048471b
mov esp, ebp
pop ebp
ret
Function at 0x4634e0
Capabilities:
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, edx
mov edx, dword [ebp + 0x18]
test ecx, 0x400
je 0x4634fd
or dword [edi], 0x80
test ecx, 0x800
je 0x46350b
or dword [edi], 0x100
test cl, 1
je 0x463516
or dword [edi], 0x80000000
test ecx, 0x100
je 0x463524
or dword [edi], 0x20000000
test ecx, 0x200
je 0x463532
or dword [edi], 0x10000
test cl, cl
jns 0x463539
or dword [edi], 4
test cl, 2
je 0x463546
or dword [edi], 0x40000000
jmp 0x463559
test cl, 4
je 0x463559
mov ebx, dword [ebp + 8]
mov eax, dword [edi]
mov dword [ebx], eax
or eax, 0x100
mov dword [edi], eax
mov eax, ecx
and eax, 0x20000000
test cl, 8
je 0x463580
test eax, eax
mov dword [ebp - 4], 5
mov ebx, 2
cmove ebx, dword [ebp - 4]
neg eax
sbb eax, eax
add eax, 2
jmp 0x463598
test eax, eax
je 0x46358e
mov ebx, 3
lea eax, [ebx + 1]
jmp 0x463598
mov ebx, 1
mov eax, 3
mov dword [esi], eax
mov eax, dword [ebp + 0xc]
mov dword [edx], ebx
test cl, 0x10
je 0x4635a7
or dword [eax], 1
test cl, 0x20
je 0x4635af
or dword [eax], 2
test cl, 0x40
je 0x4635b7
or dword [eax], 4
mov edx, dword [ebp + 0x1c]
mov esi, dword [ebp + 0x14]
test ecx, ecx
jns 0x4635cd
or dword [esi], 0x4000000
or dword [edx], 0x1000
test ecx, 0x10000000
je 0x4635e1
or dword [esi], 0x2000000
or dword [edx], 0x4000
test ecx, 0x8000000
je 0x4635f2
or dword [esi], 0x2000000
or dword [edx], 1
test ecx, 0x40000
je 0x463606
or dword [esi], 0x200000
or dword [edx], 0x200000
mov eax, ecx
and eax, 0x7000000
je 0x463660
cmp eax, 0x6000000
ja 0x463650
je 0x463645
cmp eax, 0x4000000
je 0x463634
cmp eax, 0x5000000
jne 0x463660
or dword [esi], 0x10000000
or dword [edx], 0x800
jmp 0x463660
mov eax, dword [ebp + 0x20]
or dword [esi], 0x2100
or dword [eax], 0x2100
jmp 0x463660
or dword [esi], 0x8000000
or dword [edx], 4
jmp 0x463660
cmp eax, 0x7000000
jne 0x463660
or dword [esi], 0x80000000
or dword [edx], 2
test ecx, 0x10000
jne 0x463683
mov ebx, dword [ebp + 8]
or dword [edi], 0x100000
mov eax, dword [ebx]
test eax, eax
je 0x46367e
or eax, 0x100000
mov dword [ebx], eax
or dword [edx], 0x20
jmp 0x463689
or dword [esi], 0x40000000
pop edi
pop esi
pop ebx
test ecx, 0xc000
je 0x46369a
or dword [edx], 0x100
mov esp, ebp
pop ebp
ret
Function at 0x4652b0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x519100]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov ebx, edx
mov esi, ecx
push edi
mov dword [ebx], 0
cmp word [esi], 0x2a
jne 0x465334
push 5
lea eax, [esi + 2]
push 0x507508
push eax
call fcn.004a0d1e
add esp, 0xc
test eax, eax
jne 0x465334
push 0x10
push eax
lea eax, [esi + 0xc]
push eax
call fcn.0049e044
add esp, 0xc
cmp eax, 0xffffffff
je 0x465334
push 0
lea edx, [ebp - 0x48]
mov dword [ebp - 8], 0x10002
lea ecx, [ebp - 0xc]
mov dword [ebp - 0xc], eax
call fcn.00465030
or ecx, 0xffffffff
add esp, 4
test eax, eax
cmove ecx, dword [ebp - 0x48]
mov dword [ebx], ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048471b
mov esp, ebp
pop ebp
ret
mov eax, dword [0x52085c]
xor edi, edi
mov dword [ebp - 0x10], 1
mov dword [ebp - 0x14], eax
test eax, eax
je 0x465358
push edi
mov ecx, eax
call dword [0x4cc2f8]
call dword [ebp - 0x14]
mov dword [ebp - 0x10], eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebx], eax
cmp eax, 0xffffffff
jne 0x46536e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov esi, dword [0x52085c]
test esi, esi
je 0x465385
push dword [ebp - 0x10]
mov ecx, esi
call dword [0x4cc2f8]
call esi
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0048471b
mov esp, ebp
pop ebp
ret
Function at 0x4654f0
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [0x519100]
xor eax, ebp
mov dword [ebp - 8], eax
cmp dword [0x520850], 0
push ebx
push esi
push edi
mov ebx, edx
mov edi, ecx
je 0x4656be
cmp dword [0x520830], 0
je 0x4656be
push 4
xorps xmm0, xmm0
mov dword [ebp - 0x28], 0
xor eax, eax
mov dword [ebp - 0x24], 7
push str._UNC_
movups xmmword [ebp - 0x38], xmm0
push edi
mov word [ebp - 0x38], ax
call fcn.004a0d1e
add esp, 0xc
test eax, eax
jne 0x465555
add edi, 8
jmp 0x46556e
lea edx, [ebp - 0x38]
mov ecx, edi
call fcn.004653a0
test eax, eax
jne 0x46556e
cmp dword [ebp - 0x24], 7
lea edi, [ebp - 0x38]
cmova edi, dword [ebp - 0x38]
push 4
xorps xmm0, xmm0
mov dword [ebp - 0x10], 0
xor eax, eax
mov dword [ebp - 0xc], 7
push 0x50751c
movups xmmword [ebp - 0x20], xmm0
push edi
mov word [ebp - 0x20], ax
call fcn.004a0d1e
add esp, 0xc
lea ecx, [ebp - 0x20]
mov esi, eax
push 4
push 0x50751c
call fcn.0040b920
test esi, esi
lea edx, [edi + 8]
cmovne edx, edi
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4655b7
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x20]
call fcn.0040ba30
cmp dword [ebp - 0xc], 7
lea eax, [ebp - 0x20]
mov esi, dword [0x520848]
mov ecx, esi
cmova eax, dword [ebp - 0x20]
push eax
lea eax, [ebp - 0x40]
push eax
call dword [0x4cc2f8]
call esi
mov ecx, 0x40
test ebx, ebx
je 0x46560f
cmp dword [ebx + 0x808], 0
mov eax, dword [ebx + 0x804]
je 0x465611
mov ecx, 0x42
jmp 0x465611
xor eax, eax
mov esi, dword [0x520850]
push 0
push 0
push 1
push 3
push 0
push 0x10
mov dword [ebp - 0x54], eax
lea eax, [ebp - 0x48]
push 0
push eax
lea eax, [ebp - 0x64]
mov dword [ebp - 0x58], ecx
push eax
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x64], 0x18
push 1
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x5c], ecx
push eax
mov ecx, esi
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x50], 0
call dword [0x4cc2f8]
call esi
mov edi, eax
test edi, edi
jne 0x465684
push dword [ebp - 0x4c]
mov esi, dword [0x520830]
mov ecx, esi
call dword [0x4cc2f8]
call esi
cmp dword [ebp - 0x44], 1
jne 0x46569b
mov edi, 0xb7
jmp 0x46569b
mov esi, dword [0x520858]
test esi, esi
je 0x46569b
push edi
mov ecx, esi
call dword [0x4cc2f8]
call esi
mov edi, eax
lea ecx, [ebp - 0x20]
call fcn.00423780
lea ecx, [ebp - 0x38]
call fcn.00423780
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0048471b
mov esp, ebp
pop ebp
ret
mov esi, dword [0x52085c]
mov dword [ebp - 0x4c], 1
test esi, esi
je 0x4656de
push 0
mov ecx, esi
call dword [0x4cc2f8]
call esi
mov dword [ebp - 0x4c], eax
lea eax, [ebx + 0x800]
neg ebx
sbb ebx, ebx
and ebx, eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x465700
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x465702
xor ebx, ebx
mov esi, dword [0x52085c]
test esi, esi
je 0x465719
push dword [ebp - 0x4c]
mov ecx, esi
call dword [0x4cc2f8]
call esi
mov ecx, dword [ebp - 8]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0048471b
mov esp, ebp
pop ebp
ret
Function at 0x465730
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10008
call fcn.004850d0
mov eax, dword [0x519100]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [0x52085c]
push edi
xor edi, edi
mov dword [ebp - 0x10008], ecx
lea ebx, [edi + 1]
test esi, esi
je 0x46576c
push edi
mov ecx, esi
call dword [0x4cc2f8]
call esi
mov ebx, eax
lea eax, [ebp - 0x10004]
push eax
push 0x8000
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
jne 0x46578c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x4657b7
lea edx, [ebp - 0x10004]
lea esi, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x465795
mov ecx, dword [ebp - 0x10008]
lea eax, [ebp - 0x10004]
sub edx, esi
sar edx, 1
push edx
push eax
call fcn.0040b920
mov esi, dword [0x52085c]
test esi, esi
je 0x4657cc
push ebx
mov ecx, esi
call dword [0x4cc2f8]
call esi
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0048471b
mov esp, ebp
pop ebp
ret

Function at 0x466180
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x519100]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
mov ebx, ecx
mov edi, edx
mov dword [ebp - 0x210], edi
test ebx, ebx
je 0x4662c8
cmp word [ebx], 0
je 0x4662c8
push esi
push 0x104
lea eax, [ebp - 0x20c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov esi, eax
test esi, esi
je 0x4662af
cmp esi, 0x104
jae 0x4661f9
push esi
lea eax, [ebp - 0x20c]
mov ecx, edi
push eax
call fcn.0040b920
pop esi
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048471b
mov esp, ebp
pop ebp
ret
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00498320
mov edi, eax
add esp, 4
test edi, edi
je 0x466297
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x466273
cmp eax, esi
jae 0x466252
mov ecx, dword [ebp - 0x210]
push esi
push edi
call fcn.0040b920
push edi
call fcn.00490970
add esp, 4
xor eax, eax
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048471b
mov esp, ebp
pop ebp
ret
push edi
mov esi, 0x7a
call fcn.00490970
add esp, 4
mov eax, esi
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048471b
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov esi, eax
call fcn.00490970
add esp, 4
mov eax, esi
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048471b
mov esp, ebp
pop ebp
ret
mov esi, 8
mov eax, esi
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048471b
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048471b
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 0x57
pop edi
xor ecx, ebp
pop ebx
call fcn.0048471b
mov esp, ebp
pop ebp
ret
Function at 0x468ff0
Capabilities:
Get common file path
Query environment variable
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x519100]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
xor esi, esi
cmp dword [0x52093c], esi
jne 0x46902d
sub esp, 8
lea ecx, [esi + 1]
call fcn.00468d70
mov esi, eax
add esp, 8
test esi, esi
jne 0x469104
or dword [0x520938], 2
mov eax, dword [0x52093c]
test eax, eax
je 0x46903d
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x52092c]
mov ecx, eax
inc eax
mov dword [0x52092c], eax
test ecx, ecx
jne 0x4690f2
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.004a0bce
add esp, 4
xor eax, eax
mov word [ebp - 0x210], ax
lea eax, [ebp - 0x210]
push 0x104
push eax
push str._SystemRoot_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ax, word [ebp - 0x210]
xor ecx, ecx
cmp cx, ax
je 0x469099
mov ecx, 0x25
cmp cx, ax
jne 0x4690bd
push 0x104
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea eax, [ebp - 0x210]
push eax
push str.SystemRoot
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ecx, 4
call fcn.0045f040
mov esi, eax
test esi, esi
jne 0x4690ed
or dword [0x520938], 1
mov cl, 1
call fcn.00467a00
mov esi, eax
test esi, esi
jne 0x4690ed
call fcn.00468270
call fcn.00468c30
jmp 0x4690f2
call fcn.00469120
mov eax, dword [0x52093c]
test eax, eax
je 0x469102
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0048471b
mov esp, ebp
pop ebp
ret
Function at 0x46ec70
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
mov ecx, 0x51df70
push 0
call fcn.0048587d
mov edi, eax
mov esi, 1
test edi, edi
je 0x46edb7
mov ebx, dword [ebp + 8]
mov eax, ebx
shr eax, 4
mov dword [ebp - 8], eax
inc eax
movzx eax, ax
mov dword [ebp - 4], eax
nop dword [eax]
push 0
push eax
push 6
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
test eax, eax
je 0x46ecd1
push ebx
mov edx, eax
mov ecx, edi
call fcn.0046f6d0
add esp, 4
test eax, eax
jne 0x46ecec
push esi
mov ecx, 0x51df70
inc esi
call fcn.0048587d
mov edi, eax
test edi, edi
je 0x46edb7
mov eax, dword [ebp - 4]
jmp 0x46ecb0
test edi, edi
je 0x46edb7
mov eax, dword [ebp - 8]
inc eax
push 6
movzx eax, ax
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp - 8], eax
test eax, eax
je 0x46edb7
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x46edb7
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x46edb7
push dword [ebp - 8]
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
lea ecx, [esi + eax]
and ebx, 0xf
jbe 0x46ed55
cmp esi, ecx
jae 0x46edb7
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub ebx, 1
jne 0x46ed43
cmp esi, ecx
jae 0x46edb7
cmp word [esi], 0
je 0x46edb7
mov ebx, dword [ebp - 0xc]
mov ecx, 1
movzx edi, word [esi]
mov eax, dword [ebx]
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, edi
or ecx, eax
jge 0x46ed80
push edi
mov ecx, ebx
call fcn.0046edd0
movzx ecx, word [esi]
lea eax, [esi + 2]
push ecx
push eax
push edi
push dword [ebx]
call fcn.004a1db6
push eax
call fcn.0046f740
mov eax, dword [ebx]
add esp, 0x14
cmp edi, dword [eax - 8]
jg 0x46edc2
mov dword [eax - 0xc], edi
xor ecx, ecx
mov eax, dword [ebx]
mov word [eax + edi*2], cx
lea eax, [ecx + 1]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0x80070057
call fcn.0046f7f0
int3

Function at 0x46f6d0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, edx
mov ebx, ecx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x46f72b
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x46f72b
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 8]
lea edx, [esi + eax]
and ecx, 0xf
jbe 0x46f718
cmp esi, edx
jae 0x46f72b
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub ecx, 1
jne 0x46f706
cmp esi, edx
jae 0x46f72b
xor eax, eax
cmp word [esi], ax
pop edi
cmove esi, eax
mov eax, esi
pop esi
pop ebx
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
pop ebp
ret