joyce8/EMBER2024-capa huggingface dataset:
Function at 0x49fc70
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov eax, dword [ebp + 8]
test eax, eax
je 0x49fcc8
lea edi, [edx + eax*2]
xor ebx, ebx
movzx esi, byte [edx + 1]
cmp byte [edx], ch
lea edx, [edx + 2]
lea eax, [ebx + esi]
jne 0x49fcc0
cmp eax, ebx
jb 0x49fd36
cmp eax, dword [ebp + 0x10]
ja 0x49fd42
add ebx, dword [ebp + 0xc]
nop word cs:[eax + eax]
nop
test esi, esi
je 0x49fcc2
dec esi
cmp byte [ebx], cl
lea ebx, [ebx + 1]
jne 0x49fcb0
jmp 0x49fd1f
ja 0x49fcc8
cmp edx, edi
mov ebx, eax
jne 0x49fc82
mov edx, dword [ebp + 0x18]
test edx, edx
je 0x49fd23
mov esi, dword [ebp + 0x14]
movzx ecx, cx
mov al, 1
add edx, esi
nop dword [eax]
movzx ebx, byte [esi]
lea edi, [esi + 1]
test bl, bl
js 0x49fd00
mov esi, edi
sub ecx, ebx
jns 0x49fd17
jmp 0x49fd25
cmp edi, edx
je 0x49fd2c
movzx edi, byte [esi + 1]
and ebx, 0x7f
add esi, 2
shl ebx, 8
or ebx, edi
sub ecx, ebx
js 0x49fd25
xor al, 1
cmp esi, edx
jne 0x49fce0
jmp 0x49fd25
xor eax, eax
jmp 0x49fd25
mov al, 1
and al, 1
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x59fed4
call fcn.004978f0
push 0x59fee4
push eax
push ebx
call fcn.0049d510
push 0x59fee4
push dword [ebp + 0x10]
push eax
call fcn.0049d4b0
Function at 0x4b2fc0
Capabilities:
Allocate thread local storage

Disassembly:
sub esp, 0xc
call dword [sym.imp.kernel32.dll_TlsAlloc]
mov dword [0x4c80d4], eax
cmp eax, 0xffffffff
je 0x4c3f40
add esp, 0xc
ret

Function at 0x4b34d0
Capabilities:
Print debug messages

Disassembly:
test eax, eax
je 0x4b3500
push edi
push esi
push ebx
mov ebx, eax
add esp, 0xffffff80
mov dword [esp], eax
call fcn.004b6620
cmp eax, 1
je 0x4b3501
mov dword [ebx], 0xffffffff
sub esp, 0xffffff80
pop ebx
pop esi
pop edi
ret
ret
lea ebx, [esp + 0x15]
xor eax, eax
mov esi, str.Error_cleaning_up_spin_keys_for_thread
mov ecx, 0xa
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
lea edi, [esp + 0x3d]
mov ecx, 0x43
rep stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea edx, [esp + 0x3c]
mov dword [esp + 8], 0xa
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__ultoa]
cmp byte [esp + 0x3c], 0
mov eax, 0x27
jne 0x4b3555
jmp 0x4b3563
cmp eax, 0x6a
je 0x4b356d
add eax, 1
cmp byte [ebx + eax], 0
jne 0x4b3550
cmp eax, 0x6a
je 0x4b356d
mov byte [esp + eax + 0x15], 0xa
mov byte [esp + eax + 0x16], 0
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push eax
call sub.msvcrt.dll_abort
lea esi, [esi]

