joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4fbc53
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 + 0x684040]
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 0x4fbc93
cmp byte [ebx], 0xa
jne 0x4fbc93
or byte [edi + eax + 0x28], 4
jmp 0x4fbc98
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 0x4fbd97
mov dl, byte [eax]
cmp dl, 0x1a
je 0x4fbd7a
inc eax
cmp dl, 0xd
je 0x4fbcc4
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x4fbcea
cmp eax, ecx
jae 0x4fbcf8
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 0x4fbcac
jmp 0x4fbd97
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 0x4fbd75
cmp dword [ebp - 0x10], 0
je 0x4fbd75
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x684040]
test byte [eax + edi + 0x28], 0x48
je 0x4fbd4f
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4fbd3a
mov byte [esi], dl
jmp 0x4fbd4b
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x684040]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x4fbd97
cmp byte [ebp - 1], 0xa
jne 0x4fbd5e
cmp esi, ebx
jne 0x4fbd5e
mov byte [esi], 0xa
jmp 0x4fbd96
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004fc7d9
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x4fbd97
mov byte [esi], 0xd
jmp 0x4fbd96
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x684040]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4fbd94
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4fbd97
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4fbda0
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 + 0x684040]
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 0x4fbde6
cmp word [ebx], dx
jne 0x4fbde6
or byte [eax + edi + 0x28], 4
jmp 0x4fbdeb
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 0x4fbf4e
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 0x4fbf2e
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x4fbe2c
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x4fbe62
cmp eax, edx
jae 0x4fbe70
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 0x4fbe07
jmp 0x4fbf4e
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 0x4fbf29
cmp dword [ebp - 0x18], 0
je 0x4fbf29
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x684040]
test byte [eax + edi + 0x28], 0x48
je 0x4fbeff
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 0x4fbec3
mov word [esi], cx
jmp 0x4fbefa
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x684040]
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 + 0x684040]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x684040]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x4fbf4e
pop eax
cmp word [ebp - 4], ax
jne 0x4fbf0f
cmp esi, ebx
jne 0x4fbf0f
mov word [esi], ax
jmp 0x4fbf4b
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.004fc7d9
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x4fbf4e
push 0xd
pop eax
jmp 0x4fbf0a
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x684040]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x4fbf48
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x4fbf4e
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 0x4fefc5
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x56b1c8
push 0x56b1c0
push str.FlsAlloc
push 0x1f
call fcn.004fee84
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4feff9
push dword [ebp + 8]
mov ecx, esi
call dword [0x50a50c]
call esi
jmp 0x4fefff
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x4ff043
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x56b1d8
push 0x56b1d0
push str.FlsGetValue
push 0x21
call fcn.004fee84
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4ff07a
push dword [ebp + 8]
mov ecx, esi
call dword [0x50a50c]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x4ff082
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x56b1e0
push 0x56b1d8
push str.FlsSetValue
push 0x22
call fcn.004fee84
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4ff0bc
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x50a50c]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x50197f
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 0x501a1c
push ebx
push esi
call fcn.00501948
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.004fe9c2
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x5019c9
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x501a1b
push edi
push eax
call fcn.004fc998
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x5019e9
call fcn.004fc95e
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x501a1a
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.004fe9c2
add esp, 0x20
test eax, eax
jne 0x501a08
push edi
call fcn.004fc95e
jmp 0x501a10
push ebx
call fcn.004fc95e
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 0x508507
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.00508483
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x508676
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x508676
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x50862b
jg 0x508563
test eax, eax
je 0x508621
push 1
push 0x1000
call fcn.004fdbb7
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x508586
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x508618
push 0x8000
push ebx
call fcn.004f9842
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x5085af
jg 0x5085aa
cmp ecx, 0x1000
jb 0x5085af
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.004fae2a
add esp, 0x10
cmp eax, 0xffffffff
je 0x5085f4
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 0x5085aa
jl 0x5085db
test ecx, ecx
jne 0x50859c
push dword [ebp - 0xc]
push ebx
call fcn.004f9842
push esi
call fcn.004fc95e
add esp, 0xc
xor ebx, ebx
jmp 0x508684
cmp byte [edi + 0x24], 0
je 0x50860b
cmp dword [edi + 0x20], 5
jne 0x50860b
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x508616
mov ebx, dword [edi + 0x18]
jmp 0x508618
xor ebx, ebx
push esi
call fcn.004fc95e
pop ecx
jmp 0x508684
test ecx, ecx
jg 0x5085ed
jl 0x50862b
test eax, eax
jae 0x5085ed
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004fc7d9
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x50864b
cmp byte [edi + 0x1c], 0
je 0x5085ed
jmp 0x50867c
push ebx
call fcn.00502173
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x5085ed
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 0x508684
cmp byte [edi + 0x1c], 0
je 0x508681
mov ebx, dword [edi + 0x18]
jmp 0x508684
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.004fc7d9
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x508b50
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x508b7d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x508b7d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x402ac5
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push ebx
push esi
lea eax, [ebp - 4]
push edi
push eax
mov eax, dword [0x42ecd0]
or al, 8
xor ebx, ebx
push eax
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x402b59
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov edi, 0x105
jmp 0x402b16
cmp dword [ebp + 0x10], ebx
jne 0x402b4d
lea eax, [ebp - 0x10c]
push ebx
push eax
push dword [ebp - 4]
call fcn.00402ac5
test eax, eax
jne 0x402b28
lea eax, [ebp - 0x10c]
push edi
push eax
push ebx
push dword [ebp - 4]
call esi
test eax, eax
je 0x402afd
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 2
call fcn.00405dfc
cmp eax, ebx
je 0x402b60
push ebx
push dword [0x42ecd0]
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
jmp 0x402b59
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 0xc
cmp dword [0x42ecd0], ebx
jne 0x402b56
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
jne 0x402b56
jmp 0x402b59
Function at 0x402f93
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor edi, edi
cmp eax, edi
jl 0x402fc0
mov ecx, dword [0x42ec78]
push edi
add eax, ecx
push edi
push eax
mov dword [0x420c3c], eax
push dword [0x409024]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 4
pop esi
push esi
call fcn.004030be
cmp eax, edi
jl 0x4030b7
lea eax, [ebp - 4]
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
push eax
lea eax, [ebp + 8]
push esi
push eax
push dword [0x409024]
call ebx
test eax, eax
je 0x4030b4
cmp dword [ebp - 4], esi
jne 0x4030b4
push dword [ebp + 8]
add dword [0x420c3c], esi
call fcn.004030be
cmp eax, edi
mov dword [ebp - 8], eax
jl 0x4030b7
cmp dword [ebp + 0x10], edi
jne 0x403083
cmp dword [ebp + 8], edi
jle 0x4030af
mov esi, 0x41cbf8
mov edi, 0x4000
cmp dword [ebp + 8], edi
jge 0x403033
mov edi, dword [ebp + 8]
lea eax, [ebp - 4]
push 0
push eax
push edi
push esi
push dword [0x409024]
call ebx
test eax, eax
je 0x4030b4
cmp edi, dword [ebp - 4]
jne 0x4030b4
lea eax, [ebp + 0x14]
push 0
push eax
push dword [ebp - 4]
push esi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40307f
cmp dword [ebp + 0x14], edi
jne 0x40307f
mov eax, dword [ebp - 4]
add dword [ebp - 8], eax
sub dword [ebp + 8], eax
add dword [0x420c3c], eax
cmp dword [ebp + 8], 0
jg 0x403026
jmp 0x4030af
push 0xfffffffffffffffe
jmp 0x4030b6
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0x14]
jl 0x40308e
mov eax, dword [ebp + 0x14]
lea ecx, [ebp - 4]
push edi
push ecx
push eax
push dword [ebp + 0x10]
push dword [0x409024]
call ebx
test eax, eax
je 0x4030b4
mov eax, dword [ebp - 4]
add dword [0x420c3c], eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x4030b7
push 0xfffffffffffffffd
pop eax
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x4030be
Capabilities:
Check for time delay via gettickcount
Write file on windows

