joyce8/EMBER2024-capa huggingface dataset:
Function at 0x52d1f0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x59a920
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
mov esi, ecx
lea ecx, [esp + 4]
call fcn.0052cda0
lea eax, [esp + 4]
lea ecx, [esi + 4]
push eax
mov dword [esp + 0x18], 0
call fcn.0052ce20
lea ecx, [esp + 4]
push ecx
lea ecx, [esi + 0x14]
call fcn.0052ce20
lea ecx, [esi + 0xc]
call fcn.00589961
lea ecx, [esi + 0x10]
call fcn.00589961
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x1c]
call fcn.0052e3b0
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x30]
call fcn.0052e3b0
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x44]
call fcn.0052e3b0
lea ecx, [esp + 8]
mov dword [esp + 0x14], 1
call fcn.005899d6
lea ecx, [esp + 4]
mov dword [esp + 0x14], 0xffffffff
call fcn.005899d6
mov ecx, dword [esp + 0xc]
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret
Function at 0x54cf50
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x59bad8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push esi
mov esi, ecx
lea ecx, [esp + 4]
call fcn.0054cb30
mov eax, dword [esp + 0x24]
lea ecx, [esp + 4]
push eax
mov dword [esp + 0x20], 0
call fcn.0054cba0
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
push ecx
push edx
lea ecx, [esp + 0xc]
push eax
push ecx
mov ecx, esi
call fcn.0054ce80
lea ecx, [esp + 4]
mov esi, eax
mov dword [esp + 0x1c], 0xffffffff
call fcn.0054cb50
mov ecx, dword [esp + 0x14]
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x1c
ret 0x10

Function at 0x54cf68
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x59bad8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push esi
mov esi, ecx
lea ecx, [esp + 4]
call fcn.0054cb30
mov eax, dword [esp + 0x24]
lea ecx, [esp + 4]
push eax
mov dword [esp + 0x20], 0
call fcn.0054cba0
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
push ecx
push edx
lea ecx, [esp + 0xc]
push eax
push ecx
mov ecx, esi
call fcn.0054ce80
lea ecx, [esp + 4]
mov esi, eax
mov dword [esp + 0x1c], 0xffffffff
call fcn.0054cb50
mov ecx, dword [esp + 0x14]
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x1c
ret 0x10
Function at 0x54f850
Capabilities:
Encode data using xor

Disassembly:
mov ecx, dword [esp + 8]
test ecx, ecx
jne 0x54f85b
xor eax, eax
ret
mov eax, dword [esp + 4]
push ebx
push esi
mov esi, dword [esp + 0x14]
cmp esi, 8
not eax
jb 0x54f95e
push edi
mov edi, esi
shr edi, 3
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
mov ebx, eax
shr ebx, 8
mov eax, dword [edx*4 + 0xf2afc4]
sub esi, 8
xor eax, ebx
inc ecx
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [edx*4 + 0xf2afc4]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [eax*4 + 0xf2afc4]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [edx*4 + 0xf2afc4]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [eax*4 + 0xf2afc4]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [edx*4 + 0xf2afc4]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [eax*4 + 0xf2afc4]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
shr eax, 8
mov edx, dword [edx*4 + 0xf2afc4]
xor eax, edx
inc ecx
dec edi
jne 0x54f876
pop edi
test esi, esi
je 0x54f980
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
shr eax, 8
mov edx, dword [edx*4 + 0xf2afc4]
xor eax, edx
inc ecx
dec esi
jne 0x54f962
pop esi
pop ebx
not eax
ret
Function at 0x5622f0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ecx
mov eax, dword [0xfb0ec8]
xor edx, edx
cmp eax, edx
jne 0x562316
xor eax, eax
mov byte [eax + 0xfb0dc8], al
inc eax
cmp eax, 0x100
jl 0x5622fe
mov dword [0xfb0ec8], 1
mov eax, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0x14]
push esi
push edi
mov ecx, 0x40
mov esi, 0xfb0dc8
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
cmp eax, edx
mov byte [ebx + 0x100], dl
mov byte [ebx + 0x101], dl
jle 0x5623a7
xor esi, esi
push ebp
mov byte [esp + 0x20], dl
xor ecx, ecx
mov edi, dword [esp + 0x20]
mov ebp, dword [esp + 0x18]
mov al, byte [esi + ebx]
and edi, 0xff
xor edx, edx
mov dl, byte [edi + ebp]
mov ebp, eax
and ebp, 0xff
add ecx, edx
add ecx, ebp
and ecx, 0x800000ff
jns 0x56237a
dec ecx
or ecx, 0xffffff00
inc ecx
mov byte [esp + 0x10], cl
mov ecx, dword [esp + 0x10]
and ecx, 0xff
mov dl, byte [ecx + ebx]
mov byte [esi + ebx], dl
mov byte [ecx + ebx], al
lea eax, [edi + 1]
cdq
idiv dword [esp + 0x1c]
inc esi
cmp esi, 0x100
mov byte [esp + 0x20], dl
jl 0x562348
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret

Function at 0x5623b0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov cl, byte [eax + 0x100]
mov dl, byte [eax + 0x101]
mov dword [ebp - 8], eax
mov byte [ebp - 1], cl
mov byte [ebp - 2], dl
xor ebx, ebx
mov bl, byte [ebp - 1]
xor edx, edx
mov dl, byte [ebp - 2]
mov esi, dword [ebp - 8]
mov edi, dword [ebp + 8]
xor eax, eax
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jle 0x562403
inc bl
mov al, byte [esi + ebx]
add dl, al
xchg byte [esi + edx], al
mov byte [esi + ebx], al
add al, byte [esi + edx]
mov al, byte [esi + eax]
xor byte [edi], al
inc edi
dec ecx
jne 0x5623ea
mov byte [ebp - 1], bl
mov byte [ebp - 2], dl
mov eax, dword [ebp + 0x10]
mov cl, byte [ebp - 1]
mov dl, byte [ebp - 2]
pop edi
pop esi
mov byte [eax + 0x100], cl
mov byte [eax + 0x101], dl
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x568d90
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x59c41e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, dword [esp + 0x18]
push esi
push edi
mov edi, ecx
mov ecx, dword [esp + 0x1c]
push eax
push ecx
mov ecx, edi
mov dword [esp + 0x10], edi
call fcn.005696b0
push 0x10
mov dword [esp + 0x18], 0
mov dword [edi], 0xf2d82c
call fcn.00589717
mov esi, eax
add esp, 4
mov dword [esp + 0x20], esi
mov al, 1
test esi, esi
mov byte [esp + 0x14], al
je 0x568e23
push 4
mov byte [esi + 8], al
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.00589717
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
mov byte [esp + 0x14], 2
je 0x568e1c
push 0
mov ecx, eax
call fcn.0055ff30
mov dword [esi + 0xc], eax
jmp 0x568e25
xor eax, eax
mov dword [esi + 0xc], eax
jmp 0x568e25
xor esi, esi
mov ecx, dword [esp + 0xc]
mov dword [edi + 0x30], esi
mov dword [edi + 0x34], 0
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret 8
Function at 0x4027fe
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40283d
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40283d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40283d
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x40283d
cmp dword [ecx + 0x74], 0xe
jbe 0x40283d
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x407f80
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x6000]
push edi
or ebp, 0xffffffff
jmp 0x407fa2
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x407fa9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x407f98
mov eax, 1
add ebx, ebx
jne 0x407fbb
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x407fb0
jne 0x407fcc
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x407fb0
xor ecx, ecx
sub eax, 3
jb 0x407fe0
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x408052
mov ebp, eax
add ebx, ebx
jne 0x407feb
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x407ff8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x40801c
inc ecx
add ebx, ebx
jne 0x408008
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x407ffd
jne 0x408019
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x407ffd
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x40803c
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x40802d
jmp 0x407f9e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x40803c
add edi, ecx
jmp 0x407f9e
pop esi
mov edi, esi
mov ecx, 0x8f
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x40805a
cmp byte [edi], 0
jne 0x40805a
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x40805f
lea edi, [esi + 0x5000]
mov eax, dword [edi]
or eax, eax
je 0x4080d7
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x8d64]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x8ddc]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x40808c
mov ecx, edi
jns 0x4080bb
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x8de4]
or eax, eax
je 0x4080d1
mov dword [ebx], eax
add ebx, 4
jmp 0x4080a9
call dword [esi + 0x8de0]
mov ebp, dword [esi + 0x8de8]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x217]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x40810b
sub esp, 0xffffff80
jmp 0x402130

