joyce8/EMBER2024-capa huggingface dataset:
Function at 0x3013db50
Capabilities:
Contain obfuscated stackstrings
Encode data using xor
Encrypt data using salsa20 or chacha

Disassembly:
mov eax, 0x88
call fcn.3015ea70
mov eax, dword [0x3021ae88]
xor eax, esp
mov dword [esp + 0x84], eax
mov ecx, dword [esp + 0x98]
push edi
mov edi, dword [esp + 0x90]
mov dword [esp + 0x48], 0x61707865
mov eax, dword [ecx]
mov dword [esp + 0x58], eax
mov eax, dword [ecx + 4]
mov dword [esp + 0x5c], eax
mov eax, dword [ecx + 8]
mov dword [esp + 0x60], eax
mov eax, dword [ecx + 0xc]
mov dword [esp + 0x64], eax
mov eax, dword [ecx + 0x10]
mov dword [esp + 0x68], eax
mov eax, dword [ecx + 0x14]
mov dword [esp + 0x6c], eax
mov eax, dword [ecx + 0x18]
mov dword [esp + 0x70], eax
mov eax, dword [ecx + 0x1c]
mov ecx, dword [esp + 0xa0]
mov dword [esp + 0x74], eax
mov dword [esp + 0x4c], 0x3320646e
mov dword [esp + 0x50], 0x79622d32
mov eax, dword [ecx]
mov dword [esp + 0x78], eax
mov eax, dword [ecx + 4]
mov dword [esp + 0x7c], eax
mov eax, dword [ecx + 8]
mov dword [esp + 0x80], eax
mov eax, dword [ecx + 0xc]
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x98]
mov dword [esp + 0x54], 0x6b206574
test eax, eax
je 0x3013dd27
push ebx
mov ebx, dword [esp + 0x98]
push ebp
push esi
nop
mov esi, 0x40
cmp eax, esi
cmovb esi, eax
lea eax, [esp + 0x54]
push eax
lea eax, [esp + 0x18]
push eax
call fcn.3013dd40
add esp, 8
xor eax, eax
test esi, esi
je 0x3013dcfa
cmp esi, 0x40
jb 0x3013dcc1
lea edx, [edi - 1]
lea ecx, [esp + esi + 0x13]
add edx, esi
cmp edi, ecx
ja 0x3013dc54
lea ecx, [esp + 0x14]
cmp edx, ecx
jae 0x3013dcc1
lea ecx, [ebx - 1]
add ecx, esi
cmp edi, ecx
ja 0x3013dc61
cmp edx, ebx
jae 0x3013dcc1
mov edx, esi
lea ecx, [edi + 0x10]
mov ebp, ebx
and edx, 0xffffffc0
sub ebp, edi
nop dword [eax]
movups xmm0, xmmword [esp + eax + 0x14]
lea ecx, [ecx + 0x40]
movups xmm1, xmmword [ebx + eax]
pxor xmm1, xmm0
movups xmm0, xmmword [esp + eax + 0x24]
movups xmmword [edi + eax], xmm1
movups xmm1, xmmword [ecx + ebp - 0x40]
pxor xmm1, xmm0
movups xmm0, xmmword [esp + eax + 0x34]
movups xmmword [ecx - 0x40], xmm1
movups xmm1, xmmword [ebx + eax + 0x20]
pxor xmm1, xmm0
movups xmm0, xmmword [esp + eax + 0x44]
movups xmmword [ecx - 0x30], xmm1
movups xmm1, xmmword [ebx + eax + 0x30]
add eax, 0x40
pxor xmm1, xmm0
movups xmmword [ecx - 0x20], xmm1
cmp eax, edx
jb 0x3013dc70
cmp eax, esi
jae 0x3013dcfa
mov ebp, ebx
lea ecx, [esp + 0x14]
sub ebp, ecx
lea edx, [esp + 0x14]
mov ecx, edi
sub ecx, edx
mov dword [esp + 0x10], ecx
mov ebx, ecx
nop dword [eax + eax]
lea edx, [esp + 0x14]
add edx, eax
inc eax
mov cl, byte [edx + ebp]
xor cl, byte [edx]
mov byte [ebx + edx], cl
cmp eax, esi
jb 0x3013dce0
mov ebx, dword [esp + 0xa0]
mov eax, dword [esp + 0xa4]
add ebx, esi
inc dword [esp + 0x84]
sub eax, esi
add edi, esi
mov dword [esp + 0xa0], ebx
mov dword [esp + 0xa4], eax
test eax, eax
jne 0x3013dc10
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x88]
pop edi
xor ecx, esp
call fcn.3015dd6d
add esp, 0x88
ret
Function at 0x30140660
Capabilities:
Encode data using xor