Disassembly:
push ecx
push ecx
push ebx
push ebp
push esi
xor ebp, ebp
push edi
mov dword [esp + 0x10], ebp
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, dword [0x420c3c]
mov edi, eax
sub esi, dword [0x40b034]
add edi, 0x1f4
add esi, dword [esp + 0x1c]
cmp esi, ebp
jle 0x403294
push dword [0x428c4c]
call fcn.004032d1
push ebp
push ebp
push dword [0x40b034]
push dword [0x409024]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [0x428c48], esi
mov dword [0x420c38], ebp
mov eax, dword [0x420c40]
mov ebx, 0x4000
sub eax, dword [0x428c4c]
cmp eax, ebx
jg 0x403131
mov ebx, eax
mov esi, 0x41cbf8
push ebx
push esi
call fcn.0040329f
test eax, eax
je 0x40325f
add dword [0x428c4c], ebx
mov dword [0x40b038], esi
mov dword [0x40b03c], ebx
cmp dword [0x42ec28], ebp
je 0x4031c2
cmp dword [0x42ecc0], ebp
jne 0x4031c2
cmp dword [esp + 0x10], ebp
je 0x40318f
mov eax, dword [0x428c48]
push ebp
sub eax, dword [0x420c3c]
sub eax, dword [esp + 0x20]
add eax, dword [0x40b034]
mov dword [0x420c38], eax
call fcn.00405e35
jmp 0x4031c2
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp eax, edi
jbe 0x4031c2
mov eax, dword [0x42ec24]
neg eax
sbb eax, eax
not eax
and eax, str.unpacking_data:__d__
push eax
push 0x402bca
push ebp
push 0x6f
push dword [0x42ec20]
call dword [sym.imp.USER32.dll_CreateDialogParamA]
mov dword [esp + 0x10], eax
push 0x40b038
mov dword [0x40b040], 0x414bf8
mov dword [0x40b044], 0x8000
call fcn.00405ed6
test eax, eax
jl 0x403268
mov esi, dword [0x40b040]
mov eax, 0x414bf8
sub esi, eax
je 0x403229
lea ecx, [esp + 0x14]
push ebp
push ecx
push esi
push eax
push dword [0x409024]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403264
cmp esi, dword [esp + 0x14]
jne 0x403264
add dword [0x40b034], esi
cmp dword [0x40b03c], ebp
jne 0x403157
jmp 0x403235
cmp dword [0x40b03c], ebp
jne 0x403268
cmp ebx, ebp
je 0x403268
mov eax, dword [0x420c3c]
mov ecx, eax
sub ecx, dword [0x40b034]
add ecx, dword [esp + 0x1c]
test ecx, ecx
jg 0x40311b
push ebp
push ebp
push eax
push dword [0x409024]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x40326d
or eax, 0xffffffff
jmp 0x403296
push 0xfffffffffffffffe
jmp 0x40326a
push 0xfffffffffffffffd
pop eax
jmp 0x403296
mov esi, dword [esp + 0x10]
cmp esi, ebp
je 0x403294
mov eax, dword [0x428c48]
push ebp
push ebp
push 0x113
push esi
mov dword [0x420c38], eax
call dword [sym.imp.USER32.dll_SendMessageA]
push esi
call dword [sym.imp.USER32.dll_DestroyWindow]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret 4
Function at 0x405383
Capabilities:
Create process on windows

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

Function at 0x405448
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x148
push ebx
mov ebx, dword [ebp + 8]
push esi
push ebx
call fcn.004056ea
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 8], eax
test cl, 8
je 0x40547e
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
inc eax
add dword [0x42eca8], eax
jmp 0x405603
mov dword [ebp + 8], ecx
push edi
and dword [ebp + 8], 1
je 0x405499
test eax, eax
je 0x4055ae
test cl, 2
je 0x4055ae
mov esi, 0x42b0a0
push ebx
push esi
call fcn.00405b16
cmp dword [ebp + 8], 0
je 0x4054b8
push str..
push esi
call sub.KERNEL32.dll_lstrcatA
jmp 0x4054be
push ebx
call fcn.00405650
push 0x409010
push ebx
call sub.KERNEL32.dll_lstrcatA
push ebx
call sub.KERNEL32.dll_lstrlenA
mov edi, eax
lea eax, [ebp - 0x148]
push eax
push esi
add edi, ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x4055a4
lea eax, [ebp - 0x11c]
push 0x3f
push eax
lea esi, [ebp - 0x11c]
call fcn.00405634
cmp byte [eax], 0
je 0x40550f
cmp byte [ebp - 0x18], 0
je 0x40550f
lea esi, [ebp - 0x18]
cmp byte [esi], 0x2e
jne 0x405525
mov al, byte [esi + 1]
test al, al
je 0x405583
cmp al, 0x2e
jne 0x405525
cmp byte [esi + 2], 0
je 0x405583
push esi
push edi
call fcn.00405b16
test byte [ebp - 0x148], 0x10
je 0x40554a
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x405583
push dword [ebp + 0xc]
push ebx
call fcn.00405448
jmp 0x405583
push ebx
call fcn.004057ce
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x40557b
test byte [ebp + 0xc], 4
je 0x405573
push ebx
push 0xfffffffffffffff1
call fcn.00404ec1
push 0
push ebx
call fcn.00405864
jmp 0x405583
inc dword [0x42eca8]
jmp 0x405583
push ebx
push 0xfffffffffffffff2
call fcn.00404ec1
lea eax, [ebp - 0x148]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4054ed
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 0
je 0x4055ae
and byte [edi - 1], 0
xor esi, esi
pop edi
cmp dword [ebp + 8], esi
je 0x405603
cmp dword [ebp - 8], esi
jne 0x4055c3
inc dword [0x42eca8]
jmp 0x405603
push ebx
call fcn.00405dbe
test eax, eax
je 0x405603
push ebx
call fcn.00405609
push ebx
call fcn.004057ce
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x4055fb
test byte [ebp + 0xc], 4
je 0x4055bb
push ebx
push 0xfffffffffffffff1
call fcn.00404ec1
push esi
push ebx
call fcn.00405864
jmp 0x405603
push ebx
push 0xffffffffffffffe5
call fcn.00404ec1
pop esi
pop ebx
leave
ret 8
Function at 0x4056ea
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x42b4a0
push esi
call fcn.00405b16
push esi
call fcn.0040569d
mov edi, eax
test edi, edi
jne 0x40570b
xor eax, eax
jmp 0x40575d
push edi
call fcn.00405d25
test byte [0x42ec30], 0x80
je 0x405724
mov al, byte [edi]
test al, al
je 0x405707
cmp al, 0x5c
je 0x405707
sub edi, esi
jmp 0x40573c
call fcn.00405dbe
test eax, eax
je 0x405736
test byte [eax], 0x10
je 0x405707
push esi
call fcn.00405650
push esi
call sub.KERNEL32.dll_lstrlenA
cmp eax, edi
push esi
jg 0x405728
call fcn.00405609
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 0x4057ce
Capabilities:
Check if file exists
Get file attributes
Set file attributes

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

Function at 0x4057ed
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 0x40581c
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
push 0x64
pop edi
dec edi
mov dword [ebp + 8], 0x61736e
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 0x405860
test edi, edi
jne 0x405827
and byte [esi], 0
pop edi
pop esi
pop ebp
ret 8
mov eax, esi
jmp 0x40585a
Function at 0x405864
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebx
push ebp
push esi
push edi
push 1
call fcn.00405dfc
test eax, eax
mov esi, dword [esp + 0x18]
je 0x405888
push 5
push esi
push dword [esp + 0x1c]
call eax
test eax, eax
jne 0x4059c1
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov dword [0x42c228], 0x4c554e
test esi, esi
mov edi, 0x400
mov ebp, 0x42c228
je 0x4058cc
push 1
push 0
push esi
call fcn.004057ed
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebp
push esi
call ebx
test eax, eax
je 0x4059c7
cmp eax, edi
jg 0x4059c7
mov esi, 0x42bca0
push edi
push esi
push dword [esp + 0x1c]
call ebx
test eax, eax
je 0x4059c7
cmp eax, edi
jg 0x4059c7
push esi
push ebp
push str._s_s_r_n
push 0x42b8a0
call dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, eax
mov eax, dword [0x42ec28]
add esp, 0x10
push dword [eax + 0x128]
push esi
call fcn.00405b38
push 4
push 0xc0000000
push esi
call fcn.004057ed
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x14], ebp
je 0x4059c1
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea eax, [edi + ebx + 0xa]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
je 0x4059ba
lea eax, [esp + 0x18]
push 0
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4059ba
cmp edi, dword [esp + 0x18]
jne 0x4059ba
push str._Rename__r_n
push esi
call fcn.00405762
test eax, eax
jne 0x4059ce
lea eax, [esi + edi]
push str._Rename__r_n
push eax
call fcn.00405b16
add edi, 0xa
mov eax, edi
push ebx
add eax, esi
push 0x42b8a0
push eax
call fcn.004057ae
xor eax, eax
push eax
push eax
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esp + 0x18]
push 0
add edi, ebx
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [0x42ecb0]
pop edi
pop esi
pop ebp
pop ebx
ret 8
add eax, 0xa
push 0x4093a0
push eax
call fcn.00405762
test eax, eax
je 0x405985
inc eax
lea ecx, [esi + edi]
cmp eax, ecx
mov ebp, eax
jae 0x4059f5
mov dl, byte [ebp]
mov byte [ebx + ebp], dl
inc ebp
cmp ebp, ecx
jb 0x4059ea
mov ebp, dword [esp + 0x14]
sub eax, esi
jmp 0x405987
Function at 0x4059fd
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
lea eax, [ebp + 0x18]
push esi
push eax
mov eax, dword [ebp + 0x18]
xor ebx, ebx
neg eax
sbb eax, eax
mov esi, dword [ebp + 0x14]
and eax, 0x100
or eax, 0x20019
mov byte [esi], bl
push eax
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405a6e
lea eax, [ebp + 0xc]
mov dword [ebp + 0xc], 0x400
push eax
lea eax, [ebp + 0x14]
push esi
push eax
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405a5d
cmp dword [ebp + 0x14], 1
je 0x405a5f
cmp dword [ebp + 0x14], 2
je 0x405a5f
mov byte [esi], bl
push dword [ebp + 0x18]
mov byte [esi + 0x3ff], bl
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
pop ebp
ret 0x14