Function at 0x4b3610
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
cmp dword [0x5cc1b0], 1
je 0x4b3625
call fcn.004b3580
mov eax, dword [0x4c80d4]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
sub esp, 4
mov esi, eax
test eax, eax
je 0x4b3650
add esp, 0x2c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.004b3420
mov ebx, eax
mov eax, dword [entry4]
test eax, eax
je 0x4b363c
test ebx, ebx
je 0x4b363c
mov dword [ebx + 0x24], 1
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebx + 0x3c], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [ebx + 0x1c], 0xffffffff
mov dword [ebx + 0x18], eax
sub esp, 0x10
lea eax, [ebx + 0x38]
call fcn.004b34d0
mov esi, dword [sym.imp.kernel32.dll_GetCurrentProcess]
mov dword [ebx + 0x64], 0
mov dword [ebx + 0x14], 0
call esi
mov ebp, eax
call dword [sym.imp.kernel32.dll_GetCurrentThread]
mov edi, eax
call esi
lea edx, [ebx + 0x14]
mov dword [esp + 8], ebp
mov dword [esp + 0x18], 2
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_DuplicateHandle]
sub esp, 0x1c
test eax, eax
je 0x4c3f45
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov dword [ebx + 0x68], 0
mov dword [ebx + 0x6c], eax
movzx eax, byte [ebx + 0x20]
sub esp, 4
and eax, 0xffffffcf
or eax, 0x10
mov byte [ebx + 0x20], al
mov eax, dword [0x4c80d4]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
sub esp, 8
test eax, eax
je 0x4c3f45
add esp, 0x2c
mov esi, ebx
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x4b3890
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push edi
push esi
push ebx
sub esp, 0x10
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x4b38c0
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x4b3970
add esp, 0x10
mov eax, 1
pop ebx
pop esi
pop edi
ret 0xc
cmp eax, 1
je 0x4b39a0
cmp eax, 3
jne 0x4b38aa
mov eax, dword [0x4c80d4]
cmp eax, 0xffffffff
je 0x4b38aa
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
test eax, eax
je 0x4b38aa
test byte [eax + 0x20], 0x30
je 0x4b39d0
mov eax, dword [eax + 0xb4]
test eax, eax
je 0x4b3903
call fcn.004b37a0
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x4b3935
mov dword [esp], eax
mov esi, dword [sym.imp.kernel32.dll_CloseHandle]
call esi
mov eax, dword [ebx + 0x18]
sub esp, 4
test eax, eax
je 0x4b3927
mov dword [esp], eax
call esi
sub esp, 4
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x14], 0
lea eax, [ebx + 0x1c]
mov dword [esp], eax
call fcn.004b2d40
lea eax, [ebx + 0x38]
call fcn.004b34d0
mov eax, ebx
call fcn.004b31b0
mov eax, dword [0x4c80d4]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
sub esp, 8
jmp 0x4b38aa
mov eax, dword [0x5cc18c]
test eax, eax
je 0x4b38aa
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_RemoveVectoredExceptionHandler]
mov dword [0x5cc18c], 0
sub esp, 4
jmp 0x4b38aa
mov dword [esp + 4], 0x4b2ef0
mov dword [esp], 1
call dword [sym.imp.kernel32.dll_AddVectoredExceptionHandler]
sub esp, 8
mov dword [0x5cc18c], eax
mov eax, 1
add esp, 0x10
pop ebx
pop esi
pop edi
ret 0xc
mov edx, dword [ebx + 0x68]
mov eax, dword [eax + 0x18]
test edx, edx
jne 0x4b3a42
test eax, eax
je 0x4b39ea
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
mov eax, dword [ebx + 0xb4]
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x68], 1
test eax, eax
je 0x4b3a07
call fcn.004b37a0
lea edi, [ebx + 0x1c]
lea esi, [ebx + 0x38]
test byte [ebx + 0x24], 4
je 0x4b3a71
mov eax, dword [ebx + 0x14]
mov dword [ebx], 0xdeadbeef
test eax, eax
je 0x4b3a2c
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
mov dword [ebx + 0x14], 0
mov dword [esp], edi
call fcn.004b2d40
mov eax, esi
jmp 0x4b3943
test eax, eax
je 0x4b3a52
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
lea eax, [ebx + 0x1c]
mov dword [ebx + 0x18], 0
mov dword [esp], eax
call fcn.004b2d40
lea eax, [ebx + 0x38]
call fcn.004b34d0
jmp 0x4b38aa
mov dword [esp], edi
call fcn.004b2d40
mov eax, esi
call fcn.004b34d0
jmp 0x4b38aa
Function at 0x4b4400
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
mov esi, dword [esp + 0x20]
call fcn.004b3610
mov ebx, eax
mov dword [eax + 4], esi
mov eax, dword [eax + 0xb4]
test eax, eax
je 0x4b4422
call fcn.004b37a0
test byte [ebx + 0x20], 0x30
jne 0x4b443b
add ebx, 0x70
mov dword [esp + 4], 1
mov dword [esp], ebx
call sub.msvcrt.dll_longjmp
mov eax, dword [0x4c80d4]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov ebx, eax
push edx
test eax, eax
je 0x4b447e
cmp dword [ebx + 0x14], 0
mov eax, dword [eax + 0x18]
je 0x4b44c2
mov esi, dword [ebx + 4]
mov dword [ebx + 0x68], 1
test eax, eax
je 0x4b4471
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
push ecx
mov dword [ebx + 0x18], 0
test byte [ebx + 0x24], 4
jne 0x4b4487
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__endthreadex]
mov eax, dword [ebx + 0x14]
mov dword [ebx], 0xdeadbeef
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
push edx
mov dword [ebx + 0x14], 0
mov eax, ebx
call fcn.004b31b0
mov eax, dword [0x4c80d4]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
push eax
push eax
jmp 0x4b447e
mov dword [ebx], 0xdeadbeef
test eax, eax
je 0x4b44d6
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
push esi
mov dword [ebx + 0x18], 0
mov esi, dword [ebx + 4]
jmp 0x4b44a1

Function at 0x4b7fb0
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call fcn.004b7c90
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call fcn.004b7c90
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
lea esi, [esi]
Function at 0x4b8010
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
sub esp, 0x30
mov esi, dword [0x5cc1f0]
test esi, esi
jle 0x4b8130
mov edi, dword [0x5cc1f4]
xor ebx, ebx
lea edx, [edi + 0xc]
nop
mov ecx, dword [edx]
cmp ecx, eax
ja 0x4b8044
mov edi, dword [edx + 4]
add ecx, dword [edi + 8]
cmp eax, ecx
jb 0x4b80c9
add ebx, 1
add edx, 0x14
cmp ebx, esi
jne 0x4b8030
mov dword [esp], eax
mov ebx, eax
call fcn.004b8a10
mov edi, eax
test eax, eax
je 0x4b8157
mov eax, dword [0x5cc1f4]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call fcn.004b8b20
mov edx, dword [0x5cc1f4]
add eax, dword [edi + 0xc]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x4b8137
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x4b80c2
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x4b80d0
add dword [0x5cc1f0], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 0x40
mov eax, 4
mov ecx, dword [esp + 0x20]
cmovne eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x5cc1f4]
mov dword [ebx + 8], ecx
mov dword [ebx + 4], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call dword [sym.imp.kernel32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x4b80c2
call dword [sym.imp.kernel32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.004b7fb0
lea esi, [esi]
lea edi, [edi]
xor esi, esi
jmp 0x4b804e
mov eax, dword [0x5cc1f4]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.004b7fb0
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call fcn.004b7fb0
mov esi, esi
lea edi, [edi]

Function at 0x4b8650
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x5cc20c
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x5cc204]
sub esp, 4
test ebx, ebx
je 0x4b86a5
mov ebp, dword [sym.imp.kernel32.dll_TlsGetValue]
mov edi, dword [sym.imp.kernel32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x4b869e
test esi, esi
je 0x4b869e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x4b8680
mov dword [esp], 0x5cc20c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x4bfa5c
Capabilities:
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
push edi
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
push esi
push ebx
mov ebx, dword [ebp + 0xc]
not eax
mov ecx, ebx
lea esi, [edi + ebx]
mov edx, esi
sub edx, ecx
cmp edx, 3
jbe 0x4bfac7
mov edx, eax
xor al, byte [ecx]
add ecx, 4
movzx eax, al
shr edx, 8
xor edx, dword [eax*4 + 0x5ab440]
mov eax, edx
xor dl, byte [ecx - 3]
movzx edx, dl
shr eax, 8
xor eax, dword [edx*4 + 0x5ab440]
mov edx, eax
xor al, byte [ecx - 2]
movzx eax, al
shr edx, 8
xor edx, dword [eax*4 + 0x5ab440]
mov eax, edx
xor dl, byte [ecx - 1]
movzx edx, dl
shr eax, 8
xor eax, dword [edx*4 + 0x5ab440]
jmp 0x4bfa72
mov edx, edi
and edi, 3
and edx, 0xfffffffc
add edx, ebx
add edi, edx
cmp edx, edi
je 0x4bfaed
mov ecx, eax
xor al, byte [edx]
inc edx
movzx eax, al
shr ecx, 8
xor ecx, dword [eax*4 + 0x5ab440]
mov eax, ecx
jmp 0x4bfad3
pop ebx
not eax
pop esi
pop edi
pop ebp
ret
Function at 0x407d9c
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ebx
push esi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.004033fc
xor eax, eax
push ebp
push 0x407e75
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
cmp byte [eax], 0x5c
jne 0x407dd4
mov eax, dword [ebp - 4]
call fcn.004071d0
jmp 0x407ddc
mov eax, dword [ebp - 4]
call fcn.00407bd4
call fcn.00404ae8
mov esi, eax
test esi, esi
jle 0x407e28
mov ebx, 1
lea edx, [ebp - 8]
mov eax, ebx
call fcn.004049d0
mov eax, dword [ebp - 8]
cmp byte [eax], 0x5c
jne 0x407e12
lea edx, [ebp - 0xc]
mov eax, ebx
call fcn.004049d0
mov eax, dword [ebp - 0xc]
call fcn.004071d0
jmp 0x407e24
lea edx, [ebp - 0x10]
mov eax, ebx
call fcn.004049d0
mov eax, dword [ebp - 0x10]
call fcn.00407bd4
inc ebx
dec esi
jne 0x407dec
push 1
push dword [ebp - 4]
push 0x407e8c
lea edx, [ebp - 0x18]
xor eax, eax
call fcn.00406f34
push dword [ebp - 0x18]
lea eax, [ebp - 0x14]
mov edx, 3
call fcn.004032cc
mov eax, dword [ebp - 0x14]
call fcn.0040340c
push eax
call sub.kernel32.dll_WinExec
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x407e7c
lea eax, [ebp - 0x18]
mov edx, 6
call fcn.004030b8
ret

Function at 0x403090
Capabilities:
Packed with generic packer

Disassembly:
jae 0x4030fa
invalid
jl 0x403144
not dh
jae 0x403147
popfd
enter 0x5eff, 0x5d
ret
pop ebp
ret
sar dword [esi + ecx + 0x7f], 0xe9
cmp edx, esi
jbe 0x403158
mov eax, 0xbb000001
pop esi
pop ebp
ret
xor eax, eax
pop esi
pop ebp
retf
Function at 0x402b10
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
push ebx
push esi
lea eax, [ebp - 4]
push edi
push eax
mov eax, dword [0x7a7a90]
or al, 8
xor ebx, ebx
push eax
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x402ba4
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
mov edi, 0x105
jmp 0x402b61
cmp dword [ebp + 0x10], ebx
jne 0x402b98
lea eax, [ebp - 0x210]
push ebx
push eax
push dword [ebp - 4]
call fcn.00402b10
test eax, eax
jne 0x402b73
lea eax, [ebp - 0x210]
push edi
push eax
push ebx
push dword [ebp - 4]
call esi
test eax, eax
je 0x402b48
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 2
call fcn.00406097
cmp eax, ebx
je 0x402bab
push ebx
push dword [0x7a7a90]
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
jmp 0x402ba4
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 [0x7a7a90], ebx
jne 0x402ba1
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, eax
jne 0x402ba1
jmp 0x402ba4
Function at 0x4054af
Capabilities:
Create process on windows

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

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

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
push esi
call fcn.00405991
mov edi, eax
cmp edi, 0xffffffff
je 0x4055b5
test byte [esp + 0x10], 1
push esi
je 0x405597
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x40559d
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x4055a6
xor eax, eax
inc eax
jmp 0x4055b7
test byte [esp + 0x10], 4
jne 0x4055b5
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
xor eax, eax
pop edi
pop esi
ret 8
Function at 0x4055bc
Capabilities:
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x25c
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.0040589d
test bl, 8
mov dword [ebp - 0xc], eax
je 0x4055fb
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
neg eax
sbb eax, eax
inc eax
add dword [0x7a7a68], eax
jmp 0x40578e
mov dword [ebp + 8], ebx
and dword [ebp + 8], 1
je 0x405615
test eax, eax
je 0x40573c
test bl, 2
je 0x40573c
mov esi, 0x7a2ed8
push edi
push esi
call fcn.00405d2d
cmp dword [ebp + 8], 0
je 0x405634
push str..
push esi
call sub.KERNEL32.dll_lstrcatW
jmp 0x40563a
push edi
call fcn.004057e1
cmp word [edi], 0
jne 0x40564a
cmp word [0x7a2ed8], 0x5c
jne 0x405655
push 0x409014
push edi
call sub.KERNEL32.dll_lstrcatW
push edi
call sub.KERNEL32.dll_lstrlenW
lea ebx, [edi + eax*2]
lea eax, [ebp - 0x25c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
je 0x405731
lea eax, [ebp - 0x230]
push 0x3f
push eax
lea esi, [ebp - 0x230]
call fcn.004057c2
xor ecx, ecx
cmp word [eax], cx
je 0x40569c
cmp word [ebp - 0x28], cx
je 0x40569c
lea esi, [ebp - 0x28]
cmp word [esi], 0x2e
jne 0x4056b7
mov ax, word [esi + 2]
cmp ax, cx
je 0x405710
cmp ax, 0x2e
jne 0x4056b7
cmp word [esi + 4], cx
je 0x405710
push esi
push ebx
call fcn.00405d2d
test byte [ebp - 0x25c], 0x10
je 0x4056dc
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x405710
push dword [ebp + 0xc]
push edi
call fcn.004055bc
jmp 0x405710
push dword [ebp - 4]
push edi
call fcn.00405574
test eax, eax
jne 0x405708
cmp dword [ebp - 4], eax
je 0x405700
push edi
push 0xfffffffffffffff1
call fcn.00404fe1
push 0
push edi
call fcn.00405bc7
jmp 0x405710
inc dword [0x7a7a68]
jmp 0x405710
push edi
push 0xfffffffffffffff2
call fcn.00404fe1
lea eax, [ebp - 0x25c]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x405678
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 0
je 0x40573c
and word [ebx - 2], 0
xor esi, esi
cmp dword [ebp + 8], esi
je 0x40578e
cmp dword [ebp - 0xc], esi
jne 0x405750
inc dword [0x7a7a68]
jmp 0x40578e
push edi
call fcn.00406070
test eax, eax
je 0x40578e
push edi
call fcn.00405795
mov eax, dword [ebp - 4]
or al, 1
push eax
push edi
call fcn.00405574
test eax, eax
jne 0x405786
cmp dword [ebp - 4], esi
je 0x405748
push edi
push 0xfffffffffffffff1
call fcn.00404fe1
push esi
push edi
call fcn.00405bc7
jmp 0x40578e
push edi
push 0xffffffffffffffe5
call fcn.00404fe1
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x40589d
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x7a36d8
push esi
call fcn.00405d2d
push esi
call fcn.00405840
mov edi, eax
test edi, edi
jne 0x4058be
xor eax, eax
jmp 0x405916
push edi
call fcn.00405fc1
test byte [0x7a79f8], 0x80
je 0x4058db
mov ax, word [edi]
test ax, ax
je 0x4058ba
cmp ax, 0x5c
je 0x4058ba
sub edi, esi
sar edi, 1
jmp 0x4058f5
call fcn.00406070
test eax, eax
je 0x4058ef
test byte [eax], 0x10
je 0x4058ba
push esi
call fcn.004057e1
push esi
call sub.KERNEL32.dll_lstrlenW
cmp eax, edi
push esi
jg 0x4058e1
call fcn.00405795
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop edi
pop esi
ret 4

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

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

Function at 0x4059b6
Capabilities:
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
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_CreateFileW]
ret 0xc

Function at 0x4059e5
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
mov esi, dword [ebp + 8]
push edi
push 0x64
pop edi
mov eax, dword [0x40950c]
dec edi
mov dword [ebp - 8], eax
mov eax, dword [0x409510]
mov dword [ebp - 4], 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 word [ebp - 4], dx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x405a35
test edi, edi
jne 0x4059f2
and word [esi], di
pop edi
pop esi
leave
ret 8
mov eax, esi
jmp 0x405a2f
Function at 0x405a39
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov ebx, 0x7a4570
push 0x409530
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov esi, dword [esp + 0x1c]
mov ebp, dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
test esi, esi
mov edi, 0x400
je 0x405a88
push 1
push 0
push esi
call fcn.004059b6
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebx
push esi
call ebp
test eax, eax
je 0x405bc1
cmp eax, edi
jg 0x405bc1
mov esi, 0x7a4d70
push edi
push esi
push dword [esp + 0x20]
call ebp
test eax, eax
je 0x405bc1
cmp eax, edi
jg 0x405bc1
push esi
push ebx
push str._ls_ls_r_n
push 0x7a4170
call dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, eax
mov eax, dword [0x7a79f0]
add esp, 0x10
push dword [eax + 0x128]
push esi
call fcn.00405d4f
push 4
push 0xc0000000
push esi
call fcn.004059b6
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x1c], ebp
je 0x405bc1
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 0x405bba
lea eax, [esp + 0x10]
push 0
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x405bba
cmp edi, dword [esp + 0x10]
jne 0x405bba
push str._Rename__r_n
push esi
call fcn.0040591b
test eax, eax
jne 0x405b50
lea eax, [esi + edi]
push str._Rename__r_n
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
add edi, 0xa
jmp 0x405b85
add eax, 0xa
push 0x409514
push eax
call fcn.0040591b
mov ebp, eax
test ebp, ebp
je 0x405b81
lea ecx, [esi + edi]
lea eax, [ecx + ebx]
jmp 0x405b72
mov dl, byte [ecx]
mov byte [eax], dl
dec eax
dec ecx
cmp ecx, ebp
ja 0x405b6c
sub ebp, esi
inc ebp
mov eax, ebp
mov ebp, dword [esp + 0x1c]
jmp 0x405b87
mov ebp, dword [esp + 0x1c]
mov eax, edi
push ebx
add eax, esi
push 0x7a4170
push eax
call fcn.00405971
xor eax, eax
push eax
push eax
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esp + 0x10]
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]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret