joyce8/EMBER2024-capa huggingface dataset:
Function at 0x449e30
Capabilities:
Encrypt data using salsa20 or chacha

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 8]
movups xmm0, xmmword [edx]
movups xmmword [edi + 0x44], xmm0
movups xmm0, xmmword [edx + 0x10]
movups xmmword [edi + 0x54], xmm0
movq xmm0, qword [esi]
movq qword [edi + 0x64], xmm0
mov eax, dword [esi + 8]
mov dword [edi + 0x6c], eax
mov dword [edi + 0x74], 0x61707865
mov dword [edi + 0x78], 0x3320646e
mov dword [edi + 0x7c], 0x79622d32
mov dword [edi + 0x80], 0x6b206574
movzx ecx, byte [edx + 3]
shl ecx, 8
movzx eax, byte [edx + 2]
or ecx, eax
movzx eax, byte [edx + 1]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx]
shl ecx, 8
or ecx, eax
mov dword [edi + 0x84], ecx
movzx ecx, byte [edx + 7]
movzx eax, byte [edx + 6]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 5]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 4]
shl ecx, 8
or ecx, eax
mov dword [edi + 0x88], ecx
movzx ecx, byte [edx + 0xb]
movzx eax, byte [edx + 0xa]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 9]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 8]
shl ecx, 8
or ecx, eax
mov dword [edi + 0x8c], ecx
movzx ecx, byte [edx + 0xf]
movzx eax, byte [edx + 0xe]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0xd]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0xc]
shl ecx, 8
or ecx, eax
mov dword [edi + 0x90], ecx
movzx ecx, byte [edx + 0x13]
movzx eax, byte [edx + 0x12]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0x11]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0x10]
shl ecx, 8
or ecx, eax
mov dword [edi + 0x94], ecx
movzx ecx, byte [edx + 0x17]
movzx eax, byte [edx + 0x16]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0x15]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0x14]
shl ecx, 8
or ecx, eax
mov dword [edi + 0x98], ecx
movzx ecx, byte [edx + 0x1b]
movzx eax, byte [edx + 0x1a]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0x19]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0x18]
shl ecx, 8
or ecx, eax
mov dword [edi + 0x9c], ecx
movzx ecx, byte [edx + 0x1f]
movzx eax, byte [edx + 0x1e]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0x1d]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0x1c]
shl ecx, 8
or ecx, eax
mov dword [edi + 0xa4], 0
mov dword [edi + 0xa0], ecx
movzx ecx, byte [esi + 3]
movzx eax, byte [esi + 2]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 1]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi]
shl ecx, 8
or ecx, eax
mov dword [edi + 0xa8], ecx
movzx ecx, byte [esi + 7]
movzx eax, byte [esi + 6]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 5]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 4]
shl ecx, 8
or ecx, eax
mov dword [edi + 0xac], ecx
movzx ecx, byte [esi + 0xb]
movzx eax, byte [esi + 0xa]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 9]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 8]
shl ecx, 8
or ecx, eax
mov dword [edi + 0xb0], ecx
movq xmm0, qword [esi]
movq qword [edi + 0x64], xmm0
mov eax, dword [esi + 8]
mov dword [edi + 0x6c], eax
pop edi
pop esi
pop ebp
ret
Function at 0x997970
Capabilities:
Get file size
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0xa05274]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x208
xor ebx, ebx
lea eax, [ebp - 0x20c]
push ebx
push eax
call fcn.009c3d60
mov ecx, dword [ebp + 8]
lea edx, [ebp - 0x20c]
add esp, 0xc
sub edx, ecx
nop dword [eax + eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x9979b0
mov edx, 0xa11480
mov esi, edx
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x9979c7
lea edi, [ebp - 0x20c]
sub edx, esi
add edi, 0xfffffffe
nop dword [eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x9979e0
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor esi, esi
nop dword [eax]
push 0
push 0x80
push 3
push 0
push 1
push 0xa0000000
lea eax, [ebp - 0x20c]
push eax
call dword [0xa137d8]
mov edi, eax
cmp edi, 0xffffffff
jne 0x997a4a
push 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
inc esi
cmp esi, 0x3c
jl 0x997a00
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.009c2cd2
mov esp, ebp
pop ebp
ret
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
mov dword [ebp - 0x214], eax
mov dword [ebp - 0x210], ebx
call fcn.009c638d
add esp, 4
mov esi, eax
lea eax, [ebp - 0x210]
push 0
push eax
push dword [ebp - 0x214]
push esi
push edi
call dword [0xa1386c]
test eax, eax
je 0x997ac2
cmp dword [ebp - 0x210], 0x100
jbe 0x997ac2
cmp byte [esi], 0x4d
jne 0x997ac2
cmp byte [esi + 1], 0x5a
jne 0x997ac2
mov eax, 0x5a4d
cmp word [esi], ax
jne 0x997ac2
mov eax, dword [esi + 0x3c]
cmp dword [eax + esi], 0x4550
jne 0x997ac2
cmp dword [eax + esi + 0x28], 0x1000
mov ecx, 1
cmove ebx, ecx
push dword [ebp - 0x214]
push 0
push esi
call fcn.009c3d60
push esi
call fcn.009c6372
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.009c2cd2
mov esp, ebp
pop ebp
ret
Function at 0x99f2f0
Capabilities:
Hash data with md5

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0x67452301
mov dword [eax + 0xc], 0xefcdab89
mov dword [eax + 0x10], 0x98badcfe
mov dword [eax + 0x14], 0x10325476
pop ebp
ret

Function at 0x99f5d0
Capabilities:
Hash data with md5

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
mov eax, dword [0xa05274]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x50
lea eax, [ebp - 0x60]
push 0
push eax
call fcn.009c3d60
mov edi, dword [ebp + 8]
add esp, 0xc
mov esi, edi
lea ecx, [esi + 1]
nop dword [eax + eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x99f600
mov edx, dword [ebp + 0xc]
sub esi, ecx
mov ecx, edx
lea ebx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x99f611
sub ecx, ebx
mov dword [ebp - 0x70], 0x67452301
push ecx
push edx
lea eax, [ebp - 0x78]
mov dword [ebp - 0x6c], 0xefcdab89
xorps xmm0, xmm0
mov dword [ebp - 0x68], 0x98badcfe
push eax
movlpd qword [ebp - 0x78], xmm0
mov dword [ebp - 0x64], 0x10325476
call fcn.0099f430
push esi
lea eax, [ebp - 0x78]
push edi
push eax
call fcn.0099f430
lea eax, [ebp - 0x78]
push eax
call fcn.0099f1c0
xor eax, eax
mov dword [0xa1225c], 0
add esp, 0x1c
mov dword [0xa12260], 0
mov dword [0xa12264], 0
cmp eax, 0xa
mov dword [0xa12268], 0
mov dword [0xa1226c], 0
mov dword [0xa12270], 0
mov dword [0xa12274], 0
mov dword [0xa12278], 0
mov dword [0xa1227c], 0
mov dword [0xa12280], 0
jae 0x99f742
mov byte [ebp + eax - 0x10], 0
inc eax
cmp eax, 0xa
jl 0x99f6c9
xor ebx, ebx
nop dword [eax + eax]
movzx eax, byte [ebp + ebx - 0x20]
push eax
lea eax, [ebp - 0x10]
push 0x9fa4ac
push eax
call fcn.0099f750
lea edx, [ebp - 0x10]
add esp, 0xc
mov esi, edx
nop dword [eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x99f700
mov edi, 0xa1225c
sub edx, esi
dec edi
nop
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x99f710
mov ecx, edx
inc ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp ebx, 0x10
jl 0x99f6e0
mov ecx, dword [ebp - 4]
mov eax, 0xa1225c
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.009c2cd2
mov esp, ebp
pop ebp
ret
call fcn.009c2bf7
int3

Function at 0x99f790
Capabilities:
Hash data using sha1

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov eax, dword [0xa05274]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 0x10]
xor esi, esi
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], 0x67452301
mov dword [ebp - 0x5c], 0xefcdab89
mov dword [ebp - 0x58], 0x98badcfe
mov dword [ebp - 0x54], 0x10325476
mov dword [ebp - 0x50], 0xc3d2e1f0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x4c], 0
test edi, edi
je 0x99f800
push 1
lea eax, [ebx + esi]
push eax
lea eax, [ebp - 0x60]
push eax
call fcn.009a0b00
inc esi
add esp, 0xc
cmp esi, edi
jb 0x99f7e6
mov eax, dword [ebp - 0x64]
lea ecx, [ebp - 0x60]
push ecx
push eax
call fcn.0099f820
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.009c2cd2
mov esp, ebp
pop ebp
ret
Function at 0x99f990
Capabilities:
Hash data using sha1

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
mov dword [eax + 0x10], 0xc3d2e1f0
mov dword [eax + 0x18], 0
mov dword [eax + 0x14], 0
pop ebp
ret
Function at 0x9c95df
Capabilities:
Parse pe header

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

Function at 0x9d0943
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.009c2d60
mov eax, dword [0xa05274]
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.009d4cb5
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x9d0985
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x9d0ae1
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.009dedc0
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 + 0xa12d00]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.009d27e8
mov ecx, dword [esi*4 + 0xa12d00]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [ecx + edi + 0x20]
jne 0x9d0ada
cmp eax, dword [ecx + edi + 0x24]
jne 0x9d0ada
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [ecx + edi + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x9d0ada
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.009d27e8
add esp, 0x14
test edx, edx
jl 0x9d0ada
jg 0x9d0a50
test eax, eax
jb 0x9d0ada
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x9d0ada
jl 0x9d0a6a
cmp dword [ebp - 0x1008], eax
ja 0x9d0ada
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x9d0a88
test ebx, ebx
je 0x9d0ac1
cmp ecx, edi
jae 0x9d0ac1
mov al, byte [ecx]
cmp al, 0xd
jne 0x9d0aa2
lea eax, [edi - 1]
cmp ecx, eax
jae 0x9d0aae
cmp byte [ecx + 1], 0xa
jne 0x9d0aae
inc ecx
jmp 0x9d0aae
movzx eax, al
movsx eax, byte [eax + 0xa0f920]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x9d0a88
cmp edx, ebx
jne 0x9d0a88
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x9d0adf
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.009c2cd2
leave
ret

Function at 0x9d53e4
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x9ff7f4
push 0x9ff7ec
push str.FlsAlloc
push 0x1f
call fcn.009d5263
mov esi, eax
add esp, 0x10
test esi, esi
je 0x9d5418
push dword [ebp + 8]
mov ecx, esi
call dword [0x9e2344]
call esi
jmp 0x9d541e
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4
Function at 0x9d5462
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x9ff804
push 0x9ff7fc
push str.FlsGetValue
push 0x21
call fcn.009d5263
mov esi, eax
add esp, 0x10
test esi, esi
je 0x9d5499
push dword [ebp + 8]
mov ecx, esi
call dword [0x9e2344]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x9d54a1
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x9ff80c
push 0x9ff804
push str.FlsSetValue
push 0x22
call fcn.009d5263
mov esi, eax
add esp, 0x10
test esi, esi
je 0x9d54db
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x9e2344]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]

Function at 0x9d566f
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
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 + 0xa12d00]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x9d56af
cmp byte [ebx], 0xa
jne 0x9d56af
or byte [edi + eax + 0x28], 4
jmp 0x9d56b4
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x9d57b3
mov dl, byte [eax]
cmp dl, 0x1a
je 0x9d5796
inc eax
cmp dl, 0xd
je 0x9d56e0
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x9d5706
cmp eax, ecx
jae 0x9d5714
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x9d56c8
jmp 0x9d57b3
push 0
lea eax, [ebp - 0x10]
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 0x9d5791
cmp dword [ebp - 0x10], 0
je 0x9d5791
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0xa12d00]
test byte [eax + edi + 0x28], 0x48
je 0x9d576b
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x9d5756
mov byte [esi], dl
jmp 0x9d5767
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0xa12d00]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x9d57b3
cmp byte [ebp - 1], 0xa
jne 0x9d577a
cmp esi, ebx
jne 0x9d577a
mov byte [esi], 0xa
jmp 0x9d57b2
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.009d2806
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x9d57b3
mov byte [esi], 0xd
jmp 0x9d57b2
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0xa12d00]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x9d57b0
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x9d57b3
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x9d57bc
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0xa12d00]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x9d5802
cmp word [ebx], dx
jne 0x9d5802
or byte [eax + edi + 0x28], 4
jmp 0x9d5807
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x9d596a
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x9d594a
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x9d5848
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x9d587e
cmp eax, edx
jae 0x9d588c
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
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 - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x9d5823
jmp 0x9d596a
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x9d5945
cmp dword [ebp - 0x18], 0
je 0x9d5945
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0xa12d00]
test byte [eax + edi + 0x28], 0x48
je 0x9d591b
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x9d58df
mov word [esi], cx
jmp 0x9d5916
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0xa12d00]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0xa12d00]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0xa12d00]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x9d596a
pop eax
cmp word [ebp - 4], ax
jne 0x9d592b
cmp esi, ebx
jne 0x9d592b
mov word [esi], ax
jmp 0x9d5967
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.009d2806
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x9d596a
push 0xd
pop eax
jmp 0x9d5926
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0xa12d00]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x9d5964
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x9d596a
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x9d690e
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0xa05274]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
cmp edx, edi
je 0x9d6959
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.009d6aa9
test al, al
jne 0x9d6953
sub edx, 2
cmp edx, edi
jne 0x9d6939
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x9d697b
lea eax, [edi + 2]
cmp edx, eax
je 0x9d697b
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.009d685a
add esp, 0x10
jmp 0x9d6a75
push esi
lea ecx, [ebp - 0x255]
call fcn.009d6aa9
sub edx, edi
movzx eax, al
sar edx, 1
inc edx
neg eax
sbb eax, eax
xor ebx, ebx
push ebx
push ebx
and eax, edx
push ebx
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x254]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x9d69be
push dword [ebp - 0x25c]
jmp 0x9d696b
mov ebx, dword [ebp - 0x25c]
push 0x2e
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x25c], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x9d69fb
cmp word [ebp - 0x226], 0
je 0x9d6a1c
cmp word [ebp - 0x226], ax
jne 0x9d69fb
cmp word [ebp - 0x224], 0
je 0x9d6a1c
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.009d685a
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x9d6a68
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x9d69d5
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x9d6a50
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x9d6a75
push 0x9d65bb
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.009c6e80
add esp, 0x10
jmp 0x9d6a45
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.009c2cd2
leave
ret

Function at 0x9d7600
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x9d7611
pop esi
ret
push ebx
push edi
push esi
call fcn.009d75c9
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.009d305d
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x9d7639
push ebx
push esi
push edi
call fcn.009c37e0
add esp, 0xc
push 0
call fcn.009d3023
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x9d7a09
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.009d764e
Function at 0x9ddd15
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]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.009ddc91
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x9dde84
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x9dde84
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x9dde39
jg 0x9ddd71
test eax, eax
je 0x9dde2f
push 1
push 0x1000
call fcn.009d6284
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x9ddd94
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x9dde26
push 0x8000
push ebx
call fcn.009cf762
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x9dddbd
jg 0x9dddb8
cmp ecx, 0x1000
jb 0x9dddbd
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.009d98a6
add esp, 0x10
cmp eax, 0xffffffff
je 0x9dde02
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 0x9dddb8
jl 0x9ddde9
test ecx, ecx
jne 0x9dddaa
push dword [ebp - 0xc]
push ebx
call fcn.009cf762
push esi
call fcn.009d3023
add esp, 0xc
xor ebx, ebx
jmp 0x9dde92
cmp byte [edi + 0x24], 0
je 0x9dde19
cmp dword [edi + 0x20], 5
jne 0x9dde19
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x9dde24
mov ebx, dword [edi + 0x18]
jmp 0x9dde26
xor ebx, ebx
push esi
call fcn.009d3023
pop ecx
jmp 0x9dde92
test ecx, ecx
jg 0x9dddfb
jl 0x9dde39
test eax, eax
jae 0x9dddfb
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.009d2806
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x9dde59
cmp byte [edi + 0x1c], 0
je 0x9dddfb
jmp 0x9dde8a
push ebx
call fcn.009d7dde
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x9dddfb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x9dde92
cmp byte [edi + 0x1c], 0
je 0x9dde8f
mov ebx, dword [edi + 0x18]
jmp 0x9dde92
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.009d2806
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret