joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4087c0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x4103a8]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x408802
call edi
mov esi, eax
test esi, esi
je 0x4087ec
mov eax, 1
jmp 0x4087fd
call ebp
mov ebx, eax
test ebx, ebx
je 0x40890f
mov eax, 2
mov dword [0x4103a8], eax
cmp eax, 1
jne 0x4088a2
test esi, esi
jne 0x40881b
call edi
mov esi, eax
test esi, esi
je 0x40890f
cmp word [esi], 0
mov eax, esi
je 0x408835
add eax, 2
cmp word [eax], 0
jne 0x408823
add eax, 2
cmp word [eax], 0
jne 0x408823
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x408894
push edi
call fcn.00409280
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x408894
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x408886
push ebx
call fcn.00409230
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x40890f
test ebx, ebx
jne 0x4088b3
call ebp
mov ebx, eax
test ebx, ebx
je 0x40890f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x4088cb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4088bb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4088bb
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00409280
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x4088ed
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x409050
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x40df78
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x409074
add eax, 8
inc ebp
cmp eax, 0x40e008
jb 0x409065
cmp ecx, dword [ebp*8 + 0x40df78]
jne 0x40921b
mov eax, dword [0x410248]
cmp eax, 1
je 0x4091dd
test eax, eax
jne 0x4090a0
cmp dword [0x40ddd4], 1
je 0x4091dd
cmp ecx, 0xfc
je 0x40921b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4090db
mov ecx, 5
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x409124
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x40a2e0
add ebx, ecx
push ebx
call fcn.00409ae0
add esp, 0xc
mov ecx, 6
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40a2c0
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Microsoft_Visual_C_Runtime_Library
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x40df7c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00409a50
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x410a60]
test eax, eax
je 0x4091ee
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x4091f8
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x40df7c]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
Function at 0x408600
Capabilities:
Delete file
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x318
mov eax, dword [0x5746cc]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
cmp dword [ebx], 0
jne 0x4086cd
push 0x104
lea eax, [ebp - 0x108]
push 0
push eax
call fcn.004a3360
add esp, 0xc
lea eax, [ebp - 0x108]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x4086b7
push edi
push 0x104
lea edi, [ebx + 4]
push 0
push edi
call fcn.004a3360
add esp, 0xc
mov dword [ebp - 0x314], 0x73646c
lea eax, [ebp - 0x314]
push edi
push 0
push eax
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push str..bat
push edi
call dword [sym.imp.SHLWAPI.dll_PathRenameExtensionA]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
push 0x80
push 4
push 0
push 7
push 0xc01200a0
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebx], eax
pop edi
cmp dword [ebx], 0
jne 0x4086cd
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004864b8
mov esp, ebp
pop ebp
ret
push 0x208
lea eax, [ebp - 0x310]
push 0
push eax
call fcn.004a3360
add esp, 0xc
mov dword [ebp - 0x318], 0
lea eax, [ebp + 0x10]
push eax
push 0
push dword [ebp + 0xc]
lea eax, [ebp - 0x310]
push 0x207
push eax
call fcn.004087a0
mov ecx, dword [eax]
push dword [eax + 4]
or ecx, 1
push ecx
call fcn.004be2a1
or ecx, 0xffffffff
add esp, 0x1c
test eax, eax
cmovs eax, ecx
test eax, eax
js 0x40872d
cmp eax, 0x207
ja 0x40872d
jne 0x408734
mov byte [ebp - 0x109], 0
lea ecx, [ebp - 0x310]
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408740
push 0
lea eax, [ebp - 0x318]
sub ecx, edx
push eax
push ecx
lea eax, [ebp - 0x310]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004864b8
mov esp, ebp
pop ebp
ret
Function at 0x40aec0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40af19
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x40af19
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
lea edx, [esi + eax]
and ecx, 0xf
jbe 0x40af0a
cmp esi, edx
jae 0x40af19
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub ecx, 1
jne 0x40aef8
cmp esi, edx
jae 0x40af19
cmp word [esi], 0
je 0x40af19
mov eax, esi
pop esi
pop ebp
ret
xor eax, eax
pop esi
pop ebp
ret
Function at 0x40ca00
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5156d8
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push esi
push edi
mov eax, dword [0x5746cc]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
push 0x535cc4
push 1
push 0
push 0x535cb4
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x40cb8b
xorps xmm0, xmm0
lea edx, [ebp - 0x28]
movlpd qword [ebp - 0x28], xmm0
push 0
mov dword [ebp - 0x28], 8
mov eax, dword [ecx]
push edx
push ecx
call dword [eax + 0x18]
test eax, eax
jne 0x40ca87
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 0x28]
push 0
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
lea eax, [ebp - 0x18]
push eax
call fcn.0040c310
add esp, 4
push dword [ebp - 0x18]
mov dword [ebp - 4], 0
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40cab5
mov eax, dword [ebp - 0x10]
push 0
push dword [ebp - 0x18]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
cmp dword [0x57206c], 0
je 0x40cb3b
push str.ntdll.dll
mov dword [ebp - 0x1c], 0
xor edi, edi
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x14], 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
test esi, esi
je 0x40cb31
push str.RtlGetNtVersionNumbers
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40cb10
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 0x20]
push ecx
lea ecx, [ebp - 0x1c]
push ecx
call eax
movzx eax, word [ebp - 0x14]
mov edi, 1
mov dword [ebp - 0x14], eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test edi, edi
je 0x40cb31
mov eax, dword [0x577ba4]
mov ecx, 1
cmp dword [ebp - 0x1c], 6
cmovae eax, ecx
mov dword [0x577ba4], eax
mov dword [0x57206c], 0
cmp dword [0x577ba4], 0
je 0x40cb48
push 0xf
jmp 0x40cb57
call fcn.0040c950
test eax, eax
je 0x40cb55
push 0xf
jmp 0x40cb57
push 7
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov edx, dword [ebp - 0x18]
or eax, 0xffffffff
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40cb8b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
call dword [sym.imp.ole32.dll_CoUninitialize]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40d7c0
Capabilities:
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2024
call fcn.00486920
mov eax, dword [0x5746cc]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
test esi, esi
jne 0x40d7f0
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004864b8
mov esp, ebp
pop ebp
ret
push 0x2000
xorps xmm0, xmm0
mov dword [ebp - 0x200c], 0
lea eax, [ebp - 0x2004]
movq qword [ebp - 0x2014], xmm0
push 0
movups xmmword [ebp - 0x2024], xmm0
push eax
mov word [ebp - 0x2008], 0
mov dword [ebp - 0x2020], 3
call fcn.004a3360
push 0x1000
lea eax, [ebp - 0x2004]
push esi
push eax
call fcn.004bf673
lea eax, [ebp - 0x2004]
add esp, 0x18
mov dword [ebp - 0x201c], eax
mov eax, 0x614
mov word [ebp - 0x2014], ax
lea eax, [ebp - 0x2024]
push eax
call dword [sym.imp.SHELL32.dll_SHFileOperationW]
mov ecx, dword [ebp - 4]
mov eax, 1
xor ecx, ebp
pop esi
call fcn.004864b8
mov esp, ebp
pop ebp
ret
Function at 0x40d880
Capabilities:
Check if file exists
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x668
mov eax, dword [0x5746cc]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x40da93
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40da93
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40d8b3
sub ecx, edx
sar ecx, 1
cmp ecx, 3
jbe 0x40da93
push ebx
push edi
push 0x208
lea eax, [ebp - 0x20c]
mov edi, 1
push 0
push eax
call fcn.004a3360
push 0x208
lea eax, [ebp - 0x414]
push 0
push eax
call fcn.004a3360
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x414]
add esp, 0x18
push esi
push eax
call ebx
push 0x52b914
lea eax, [ebp - 0x414]
push eax
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40d934
test al, 1
je 0x40d934
and eax, 0xfffffffe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [ebp - 0x664]
push eax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x668], eax
cmp eax, 0xffffffff
je 0x40da79
lea ecx, [ebp - 0x664]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x40da6d
nop dword [eax]
test byte [ebp - 0x664], 0x10
je 0x40d9e8
cmp word [ebp - 0x638], 0x2e
jne 0x40d9a7
mov ax, word [ebp - 0x636]
test ax, ax
je 0x40da52
cmp ax, 0x2e
jne 0x40d9a7
cmp word [ebp - 0x634], 0
je 0x40da52
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.004a3360
add esp, 0xc
lea eax, [ebp - 0x20c]
push esi
push eax
call ebx
lea eax, [ebp - 0x638]
push eax
lea eax, [ebp - 0x20c]
push eax
call ebx
lea eax, [ebp - 0x20c]
push eax
call fcn.0040d880
add esp, 4
jmp 0x40da50
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.004a3360
add esp, 0xc
lea eax, [ebp - 0x20c]
push esi
push eax
call ebx
lea eax, [ebp - 0x638]
push eax
lea eax, [ebp - 0x20c]
push eax
call ebx
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40da3f
test al, 1
je 0x40da3f
and eax, 0xfffffffe
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
neg eax
sbb eax, eax
and edi, eax
lea eax, [ebp - 0x664]
push eax
push dword [ebp - 0x668]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40d970
push dword [ebp - 0x668]
call dword [sym.imp.KERNEL32.dll_FindClose]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
and eax, edi
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004864b8
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
pop esi
call fcn.004864b8
mov esp, ebp
pop ebp
ret
Function at 0x40dab0
Capabilities:
Check if file exists
Delete directory
Delete file
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40db08
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40db08
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x40dae8
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40db08
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40db03
test al, 0x10
je 0x40db03
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x40db08
xor eax, eax
pop esi
pop ebp
ret
mov eax, 1
pop esi
pop ebp
ret
Function at 0x40e1f0
Capabilities:
Check if file exists
Delete file
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x40e21f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.delete__s_failed__error_d
call fcn.00436cf0
add esp, 0xc
mov eax, 1
pop esi
pop ebp
ret
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40e217
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x40e245
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40e202
push 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
xor eax, eax
pop esi
pop ebp
ret
Function at 0x40e260
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5157e6
mov eax, dword fs:[0]
push eax
sub esp, 0x880
mov eax, dword [0x5746cc]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
test ebx, ebx
jne 0x40e29c
xor eax, eax
jmp 0x40e4a2
cmp word [ebx], 0
je 0x40e295
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e2a7
sub ecx, edx
sar ecx, 1
cmp ecx, 0x104
jge 0x40e295
push 0x410
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.004a3360
add esp, 0xc
lea eax, [ebp - 0x420]
push 0x52b994
push ebx
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40e302
test al, 1
je 0x40e302
and eax, 0xfffffffe
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, 0x5c
mov dword [ebp - 0x428], 0
mov word [ebp - 0x42c], ax
mov dword [ebp - 0x424], 0
lea eax, [ebp - 0x420]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x884]
call fcn.0040db10
mov esi, dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x40e452
cmp dword [ebp - 0x424], 0
mov edi, dword [sym.imp.KERNEL32.dll_FindNextFileW]
je 0x40e3b1
mov eax, dword [ebp - 0x884]
shr eax, 4
and eax, 1
je 0x40e3b1
cmp word [ebp - 0x858], 0x2e
jne 0x40e3b1
mov ax, word [ebp - 0x856]
test ax, ax
je 0x40e38c
cmp ax, 0x2e
jne 0x40e3b1
cmp word [ebp - 0x854], 0
jne 0x40e3b1
mov eax, dword [ebp - 0x428]
test eax, eax
je 0x40e4be
lea ecx, [ebp - 0x884]
push ecx
push eax
call edi
mov edi, eax
mov dword [ebp - 0x424], edi
jmp 0x40e444
lea eax, [ebp - 0x888]
push eax
lea ecx, [ebp - 0x884]
call fcn.0040dc50
cmp dword [ebp - 0x424], 0
mov byte [ebp - 4], 1
je 0x40e3ec
mov eax, dword [ebp - 0x884]
shr eax, 4
and eax, 1
je 0x40e3ec
mov esi, dword [ebp - 0x888]
push esi
call fcn.0040e260
jmp 0x40e3f8
mov esi, dword [ebp - 0x888]
push esi
call fcn.0040e1f0
mov eax, dword [ebp - 0x428]
add esp, 4
test eax, eax
jne 0x40e409
xor edi, edi
jmp 0x40e428
cmp dword [ebp - 0x424], 0
jne 0x40e416
xor edi, edi
jmp 0x40e428
lea ecx, [ebp - 0x884]
push ecx
push eax
call edi
mov edi, eax
mov dword [ebp - 0x424], edi
mov byte [ebp - 4], 0
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40e444
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
test edi, edi
jne 0x40e349
mov esi, dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x428]
mov dword [ebp - 0x424], 0
test eax, eax
je 0x40e478
cmp eax, 0xffffffff
je 0x40e478
push eax
call esi
mov dword [ebp - 0x428], 0
push ebx
call fcn.0040d7c0
mov eax, dword [ebp - 0x428]
add esp, 4
mov dword [ebp - 0x424], 0
test eax, eax
je 0x40e49d
cmp eax, 0xffffffff
je 0x40e49d
push eax
call esi
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004864b8
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [ebp - 0x424], 0
jmp 0x40e478
Function at 0x40e570
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], edi
mov eax, dword [edi]
cmp eax, 0x270
jne 0x40e5ce
lea edx, [edi + 8]
mov esi, eax
nop dword [eax]
mov ecx, dword [edx - 4]
lea edx, [edx + 4]
xor ecx, dword [edx - 4]
and ecx, 0x7fffffff
xor ecx, dword [edx - 8]
mov eax, ecx
and al, 1
movzx eax, al
neg eax
sbb eax, eax
shr ecx, 1
and eax, 0x9908b0df
xor eax, dword [edx + 0x62c]
xor eax, ecx
mov dword [edx + 0x9b8], eax
sub esi, 1
jne 0x40e590
mov eax, dword [edi]
jmp 0x40e6b9
cmp eax, 0x4e0
jb 0x40e6b9
mov eax, dword [edi + 0x9c4]
push ebx
lea ebx, [edi + 0x9c4]
mov edi, 0xe3
nop dword [eax + eax]
mov ecx, dword [ebx + 4]
lea edx, [ebx + 4]
xor ecx, eax
and ecx, 0x7fffffff
xor ecx, eax
mov eax, ecx
and al, 1
movzx eax, al
neg eax
sbb eax, eax
shr ecx, 1
and eax, 0x9908b0df
xor eax, dword [ebx + 0x634]
xor eax, ecx
mov dword [ebx - 0x9c0], eax
lea ebx, [edx]
mov eax, dword [edx]
sub edi, 1
jne 0x40e5f0
mov ebx, dword [ebp - 4]
mov edi, 0x18c
add ebx, 0xd50
mov eax, dword [ebx]
nop dword [eax]
mov ecx, eax
lea edx, [ebx + 4]
xor ecx, dword [edx]
and ecx, 0x7fffffff
xor ecx, eax
mov eax, ecx
and al, 1
movzx eax, al
neg eax
sbb eax, eax
shr ecx, 1
and eax, 0x9908b0df
xor eax, dword [ebx - 0xd4c]
xor eax, ecx
mov dword [ebx - 0x9c0], eax
lea ebx, [edx]
mov eax, dword [edx]
sub edi, 1
jne 0x40e640
mov edi, dword [ebp - 4]
pop ebx
mov ecx, dword [edi + 0x1380]
xor ecx, dword [edi + 4]
and ecx, 0x7fffffff
xor ecx, dword [edi + 0x1380]
mov eax, ecx
and al, 1
movzx eax, al
neg eax
sbb eax, eax
shr ecx, 1
and eax, 0x9908b0df
xor eax, dword [edi + 0x634]
xor eax, ecx
mov dword [edi + 0x9c0], eax
xor eax, eax
mov dword [edi], 0
mov edx, dword [edi + eax*4 + 4]
inc eax
mov dword [edi], eax
mov ecx, edx
mov eax, dword [edi + 0x1384]
shr ecx, 0xb
and eax, ecx
xor edx, eax
mov eax, edx
and eax, 0xff3a58ad
shl eax, 7
xor edx, eax
mov eax, edx
and eax, 0xffffdf8c
shl eax, 0xf
xor edx, eax
mov eax, edx
shr eax, 0x12
pop edi
xor eax, edx
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40ea90
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 0x14]
mov dword [ebp - 8], ecx
push esi
and eax, 0x8000000f
jns 0x40eaab
dec eax
or eax, 0xfffffff0
add eax, 1
jne 0x40ec0a
push 0
push 0x80
push 3
push 0
push 0
push SysReAllocString
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40ec0a
lea eax, [ebp - 0x14]
xorps xmm0, xmm0
push eax
push esi
movq qword [ebp - 0x14], xmm0
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x40ec03
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x40ec03
cmp dword [ebp - 0x10], 0
jg 0x40ec03
jl 0x40eb14
cmp eax, 0x1000000
ja 0x40ec03
push edi
push 0x1000000
call fcn.00486501
add esp, 4
mov dword [ebp + 0x14], 0
mov edi, eax
lea eax, [ebp + 0x14]
push 0
push eax
push dword [ebp - 0x14]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40ebe7
cmp dword [ebp + 0x14], 0
je 0x40ebe7
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call ebx
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 8]
mov dword [ebp + 8], eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp + 8]
mov dword [ebp - 4], 0
push eax
push edi
call fcn.0040e830
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push dword [ebp + 0x10]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40ebb9
push 0
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0
push eax
push dword [ebp + 8]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
test eax, eax
jne 0x40ebcf
call ebx
push 1
push esi
call fcn.004864f3
add esp, 8
xor al, al
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10
call ebx
push 1
push esi
call fcn.004864f3
add esp, 8
mov al, 1
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10
push 1
push edi
call fcn.004864f3
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
xor al, al
pop esi
mov esp, ebp
pop ebp
ret 0x10
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
pop esi
mov esp, ebp
pop ebp
ret 0x10