joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4213a0
Capabilities:
Move file

Disassembly:
sub esp, 0x34c
push ebx
mov ebx, ecx
push ebp
push esi
lea ebp, [ebx + 0x108]
push edi
mov ecx, 0x41
xor eax, eax
mov edi, ebp
add ebx, 4
rep stosd dword es:[edi], eax
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xfffffffb
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov dword [esp + 0x10], 1
and ecx, 3
push ebp
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x364]
test esi, esi
je 0x4213f9
push str._s.arj
jmp 0x4213fe
push str._s.vss
push ebp
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
push ebp
push ebx
call dword [sym.imp.MSVCRT.dll_rename]
add esp, 8
test eax, eax
je 0x42141f
mov dword [esp + 0x10], 0
test esi, esi
je 0x4214de
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x118]
xor ebp, ebp
rep stosd dword es:[edi], eax
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, ebx
mov edx, ecx
lea edi, [esp + 0x14]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x14]
and ecx, 3
push 0x5c
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.MSVCRT.dll_strrchr]
add esp, 8
lea ecx, [esp + 0x14]
lea edx, [esp + 0x118]
mov byte [eax], 0
push ecx
push 0x437ed8
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea eax, [esp + 0x21c]
lea ecx, [esp + 0x118]
push eax
push ecx
call fcn.00419150
mov ecx, eax
call fcn.0041b4f0
mov esi, eax
cmp esi, 0xffffffff
je 0x4214de
lea edx, [esp + 0x21c]
inc ebp
push edx
push esi
call fcn.00419150
mov ecx, eax
call fcn.0041b510
test eax, eax
jne 0x4214a8
cmp ebp, 0x14
jle 0x4214de
mov edi, dword [0x437f04]
test edi, edi
setle al
dec eax
and eax, 0x14
add eax, 0xfffffff6
mov dword [0x437f04], eax
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34c
ret 4

Function at 0x422130
Capabilities:
Create thread

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
jne 0x422192
mov eax, dword [0x43c0cc]
test eax, eax
jne 0x4221f3
lea eax, [esp + 8]
mov dword [esp + 8], esi
push eax
push esi
push esi
push 0x4223c0
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x4221f3
push eax
call fcn.00419150
mov ecx, eax
call fcn.0041b350
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x43c0cc
call esi
push 0
push 0x43c0c8
call esi
mov eax, 1
pop esi
ret
push edi
push 0x7da
call sub.MFC42.DLL_operatornew
mov edx, eax
add esp, 4
test edx, edx
je 0x4221b5
mov ecx, 0x1f4
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov eax, edx
jmp 0x4221b7
xor eax, eax
mov ecx, 0x1f6
mov edi, eax
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0xc]
push ecx
push 0
push eax
push 0x422210
push 0
push 0
movsw word es:[edi], word [esi]
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
pop edi
je 0x4221f3
push eax
call fcn.00419150
mov ecx, eax
call fcn.0041b350
mov eax, 1
pop esi
ret
Function at 0x4234a0
Capabilities:
Create thread

Disassembly:
push ecx
mov ecx, dword [esp + 8]
lea eax, [esp]
push eax
push 0
push ecx
push 0x422fe0
push 0
push 0
mov dword [esp + 0x18], 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x4234d5
push eax
call fcn.00419150
mov ecx, eax
call fcn.0041b350
mov eax, 1
pop ecx
ret
Function at 0x429480
Capabilities:
Get file size

Disassembly:
sub esp, 8
mov eax, dword [esp + 0xc]
push esi
push 0
push 0
push 3
push 0
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x429532
lea ecx, [esp + 4]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
test ecx, ecx
jl 0x429525
jg 0x4294c7
test edx, edx
jbe 0x429525
mov eax, dword [esp + 0x20]
cmp eax, ecx
mov ecx, dword [esp + 0x1c]
jg 0x429525
jl 0x4294d9
cmp ecx, edx
jae 0x429525
push edi
push 0
push 0
push eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov edi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x14]
push 0
mov eax, dword [edi]
push edx
push eax
push ecx
push esi
call fcn.00419150
mov ecx, eax
call fcn.0041b480
mov edx, dword [esp + 0x14]
push esi
mov dword [edi], edx
call fcn.00419150
mov ecx, eax
call fcn.0041b350
pop edi
mov eax, 1
pop esi
add esp, 8
ret
push esi
call fcn.00419150
mov ecx, eax
call fcn.0041b350
xor eax, eax
pop esi
add esp, 8
ret

Function at 0x42a380
Capabilities:
Create thread

Disassembly:
push ecx
lea eax, [esp]
mov dword [esp], 0
push eax
push 0
push 0
push 0x42a340
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x42a3b2
push eax
call fcn.00419150
mov ecx, eax
call fcn.0041b350
xor eax, eax
pop ecx
ret

Function at 0x42b1c0
Capabilities:
Get disk information

Disassembly:
sub esp, 0x114
xor eax, eax
push ebx
push esi
mov ebx, ecx
push edi
mov ecx, 0x40
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x20]
push eax
push pe_nt_image_headers32
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsA]
lea ecx, [esp + 0x20]
mov esi, eax
sub ecx, 4
lea edx, [esp + 0x20]
add esi, ecx
cmp esi, edx
jb 0x42b251
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
mov al, byte [esi]
cmp al, 0x41
je 0x42b245
cmp al, 0x61
je 0x42b245
cmp al, 0x42
je 0x42b245
cmp al, 0x62
je 0x42b245
push esi
call ebp
cmp eax, 3
jne 0x42b245
lea eax, [esp + 0x10]
push 0x14
push eax
push esi
call fcn.004109b0
add esp, 0xc
lea ecx, [esp + 0x10]
push ecx
mov ecx, ebx
call fcn.0042b480
push 0x3e8
call edi
sub esi, 4
lea edx, [esp + 0x24]
cmp esi, edx
jae 0x42b208
pop ebp
push 1
push 0
push 0x438a68
mov ecx, ebx
call fcn.0042b270
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x114
ret

Function at 0x42daf0
Capabilities:
Get common file path

Disassembly:
mov eax, dword [esp + 8]
push esi
mov esi, dword [esp + 8]
push edi
mov ecx, dword [eax]
xor eax, eax
shl ecx, 1
mov edx, ecx
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 1
and ecx, 3
push 8
push esi
push 0
rep stosb byte es:[edi], al
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x42db39
push 0
push esi
call dword [sym.imp.MSVCRT.dll__waccess]
add esp, 8
test eax, eax
jne 0x42db39
pop edi
mov eax, 1
pop esi
ret
pop edi
xor eax, eax
pop esi
ret
Function at 0x42db40
Capabilities:
Get common file path

Disassembly:
mov eax, dword [esp + 8]
push esi
mov esi, dword [esp + 8]
push edi
mov ecx, dword [eax]
xor eax, eax
shl ecx, 1
mov edx, ecx
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 1
and ecx, 3
push 0x1a
push esi
push 0
rep stosb byte es:[edi], al
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x42db95
push str.MicrosoftOfficeRecent
push esi
call dword [sym.imp.MSVCRT.dll_wcscat]
push 0
push esi
call dword [sym.imp.MSVCRT.dll__waccess]
add esp, 0x10
test eax, eax
jne 0x42db95
pop edi
mov eax, 1
pop esi
ret
pop edi
xor eax, eax
pop esi
ret
Function at 0x42dd40
Capabilities:
Enumerate files on windows
Get disk information

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x432260
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x33a8
call fcn.00431220
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov dword [ebp - 0x10], esp
push ebx
lea eax, [ebp - 0xca8]
push str._s.lnk
push eax
call dword [sym.imp.MSVCRT.dll_swprintf]
add esp, 0xc
lea ecx, [ebp - 0x288]
lea edx, [ebp - 0xca8]
xor esi, esi
push ecx
push edx
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
je 0x42ded6
mov ecx, 0xfa
xor eax, eax
lea edi, [ebp - 0x1478]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x25c]
lea ecx, [ebp - 0x1478]
push eax
push ebx
push 0x438118
push ecx
call dword [sym.imp.MSVCRT.dll_swprintf]
mov ecx, 0x3e8
xor eax, eax
lea edi, [ebp - 0x33b8]
lea edx, [ebp - 0x4d8]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x20]
push edx
lea ecx, [ebp - 0x33b8]
push eax
lea edx, [ebp - 0x1478]
push ecx
push edx
mov dword [ebp - 0x20], 0xfa0
call fcn.0042dba0
add esp, 0x20
cmp eax, esi
je 0x42dead
mov al, byte [ebp - 0x33b8]
lea ecx, [ebp + 8]
mov dword [ebp + 8], esi
push ecx
mov byte [ebp + 8], al
mov byte [ebp + 9], 0x3a
mov byte [ebp + 0xa], 0x5c
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 3
jne 0x42dead
lea edx, [ebp - 0x33b8]
push esi
push edx
call dword [sym.imp.MSVCRT.dll__waccess]
add esp, 8
test eax, eax
jne 0x42dead
test byte [ebp - 0x4d8], 0x10
jne 0x42dead
lea eax, [ebp - 0x1c]
lea ecx, [ebp - 0x30]
push eax
lea edx, [ebp - 0x38]
push ecx
lea eax, [ebp - 0x28]
push edx
lea ecx, [ebp - 0x33b8]
push eax
push ecx
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], esi
call fcn.00423d70
add esp, 0x14
cmp eax, esi
je 0x42dead
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x2c]
push esi
push edx
mov edx, dword [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x34]
push ecx
mov ecx, dword [ebp - 0x38]
push edx
mov edx, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x28]
push ecx
push edx
mov edx, dword [ebp + 0xc]
lea ecx, [ebp - 0x33b8]
push eax
push ecx
push edx
call fcn.0042d9b0
add esp, 0x2c
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x288]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x42dda7
call fcn.00419150
mov edx, dword [ebp - 0x14]
mov ecx, eax
push edx
call fcn.0041b530
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov eax, 1
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x42e760
Capabilities:
Get common file path

Disassembly:
sub esp, 0x208
lea eax, [esp]
push 1
push 5
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x42e7b6
push esi
mov esi, dword [esp + 0x210]
lea ecx, [esp + 4]
push ecx
push esi
call dword [sym.imp.MSVCRT.dll_wcscpy]
mov edx, dword [esp + 0x21c]
push 6
push 0
push edx
lea eax, [esp + 0x18]
push esi
push eax
call fcn.004285b0
add esp, 0x1c
mov eax, 1
pop esi
add esp, 0x208
ret
xor eax, eax
add esp, 0x208
ret

Function at 0x42e7c0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x208
lea eax, [esp]
push 1
push 0x10
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x42e816
push esi
mov esi, dword [esp + 0x210]
lea ecx, [esp + 4]
push ecx
push esi
call dword [sym.imp.MSVCRT.dll_wcscpy]
mov edx, dword [esp + 0x21c]
push 6
push 0
push edx
lea eax, [esp + 0x18]
push esi
push eax
call fcn.004285b0
add esp, 0x1c
mov eax, 1
pop esi
add esp, 0x208
ret
xor eax, eax
add esp, 0x208
ret

Function at 0x42e820
Capabilities:
Get disk information

Disassembly:
sub esp, 0x408
mov ecx, 0x40
xor eax, eax
push esi
push edi
lea edi, [esp + 8]
rep stosd dword es:[edi], eax
lea eax, [esp + 8]
push eax
push pe_nt_image_headers32
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
lea esi, [esp + eax*2]
lea ecx, [esp + 8]
cmp esi, ecx
jb 0x42e8e2
mov edi, dword [esp + 0x414]
push ebx
mov ebx, dword [esp + 0x41c]
push ebp
mov ebp, dword [sym.imp.MSVCRT.dll_swprintf]
mov ax, word [esi]
cmp ax, 0x41
je 0x42e8c7
cmp ax, 0x61
je 0x42e8c7
cmp ax, 0x42
je 0x42e8c7
cmp ax, 0x62
je 0x42e8c7
push esi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
jne 0x42e8c7
push esi
lea edx, [esp + 0x214]
push str._s_RECYCLE.BIN
push edx
call ebp
lea eax, [esp + 0x21c]
push eax
push edi
call dword [sym.imp.MSVCRT.dll_wcscpy]
push 6
push 0
push ebx
lea ecx, [esp + 0x230]
push edi
push ecx
call fcn.004285b0
add esp, 0x28
sub esi, 8
lea edx, [esp + 0x10]
cmp esi, edx
jae 0x42e86b
pop ebp
pop ebx
pop edi
mov eax, 1
pop esi
add esp, 0x408
ret
pop edi
mov eax, 1
pop esi
add esp, 0x408
ret