Disassembly:
cmp dword [esp + 0x18], 0
je 0x30140674
mov dword [esp + 0x18], fcn.3013ee40
jmp fcn.30137940
mov dword [esp + 0x18], fcn.3013e0d0
jmp fcn.30137670
Function at 0x3016c1b9
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.3015ea70
mov eax, dword [0x3021ae88]
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.30174735
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x3016c1fb
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x3016c357
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.30184e60
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 + 0x30238140]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.3017c8ee
mov ecx, dword [esi*4 + 0x30238140]
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 0x3016c350
cmp eax, dword [edi + ecx + 0x24]
jne 0x3016c350
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 0x3016c350
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.3017c8ee
add esp, 0x14
test edx, edx
jl 0x3016c350
jg 0x3016c2c6
test eax, eax
jb 0x3016c350
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x3016c350
jl 0x3016c2e0
cmp dword [ebp - 0x1008], eax
ja 0x3016c350
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x3016c2fe
test ebx, ebx
je 0x3016c337
cmp ecx, edi
jae 0x3016c337
mov al, byte [ecx]
cmp al, 0xd
jne 0x3016c318
lea eax, [edi - 1]
cmp ecx, eax
jae 0x3016c324
cmp byte [ecx + 1], 0xa
jne 0x3016c324
inc ecx
jmp 0x3016c324
movzx eax, al
movsx eax, byte [eax + 0x3021afe0]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x3016c2fe
cmp edx, ebx
jne 0x3016c2fe
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x3016c355
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.3015dd6d
leave
ret
Function at 0x3017562f
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x3021ae88]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push 0x301df520
push esi
call fcn.3017e88c
pop ecx
pop ecx
test eax, eax
jne 0x3017565d
xor al, al
jmp 0x301756da
push ebx
lea eax, [ebp - 0x210]
xor ebx, ebx
push eax
push 0x104
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x210], ebx
push esi
push eax
call fcn.30175372
mov edx, eax
add esp, 0x10
test edx, edx
jne 0x30175697
push dword [ebp - 0x210]
call fcn.30168264
xor al, al
jmp 0x301756d8
mov ecx, edx
push edi
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x3017569d
sub ecx, edi
sar ecx, 1
pop edi
cmp ecx, 3
je 0x301756bd
push edx
call fcn.30175565
pop ecx
test al, al
je 0x30175688
push esi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x301756cb
mov bl, 1
push dword [ebp - 0x210]
call fcn.30168264
mov al, bl
pop ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.3015dd6d
leave
ret
Function at 0x30177010
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 + 0x30238140]
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 0x30177050
cmp byte [ebx], 0xa
jne 0x30177050
or byte [eax + edi + 0x28], 4
jmp 0x30177055
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x30177153
mov al, byte [edx]
cmp al, 0x1a
je 0x30177135
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x30177084
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x301770a9
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x301770b3
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 0x30177066
jmp 0x30177153
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 0x30177130
cmp dword [ebp - 0xc], 0
je 0x30177130
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x30238140]
test byte [eax + edi + 0x28], 0x48
je 0x3017710a
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x301770f5
mov byte [esi], dl
jmp 0x30177106
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x30238140]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x30177153
cmp byte [ebp - 1], 0xa
jne 0x30177119
cmp esi, ebx
jne 0x30177119
mov byte [esi], 0xa
jmp 0x30177152
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.3017c90c
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x30177153
mov byte [esi], 0xd
jmp 0x30177152
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x30238140]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x3017714f
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x30177153
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x3017715c
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 + 0x30238140]
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 0x3017719f
cmp word [esi], dx
jne 0x3017719f
or byte [edi + eax + 0x28], 4
jmp 0x301771a4
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 0x301772f7
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 0x301772d7
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x301771e6
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x3017721c
cmp eax, edx
jae 0x30177228
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 0x301771be
jmp 0x301772f7
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 0x301772d3
cmp dword [ebp - 0x14], 0
je 0x301772d3
mov eax, dword [ebx*4 + 0x30238140]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x301772ab
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x30177274
mov word [esi], cx
jmp 0x301772a7
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x30238140]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x30238140]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x30238140]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x301772f7
pop ebx
cmp word [ebp - 4], bx
jne 0x301772bc
cmp esi, dword [ebp + 0xc]
jne 0x301772bc
mov word [esi], bx
jmp 0x301772f4
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.3017c90c
add esp, 0x10
cmp word [ebp - 4], bx
je 0x301772f7
push 0xd
jmp 0x301772f0
mov ecx, dword [ebx*4 + 0x30238140]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x301772ee
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x301772f7
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 0x30179991
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x301e0b40
push 0x301e0b38
push str.FlsAlloc
push 0x1e
call fcn.301797d2
mov esi, eax
add esp, 0x10
test esi, esi
je 0x301799c5
push dword [ebp + 8]
mov ecx, esi
call dword [0x30188394]
call esi
jmp 0x301799cb
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x30179a0f
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x301e0b50
push 0x301e0b48
push str.FlsGetValue
push 0x20
call fcn.301797d2
mov esi, eax
add esp, 0x10
test esi, esi
je 0x30179a46
push dword [ebp + 8]
mov ecx, esi
call dword [0x30188394]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x3017b4c1
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.3017b443
Function at 0x3017ce22
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.3017cd9e
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x3017cf9a
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x3017cf9a
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x3017cf49
jg 0x3017ce7b
test eax, eax
je 0x3017cf3f
push 1
push 0x1000
call fcn.3017960e
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x3017cea1
mov eax, dword [ebp + 0x14]
push 0xc
pop edi
mov byte [eax + 0x1c], 1
mov dword [eax + 0x18], edi
jmp 0x3017cf36
push 0x8000
push ebx
call fcn.3017489a
mov edi, dword [ebp + 0x14]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x3017cecd
jg 0x3017cec8
cmp ecx, 0x1000
jb 0x3017cecd
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.3017bfb7
add esp, 0x10
cmp eax, 0xffffffff
je 0x3017cf12
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x3017cec8
jl 0x3017cef9
test ecx, ecx
jne 0x3017ceba
push dword [ebp - 0xc]
push ebx
call fcn.3017489a
push esi
call fcn.30177989
add esp, 0xc
xor edi, edi
jmp 0x3017cfab
cmp byte [edi + 0x24], 0
je 0x3017cf29
cmp dword [edi + 0x20], 5
jne 0x3017cf29
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x3017cf34
mov edi, dword [edi + 0x18]
jmp 0x3017cf36
xor edi, edi
push esi
call fcn.30177989
pop ecx
jmp 0x3017cfab
test ecx, ecx
jg 0x3017cf0b
jl 0x3017cf49
test eax, eax
jae 0x3017cf0b
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.3017c90c
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x3017cf6c
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x3017cf0b
jmp 0x3017cfa3
push ebx
call fcn.3017cd34
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x3017cf0b
mov esi, dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [esi + 0x24], 1
mov dword [esi + 0x20], eax
pop edi
mov byte [esi + 0x1c], 1
mov dword [esi + 0x18], edi
jmp 0x3017cfab
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x3017cfa8
mov edi, dword [edi + 0x18]
jmp 0x3017cfab
push 0x16
pop edi
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.3017c90c
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x3017d154
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.3017cfc5
Function at 0x3017fa91
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 0x3017fb2e
push ebx
push esi
call fcn.3017fa5a
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.3017f9a3
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x3017fadb
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x3017fb2d
push edi
push eax
call fcn.301779c3
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x3017fafb
call fcn.30177989
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x3017fb2c
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.3017f9a3
add esp, 0x20
test eax, eax
jne 0x3017fb1a
push edi
call fcn.30177989
jmp 0x3017fb22
push ebx
call fcn.30177989
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 0x3017fb31
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x3017fb42
pop esi
ret
push ebx
push edi
push esi
call fcn.3017fa5a
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.301779c3
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x3017fb6a
push ebx
push esi
push edi
call fcn.30160350
add esp, 0xc
push 0
call fcn.30177989
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x301802b7
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.3017fdde
Function at 0x403ad0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
cmp dword [ebp + 8], 0
push ebx
push esi
je 0x403b4d
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x403b4d
xor eax, eax
xor ebx, ebx
mov word [esi], ax
lea eax, [ebp - 8]
push eax
push 1
push ebx
push edx
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x403b4d
mov eax, dword [ebp + 0xc]
push edi
lea edi, [eax + eax]
lea eax, [ebp - 4]
mov dword [ebp - 4], edi
push eax
push esi
push ebx
push ebx
push dword [ebp + 8]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x403b34
mov eax, dword [ebp - 4]
shr eax, 1
mov dword [ebp - 4], eax
cmp eax, dword [ebp + 0xc]
jae 0x403b44
xor ecx, ecx
mov word [esi + eax*2], cx
mov bl, 1
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, bl
pop edi
pop esi
pop ebx
leave
ret
xor eax, eax
mov word [edi + esi - 2], ax
jmp 0x403b32
xor al, al
jmp 0x403b40

Function at 0x404252
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x10]
push ebx
push 1
push 0
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
js 0x40428a
push edi
push 0
push str.SCRIPT
push 0xa
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
mov edi, eax
test edi, edi
jne 0x443697
pop edi
pop esi
pop ebx
leave
ret
push edi
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 4], eax
test eax, eax
je 0x404289
push edi
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
test edi, edi
je 0x404289
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
je 0x404289
mov ecx, dword [ebx]
push 0
push edi
push eax
mov edx, dword [ecx]
push ecx
call dword [edx + 0x10]
mov eax, dword [ebx]
xor edx, edx
push edx
push edx
push edx
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x14]
mov byte [esi + 0x14], 1
jmp 0x404289
Function at 0x473cb7
Capabilities:
Create directory
Delete directory

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x50000
call fcn.00442060
push ebx
push edi
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x20004]
push eax
push 0x7fff
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
je 0x473d6d
lea eax, [ebp - 0x20004]
push eax
lea eax, [ebp - 0x10004]
push str.___s
push eax
call fcn.0041fc33
lea eax, [ebp - 0x10004]
push eax
call fcn.00424a73
mov ebx, eax
add esp, 0x10
cmp word [ebp + ebx*2 - 0x10006], 0x5c
jne 0x473d30
cmp word [ebp + ebx*2 - 0x10008], 0x3a
je 0x473d30
xor eax, eax
mov word [ebp + ebx*2 - 0x10006], ax
xor edi, edi
push edi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x473d45
cmp byte [ebp + 0x10], al
je 0x473d6d
push edi
push 0x2200000
push 3
push edi
push edi
push 0x40000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x473d75
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
xor eax, eax
pop edi
pop ebx
leave
ret 0xc
push 0x2fffa
lea eax, [ebp - 0x50000]
push 0
push eax
call fcn.00422450
lea eax, [ebx + ebx]
mov dword [ebp - 0x50000], 0xa0000003
mov word [ebp - 0x4fff6], ax
add eax, 2
mov word [ebp - 0x4fff4], ax
lea eax, [ebp - 0x10004]
push 0x7fff
push eax
lea eax, [ebp - 0x4fff0]
push eax
call fcn.0042d3fb
mov eax, dword [ebp - 0x4fff6]
lea ecx, [ebp + 8]
add esp, 0x18
xor edx, edx
add eax, 0xc
mov word [ebp - 0x4fffc], ax
movzx eax, ax
push edx
push ecx
push edx
push edx
add eax, 8
push eax
lea eax, [ebp - 0x50000]
push eax
push 0x900a4
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push edi
test eax, eax
jne 0x473e04
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x473d64
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
inc eax
jmp 0x473d6f
Function at 0x430002
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
mov eax, section..text
nop
mov ebx, 0x408ecc
nop
mov ecx, 0x3f1d03e4
nop
test eax, eax
nop
nop
nop
nop
nop
nop
nop
je 0x43004e
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
inc eax
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
nop
nop
jne 0x430024
nop
nop
mov eax, section..data_1
nop
mov ebx, 0x42e1d0
mov ecx, 0x77a9117e
nop
nop
nop
test eax, eax
nop
nop
nop
nop
je 0x430084
nop
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
add eax, 4
nop
nop
nop
cmp eax, ebx
nop
nop
jne 0x43006c
nop
nop
nop
nop
nop
nop
nop
popal
nop
jmp 0x401219
Function at 0x430001
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
call 0x43000c
nop
nop
nop
nop
nop
pop eax
add eax, 0x403daa
nop
sub eax, 0x403d50
nop
nop
nop
nop
nop
mov ebx, dword [eax]
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
mov edx, dword [eax + 8]
nop
xor dword [ebx], edx
nop
nop
nop
nop
nop
nop
nop
add ebx, 4
nop
cmp ebx, ecx
nop
nop
nop
nop
jl 0x430030
nop
nop
nop
add eax, 0xc
nop
nop
nop
cmp dword [eax], 0
nop
nop
nop
jne 0x43001e
nop
nop
nop
nop
nop
popal
nop
nop
nop
nop
jmp fcn.00401219
Function at 0x40af48
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 0x40afe5
push ebx
push esi
call fcn.0040af11
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.0040ae5a
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x40af92
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x40afe4
push edi
push eax
call fcn.00407e45
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x40afb2
call fcn.00407e0b
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x40afe3
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0040ae5a
add esp, 0x20
test eax, eax
jne 0x40afd1
push edi
call fcn.00407e0b
jmp 0x40afd9
push ebx
call fcn.00407e0b
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 0x40bc8c
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x416108
push 0x416100
push str.FlsAlloc
push 0x1e
call fcn.0040bbaa
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40bcc0
push dword [ebp + 8]
mov ecx, esi
call dword [0x41411c]
call esi
jmp 0x40bcc6
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x40bd0a
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x416118
push 0x416110
push str.FlsGetValue
push 0x20
call fcn.0040bbaa
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40bd41
push dword [ebp + 8]
mov ecx, esi
call dword [0x41411c]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]