Function at 0xd31bd8
Capabilities:
Encode data using xor

Disassembly:
jmp 0xd31be2
pushal
call 0xd31be8
pop ebp
sub ebp, 0x10
sub ebp, 0x931bd8
jmp 0xd31bfe
mov eax, 0x931bd8
add eax, ebp
add eax, 0x4c
mov ecx, 0x5b7
mov edx, 0x68a1ae02
xor byte [eax], dl
inc eax
dec ecx
jne 0xd31c15
jmp 0xd31c28
mov edi, ecx
mov dword [ebx + 0x202023e], ecx
add ebx, 0xfffffffa
add al, byte [edx]
add al, byte [ecx]
iretd
Function at 0x402d3b
Capabilities:
Delete registry key
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, esi
lea eax, [ebp - 4]
and esi, 0x300
push eax
mov eax, esi
and edi, 1
or al, 9
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004060a7
xor ebx, ebx
cmp eax, ebx
jne 0x402e1e
test byte [ebp + 0x10], 2
je 0x402d9c
push ebx
push ebx
push ebx
lea eax, [ebp - 8]
push ebx
push eax
lea eax, [ebp - 0x110]
mov dword [ebp - 8], ebx
push eax
push ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
cmp eax, 0x103
jne 0x402e03
lea eax, [ebp - 0x110]
push 0x105
push eax
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
jmp 0x402dd8
test edi, edi
jne 0x402e03
push dword [ebp + 0x10]
lea eax, [ebp - 0x110]
push eax
push dword [ebp - 4]
call fcn.00402d3b
test eax, eax
jne 0x402de1
lea eax, [ebp - 0x110]
push 0x105
push eax
push edi
push dword [ebp - 4]
call ebx
test eax, eax
je 0x402db1
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 3
call fcn.0040662d
test eax, eax
jne 0x402e13
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
jmp 0x402e1e
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 0x3eb
jmp 0x402e1e
push 0
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x403143
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
push ebx
push esi
mov esi, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 8], esi
test edi, edi
jne 0x403160
mov dword [ebp - 8], 0x8000
and dword [ebp - 4], 0
mov ebx, edi
test edi, edi
jne 0x40316f
mov ebx, 0x4178e0
mov eax, dword [ebp + 8]
test eax, eax
jl 0x403184
mov ecx, dword [0x424778]
add ecx, eax
push ecx
call fcn.00403335
lea eax, [ebp + 0x14]
push 4
push eax
call fcn.0040331f
test eax, eax
je 0x4032d6
test byte [ebp + 0x17], 0x80
je 0x4032bf
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, 0x40b850
mov dword [ebp - 0xc], eax
call fcn.00406752
and dword [ebp + 0x14], 0x7fffffff
mov eax, dword [ebp + 0x14]
mov dword [ebp + 8], eax
jle 0x403315
mov esi, 0x4000
cmp dword [ebp + 0x14], esi
jge 0x4031d4
mov esi, dword [ebp + 0x14]
mov edi, 0x4138e0
push esi
push edi
call fcn.0040331f
test eax, eax
je 0x4032d6
sub dword [ebp + 0x14], esi
mov dword [0x40b868], edi
mov dword [0x40b86c], esi
mov eax, dword [ebp - 8]
mov ecx, 0x40b850
mov dword [0x40b870], ebx
mov dword [0x40b874], eax
call fcn.00406772
test eax, eax
mov dword [ebp - 0x10], eax
jl 0x4032b7
mov esi, dword [0x40b870]
sub esi, ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
test byte [0x4247d4], 1
mov edi, eax
je 0x403276
sub eax, dword [ebp - 0xc]
cmp eax, 0xc8
ja 0x403243
cmp dword [ebp + 0x14], 0
jne 0x403276
mov eax, dword [ebp + 8]
push dword [ebp + 8]
sub eax, dword [ebp + 0x14]
push 0x64
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
push eax
lea eax, [ebp - 0x50]
push str....__d__
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x50]
push eax
push 0
call fcn.00405342
mov dword [ebp - 0xc], edi
test esi, esi
je 0x4032ab
cmp dword [ebp + 0x10], 0
jne 0x403293
push esi
push ebx
push dword [ebp + 0xc]
call fcn.00405e5b
test eax, eax
je 0x4032bb
add dword [ebp - 4], esi
jmp 0x40329f
add dword [ebp - 4], esi
sub dword [ebp - 8], esi
mov ebx, dword [0x40b870]
cmp dword [ebp - 0x10], 1
jne 0x4031f7
jmp 0x403315
cmp dword [ebp + 0x14], 0
jg 0x4031c7
jmp 0x403315
push 0xfffffffffffffffc
jmp 0x4032d8
push 0xfffffffffffffffe
jmp 0x4032d8
test edi, edi
je 0x40330a
cmp dword [ebp + 0x14], esi
jge 0x4032cb
mov esi, dword [ebp + 0x14]
push esi
push edi
call fcn.0040331f
test eax, eax
jne 0x403312
push 0xfffffffffffffffd
pop eax
jmp 0x403318
mov esi, dword [ebp - 8]
cmp dword [ebp + 0x14], esi
jge 0x4032e6
mov esi, dword [ebp + 0x14]
mov edi, 0x4138e0
push esi
push edi
call fcn.0040331f
test eax, eax
je 0x4032d6
push esi
push edi
push dword [ebp + 0xc]
call fcn.00405e5b
test eax, eax
je 0x4032bb
add dword [ebp - 4], esi
sub dword [ebp + 0x14], esi
cmp dword [ebp + 0x14], 0
jg 0x4032db
jmp 0x403315
mov dword [ebp - 4], esi
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x405808
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, 0x408384
and byte [ebp - 0x1f], 0
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x20]
and dword [ebp - 0x14], 0
and dword [ebp - 4], 0
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push esi
push eax
mov byte [ebp - 0x20], 1
push dword [ebp + 8]
mov word [ebp - 0x1e], 4
mov dword [ebp - 0x10], 0x408374
mov dword [ebp - 0xc], 0xc
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x405859
xor eax, eax
jmp 0x405880
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0xb7
jne 0x405880
lea eax, [ebp - 0x20]
push eax
push 0x80000007
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityA]
test eax, eax
jne 0x405855
call esi
pop esi
leave
ret 4

Function at 0x4058ba
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
lea eax, [ebp - 0x10]
mov dword [0x422530], 0x44
push eax
xor eax, eax
push 0x422530
push eax
push eax
push 0x4000000
push eax
push eax
push eax
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x4058f9
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
leave
ret 4

Function at 0x4058fd
Capabilities:
Create process on windows

Disassembly:
mov eax, dword [esp + 4]
push eax
and dword [eax + 0x24], 0
mov dword [eax], 0x3c
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
ret 4

Function at 0x40599b
Capabilities:
Delete directory
Delete file
Set file attributes

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
push esi
call fcn.00405d8f
mov edi, eax
cmp edi, 0xffffffff
je 0x4059dc
test byte [esp + 0x10], 1
push esi
je 0x4059be
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
jmp 0x4059c4
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x4059cd
xor eax, eax
inc eax
jmp 0x4059de
test byte [esp + 0x10], 4
jne 0x4059dc
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
xor eax, eax
pop edi
pop esi
ret 8
Function at 0x4059e3
Capabilities:
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14c
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, ebx
and eax, 4
push edi
mov dword [ebp - 4], eax
call fcn.00405ca1
test bl, 8
mov dword [ebp - 0xc], eax
je 0x405a22
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
inc eax
add dword [0x4247a8], eax
jmp 0x405bac
mov dword [ebp + 8], ebx
and dword [ebp + 8], 1
je 0x405a3c
test eax, eax
je 0x405b5a
test bl, 2
je 0x405b5a
mov esi, 0x421d30
push edi
push esi
call fcn.00406221
cmp dword [ebp + 8], 0
je 0x405a5b
push str..
push esi
call sub.KERNEL32.dll_lstrcatA
jmp 0x405a61
push edi
call fcn.00405bfa
cmp byte [edi], 0
jne 0x405a6f
cmp byte [0x421d30], 0x5c
jne 0x405a7a
push 0x40a014
push edi
call sub.KERNEL32.dll_lstrcatA
push edi
call sub.KERNEL32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x14c]
push eax
push esi
add ebx, edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
je 0x405b50
lea eax, [ebp - 0x120]
push 0x3f
push eax
lea esi, [ebp - 0x120]
call fcn.00405bde
cmp byte [eax], 0
je 0x405ac0
cmp byte [ebp - 0x1c], 0
je 0x405ac0
lea esi, [ebp - 0x1c]
cmp byte [esi], 0x2e
jne 0x405ad6
mov al, byte [esi + 1]
test al, al
je 0x405b2f
cmp al, 0x2e
jne 0x405ad6
cmp byte [esi + 2], 0
je 0x405b2f
push esi
push ebx
call fcn.00406221
test byte [ebp - 0x14c], 0x10
je 0x405afb
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x405b2f
push dword [ebp + 0xc]
push edi
call fcn.004059e3
jmp 0x405b2f
push dword [ebp - 4]
push edi
call fcn.0040599b
test eax, eax
jne 0x405b27
cmp dword [ebp - 4], eax
je 0x405b1f
push edi
push 0xfffffffffffffff1
call fcn.00405342
push 0
push edi
call fcn.00405ffa
jmp 0x405b2f
inc dword [0x4247a8]
jmp 0x405b2f
push edi
push 0xfffffffffffffff2
call fcn.00405342
lea eax, [ebp - 0x14c]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x405a9e
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 0
je 0x405b5a
and byte [ebx - 1], 0
xor esi, esi
cmp dword [ebp + 8], esi
je 0x405bac
cmp dword [ebp - 0xc], esi
jne 0x405b6e
inc dword [0x4247a8]
jmp 0x405bac
push edi
call fcn.00406598
test eax, eax
je 0x405bac
push edi
call fcn.00405bb3
mov eax, dword [ebp - 4]
or al, 1
push eax
push edi
call fcn.0040599b
test eax, eax
jne 0x405ba4
cmp dword [ebp - 4], esi
je 0x405b66
push edi
push 0xfffffffffffffff1
call fcn.00405342
push esi
push edi
call fcn.00405ffa
jmp 0x405bac
push edi
push 0xffffffffffffffe5
call fcn.00405342
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x405ca1
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x422130
push esi
call fcn.00406221
push esi
call fcn.00405c4c
mov edi, eax
test edi, edi
jne 0x405cc2
xor eax, eax
jmp 0x405d14
push edi
call fcn.004064ff
test byte [0x424738], 0x80
je 0x405cdb
mov al, byte [edi]
test al, al
je 0x405cbe
cmp al, 0x5c
je 0x405cbe
sub edi, esi
jmp 0x405cf3
call fcn.00406598
test eax, eax
je 0x405ced
test byte [eax], 0x10
je 0x405cbe
push esi
call fcn.00405bfa
push esi
call sub.KERNEL32.dll_lstrlenA
cmp eax, edi
push esi
jg 0x405cdf
call fcn.00405bb3
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop edi
pop esi
ret 4

Function at 0x405d8f
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push esi
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov esi, eax
cmp esi, 0xffffffff
je 0x405dae
and al, 0xfe
push eax
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov eax, esi
pop esi
ret 4

Function at 0x405db4
Capabilities:
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ecx, eax
push 0
inc ecx
neg ecx
sbb ecx, ecx
and ecx, eax
push ecx
push dword [esp + 0x14]
push 0
push 1
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
ret 0xc

Function at 0x405de3
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
push 0x64
pop edi
mov eax, dword [0x40a3d4]
dec edi
mov dword [ebp + 8], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x1a
xor edx, edx
pop ecx
div ecx
push esi
lea eax, [ebp + 8]
push 0
push eax
push dword [ebp + 0xc]
add byte [ebp + 0xa], dl
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x405e28
test edi, edi
jne 0x405dee
and byte [esi], 0
pop edi
pop esi
pop ebp
ret 8
mov eax, esi
jmp 0x405e22