Function at 0x42ed00
Capabilities:
Get file size

Disassembly:
sub esp, 8
mov eax, dword [esp + 0xc]
push esi
push 0
push 0
push 3
push 0
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x42ed2e
xor eax, eax
xor edx, edx
pop esi
add esp, 8
ret
push ebx
lea ecx, [esp + 8]
push edi
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov edi, dword [esp + 0xc]
mov ebx, dword [esp + 0x10]
push esi
call fcn.00419150
mov ecx, eax
call fcn.0041b350
mov eax, edi
mov edx, ebx
pop edi
pop ebx
pop esi
add esp, 8
ret
Function at 0x42ed60
Capabilities:
Contain obfuscated stackstrings

Disassembly:
sub esp, 0x7e8
push edi
mov ecx, 0x1f4
xor eax, eax
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
mov al, 0x30
mov cl, 0xd
mov byte [esp + 5], al
mov byte [esp + 6], al
mov al, 0x65
mov dl, 0x25
mov byte [esp + 7], al
mov byte [esp + 8], al
mov byte [esp + 0xb], al
mov al, 0xa
mov byte [esp + 0x11], al
mov byte [esp + 0x13], al
mov eax, dword [esp + 0x7f8]
mov byte [esp + 0x10], cl
mov byte [esp + 0x12], cl
mov ecx, dword [esp + 0x7f4]
mov byte [esp + 0xe], dl
mov byte [esp + 0x14], dl
mov edx, dword [esp + 0x7f0]
push eax
push ecx
lea eax, [esp + 0xc]
push edx
lea ecx, [esp + 0x28]
push eax
push ecx
mov byte [esp + 0x18], 0x63
mov byte [esp + 0x1d], 0x66
mov byte [esp + 0x1e], 0x36
mov byte [esp + 0x20], 0x3a
mov byte [esp + 0x21], 0x20
mov byte [esp + 0x23], 0x73
mov byte [esp + 0x29], 0x49
mov byte [esp + 0x2a], 0x36
mov byte [esp + 0x2b], 0x34
mov byte [esp + 0x2c], 0x64
mov byte [esp + 0x2d], 0
call dword [sym.imp.MSVCRT.dll_sprintf]
mov edx, dword [esp + 0x814]
mov ecx, dword [esp + 0x810]
push edx
push ecx
lea edx, [esp + 0x38]
push eax
push edx
call fcn.00411d70
add esp, 0x24
mov eax, 1
pop edi
add esp, 0x7e8
ret
Function at 0x43ebc0
Capabilities:
Write file on windows

Disassembly:
sub esp, 8
mov eax, dword [esp + 0x10]
push edi
push 0
push 0x20
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov edi, eax
xor eax, eax
cmp edi, 0xffffffff
je 0x43ec52
mov eax, dword [esp + 0x10]
push ebx
mov ebx, 1
push ebp
cmp eax, ebx
push esi
mov dword [esp + 0x10], ebx
jle 0x43ec44
mov ebp, dword [sym.imp.KERNEL32.DLL_WriteFile]
lea esi, [esp + 0x2c]
mov eax, dword [esi]
lea edx, [esp + 0x14]
push 0
push edx
lea ecx, [eax + 8]
mov eax, dword [eax + 4]
push eax
push ecx
push edi
call ebp
test eax, eax
je 0x43ec3c
mov eax, dword [esp + 0x1c]
inc ebx
add esi, 0xc
cmp ebx, eax
jl 0x43ec05
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret
mov dword [esp + 0x10], 0
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret

Function at 0x43ec60
Capabilities:
Read .ini file

Disassembly:
push ebx
push ebp
push esi
push edi
push 0x400
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x40]
mov ecx, dword [esp + 0x28]
add esp, 4
mov esi, eax
mov eax, dword [esp + 0x30]
push ebx
push 0x400
push esi
push ebp
push eax
push ecx
call dword [sym.imp.KERNEL32.DLL_GetPrivateProfileStringA]
cmp eax, 0x3ff
jl 0x43ecca
push esi
lea edi, [eax + 0x400]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
push edi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov edx, dword [esp + 0x38]
add esp, 8
mov esi, eax
mov eax, dword [esp + 0x24]
push ebx
push edi
push esi
push ebp
push edx
push eax
call dword [sym.imp.KERNEL32.DLL_GetPrivateProfileStringA]
dec edi
cmp eax, edi
jge 0x43ec9a
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
xor ebx, ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x43ece6
push ecx
push esi
call fcn.0043f600
add esp, 8
mov ebx, eax
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x43ed40
Capabilities:
Encode data using xor

Disassembly:
mov edx, dword [esp + 4]
mov eax, dword [esp + 8]
cmp edx, 1
jle 0x43ed5e
push esi
lea ecx, [esp + 0x18]
dec edx
mov esi, dword [ecx]
add ecx, 0xc
xor eax, esi
dec edx
jne 0x43ed53
pop esi
ret

Function at 0x42d458
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0042d2ce
Function at 0x511697
Capabilities:
Decompress data using aplib

Disassembly:
push ebp
mov ebp, esp
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
cld
mov dl, 0x80
movsb byte es:[edi], byte [esi]
call fcn.00511716
jae 0x5116a3
xor ecx, ecx
call fcn.00511716
jae 0x5116cd
xor eax, eax
call fcn.00511716
jae 0x5116de
mov al, 0x10
call fcn.00511716
adc al, al
jae 0x5116bf
jne 0x51170b
stosb byte es:[edi], al
jmp 0x5116a4
call fcn.00511722
dec ecx
loop 0x5116ea
mov eax, ebp
call fcn.00511720
jmp 0x51170c
lodsb al, byte [esi]
shr eax, 1
je 0x511732
adc ecx, 2
mov ebp, eax
jmp 0x51170c
xchg ecx, eax
dec eax
shl eax, 8
lodsb al, byte [esi]
mov ebp, eax
call fcn.00511720
cmp eax, 0x7d00
jae 0x51170a
cmp eax, 0x500
jae 0x51170b
cmp eax, 0x7f
ja 0x51170c
inc ecx
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x5116a4
pop ebp
ret 8
Function at 0x4036f4
Capabilities:
Enumerate pe sections

Disassembly:
mov ecx, dword [esp + 8]
push esi
push edi
xor edi, edi
movzx eax, word [ecx + 0x14]
movzx esi, word [ecx + 6]
test esi, esi
lea eax, [eax + ecx + 0x18]
jbe 0x40372f
mov ecx, dword [eax + 8]
test ecx, ecx
jne 0x403716
mov ecx, dword [eax + 0x10]
mov edx, dword [eax + 0xc]
cmp dword [esp + 0xc], edx
jb 0x403727
add edx, ecx
cmp dword [esp + 0xc], edx
jb 0x403731
inc edi
add eax, 0x28
cmp edi, esi
jb 0x40370c
xor eax, eax
pop edi
pop esi
ret

Function at 0x405a26
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x42bc78
push esi
call fcn.00405fa0
push esi
call fcn.004059d1
mov edi, eax
test edi, edi
jne 0x405a47
xor eax, eax
jmp 0x405a99
push edi
call fcn.0040620a
test byte [0x42f41c], 0x80
je 0x405a60
mov al, byte [edi]
test al, al
je 0x405a43
cmp al, 0x5c
je 0x405a43
sub edi, esi
jmp 0x405a78
call fcn.004062a3
test eax, eax
je 0x405a72
test byte [eax], 0x10
je 0x405a43
push esi
call fcn.0040597f
push esi
call sub.KERNEL32.dll_lstrlenA
cmp eax, edi
push esi
jg 0x405a64
call fcn.00405938
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 0x405b14
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 0x405b33
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 0x405b39
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 0x405b68
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 [0x40a3b4]
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 0x405bad
test edi, edi
jne 0x405b73
and byte [esi], 0
pop edi
pop esi
pop ebp
ret 8
mov eax, esi
jmp 0x405ba7
Function at 0x402c90
Capabilities:
Get process heap flags
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xc
mov dword [esp], 1
call sub.ucrtbase.dll__configure_wide_argv
call sub.ucrtbase.dll__initialize_wide_environment
call 0x402d00
mov esi, dword [eax]
call sub.ucrtbase.dll___p___wargv
mov edi, dword [eax]
call sub.ucrtbase.dll__get_initial_wide_environment
mov ebx, eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 8]
mov edx, dword [eax + 0x3c]
cmp word [eax + edx + 0x5c], 2
sete al
movzx eax, al
add eax, 1
mov dword [esp], eax
call sub.ucrtbase.dll__set_app_type
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], esi
call fcn.00401b30
mov dword [esp], eax
call sub.ucrtbase.dll_exit
nop
nop
nop
jmp dword [sym.imp.ucrtbase.dll___p___argc]
Function at 0x10005130
Capabilities:
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x1004e080]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
push str.cabalmain.exe
mov byte [ebp - 9], cl
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
xor cl, cl
mov ebx, dword [eax + 0xc7bf5c]
mov eax, dword [ebx + 0x41a8]
add ebx, 0x41a8
mov dword [ebp - 0x10], eax
shr eax, 0x18
cmp al, 4
je 0x1000517a
cmp al, 0x24
je 0x1000517a
cmp al, 0x34
je 0x1000517a
cmp al, 0x44
jne 0x1000517c
mov cl, 1
movzx edi, byte [ebp - 9]
dec edi
cmp edi, 8
ja case.0x10005186.2
jmp dword [edi*4 + 0x100052a4]
movups xmm0, xmmword [0x1004eb7c]
shl cl, 2
mov byte [ebp - 0xd], cl
mov ecx, 0x107c868
movups xmmword [ecx], xmm0
mov eax, dword [0x1004eb8c]
mov dword [ecx + 0x10], eax
jmp 0x100051f6
movups xmm0, xmmword [0x1004eb2c]
add cl, 8
shl cl, 2
mov byte [ebp - 0xd], cl
mov ecx, 0x107c868
movups xmmword [ecx], xmm0
mov eax, dword [0x1004eb3c]
mov dword [ecx + 0x10], eax
jmp 0x100051f6
movups xmm0, xmmword [0x1004eb44]
shl cl, 2
mov byte [ebp - 0xd], cl
mov ecx, 0x107c910
movups xmmword [ecx], xmm0
mov eax, dword [0x1004eb54]
mov dword [ecx + 0x10], eax
jmp 0x100051f6
add cl, 0xc
shl cl, 2
mov byte [ebp - 0xd], cl
lea eax, [ebp - 8]
push eax
push 0x40
push 4
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [ebp - 0x10]
mov dword [ebx], eax
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push 4
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov al, byte [ebp - 9]
mov byte [0x1004eb41], al
cmp edi, 8
ja case.0x10005227.0
jmp dword [edi*4 + 0x100052c8]
movups xmm0, xmmword [0x1004eb68]
add cl, 0x10
shl cl, 2
mov byte [ebp - 0xd], cl
mov ecx, 0x107c910
movups xmmword [ecx], xmm0
mov eax, dword [0x1004eb78]
mov dword [ecx + 0x10], eax
jmp 0x100051f6
push 0x1004eb24
jmp 0x1000528d
push 0x1004eb08
jmp 0x1000528d
push 0x1004eb5c
jmp 0x1000528d
push 0x1004eb60
jmp 0x1000528d
push 0x1004eb64
jmp 0x1000528d
push 0x1004eb28
jmp 0x1000528d
push 0x1004eb58
jmp 0x1000528d
push 0x1004eb00
jmp 0x1000528d
push 0x1004eb20
call dword [0x10051e50]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.1001ca4c
mov esp, ebp
pop ebp
ret