joyce8/EMBER2024-capa huggingface dataset:
Function at 0x409696
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
push esi
xor esi, esi
lea eax, [ebp - 0x208]
push eax
push dword [ebp + 8]
mov al, byte [ebp + 0x18]
mov cl, 4
call fcn.00409565
push dword [ebp + 0xc]
lea eax, [ebp - 0x208]
push dword [ebp + 0x10]
call fcn.0040aa77
test al, al
je 0x4096ef
cmp dword [ebp + 0x14], 0
je 0x4096e1
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call dword [sym.imp.SHLWAPI.dll_PathAddExtensionW]
test eax, eax
je 0x4096ef
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4096fc
inc esi
cmp esi, 0x64
jb 0x4096a2
xor al, al
pop esi
leave
ret 0x14
mov al, 1
jmp 0x4096f7

Function at 0x409789
Capabilities:
Get common file path
Get disk information

Disassembly:
push ebp
lea ebp, [esp - 0x74]
sub esp, 0x2d4
push ebx
push esi
push edi
xor ebx, ebx
lea eax, [ebp - 0x260]
push eax
push ebx
push ebx
push 0x24
push ebx
mov byte [ebp + 0x73], bl
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jne 0x409827
mov esi, dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea eax, [ebp - 0x260]
push eax
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetVolumeNameForVolumeMountPointW]
jmp 0x4097f0
lea eax, [ebp - 0x260]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashW]
lea eax, [ebp - 0x260]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
je 0x409827
lea eax, [ebp - 0x260]
push eax
call esi
push 0x64
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x260]
push eax
call edi
test eax, eax
je 0x4097c9
cmp word [ebp - 0x44], 0x7b
jne 0x409827
push dword [ebp + 0x7c]
xor eax, eax
mov word [ebp + 8], ax
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.ole32.dll_CLSIDFromString]
test eax, eax
jne 0x409827
mov byte [ebp + 0x73], 1
jmp 0x409832
push 0x10
push ebx
push dword [ebp + 0x7c]
call fcn.00405299
mov al, byte [ebp + 0x73]
pop edi
pop esi
pop ebx
add ebp, 0x74
leave
ret 4
Function at 0x409a29
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
mov ebx, eax
mov eax, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 8], esi
call fcn.004099e4
cmp eax, 0x1e
jb 0x409b3d
lea eax, [ebp - 4]
push eax
push 0x40
push 0x1e
push dword [ebp + 8]
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x409b3d
push 0x23
push 0xffffffffffffff90
lea eax, [ebp - 0x2c]
push eax
call fcn.00405299
push esi
push 0x1e
lea eax, [ebp - 0x2c]
push eax
push dword [ebp + 8]
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x409b29
push edi
lea edi, [ebp - 0x2c]
push esi
mov eax, edi
push eax
jmp 0x409ac6
add esi, eax
cmp esi, 0x1e
ja 0x409b28
mov cl, byte [edi]
cmp cl, 0xe9
je 0x409aac
cmp cl, 0xe8
jne 0x409aba
cmp eax, 5
jne 0x409aba
mov eax, dword [ebp + 8]
sub eax, dword [ebp + 0xc]
add dword [edi + 1], eax
push 0
cmp esi, 5
jae 0x409ad2
lea edi, [ebp + esi - 0x2c]
push edi
call fcn.0041d860
cmp eax, 0xffffffff
jne 0x409a95
jmp 0x409b28
mov eax, dword [ebp + 8]
sub eax, dword [ebp + 0xc]
lea edi, [esi + 5]
sub eax, 5
mov dword [ebp + esi - 0x2b], eax
push edi
lea eax, [ebp - 0x2c]
push eax
push dword [ebp + 0xc]
mov byte [ebp + esi - 0x2c], 0xe9
mov esi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0xffffffffffffffff
call esi
test eax, eax
je 0x409b28
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
sub ebx, ecx
sub ebx, 5
mov byte [ebp - 0x2c], 0xe9
mov dword [ebp - 0x2b], ebx
call fcn.0040df7c
push 0
push 5
lea eax, [ebp - 0x2c]
push eax
push ecx
push 0xffffffffffffffff
call esi
test eax, eax
je 0x409b28
mov dword [ebp - 8], edi
pop edi
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push 0x1e
push dword [ebp + 8]
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov eax, dword [ebp - 8]
pop esi
pop ebx
leave
ret 8
Function at 0x409b46
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
mov edi, eax
mov esi, dword [edi + 0x3c]
add esi, edi
mov ebx, dword [esi + 0x50]
push ebx
push edi
mov dword [ebp - 0x14], ebx
mov byte [ebp - 1], 0
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
je 0x409b73
xor eax, eax
jmp 0x409c44
push 0x40
push 0x3000
push ebx
push 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword [ebp - 8], eax
test eax, eax
je 0x409c41
push ebx
push edi
call fcn.00405239
mov ebx, eax
xor ecx, ecx
cmp ebx, ecx
je 0x409c2a
cmp dword [esi + 0xa4], ecx
jbe 0x409c1e
mov eax, dword [esi + 0xa0]
cmp eax, ecx
jbe 0x409c1e
mov esi, dword [esi + 0x34]
mov edx, dword [ebp - 8]
sub edi, esi
sub edx, esi
mov dword [ebp - 0x10], edi
add eax, ebx
jmp 0x409c03
mov esi, dword [eax + 4]
cmp esi, 8
jb 0x409bfe
add esi, 0xfffffff8
shr esi, 1
mov dword [ebp - 0xc], ecx
je 0x409bfe
mov ecx, dword [ebp - 0xc]
movzx ecx, word [eax + ecx*2 + 8]
test cx, cx
je 0x409bf6
and ecx, 0xfff
add ecx, dword [eax]
mov edi, edx
sub edi, dword [ebp - 0x10]
add dword [ecx + ebx], edi
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], esi
jb 0x409bd9
add eax, dword [eax + 4]
xor ecx, ecx
cmp dword [eax], ecx
jne 0x409bc7
push ecx
push dword [ebp - 0x14]
push ebx
push dword [ebp - 8]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
setne byte [ebp - 1]
push ebx
call fcn.004051e6
cmp byte [ebp - 1], 0
jne 0x409c41
push 0x8000
push 0
push dword [ebp - 8]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
and dword [ebp - 8], 0
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x409c4b
Capabilities:
Parse url

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push 0x3c
pop edx
push edx
xor ebx, ebx
push ebx
lea eax, [ebp - 0x3c]
push eax
call fcn.00405299
xor eax, eax
inc eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x3c]
push eax
push ebx
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x3c], edx
call dword [sym.imp.WININET.dll_InternetCrackUrlA]
test eax, eax
jne 0x409c8b
xor al, al
jmp 0x409d37
push 0x10
push ebx
push esi
call fcn.00405299
push dword [ebp - 0x2c]
mov eax, dword [ebp - 0x28]
call fcn.00405644
mov dword [esi], eax
cmp eax, ebx
je 0x409c84
jmp 0x409cb5
mov eax, dword [ebp - 0x10]
cmp byte [eax], 0x2f
jne 0x409cba
dec dword [ebp - 0xc]
inc dword [ebp - 0x10]
cmp dword [ebp - 0xc], ebx
ja 0x409ca7
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0xc]
push edi
lea edi, [eax + ecx + 1]
lea eax, [edi + 1]
call fcn.004051b6
mov dword [esi + 4], eax
cmp eax, ebx
jne 0x409cdf
push dword [esi]
call fcn.004051e6
xor al, al
jmp 0x409d36
push dword [ebp - 0xc]
inc eax
push dword [ebp - 0x10]
push eax
call fcn.00405222
push dword [ebp - 4]
mov eax, dword [esi + 4]
mov ecx, dword [ebp - 0xc]
push dword [ebp - 8]
lea eax, [eax + ecx + 1]
push eax
call fcn.00405222
mov eax, dword [esi + 4]
mov byte [eax], 0x2f
mov byte [eax + edi], bl
mov eax, dword [ebp - 0xc]
inc eax
mov dword [esi + 8], eax
mov ax, word [ebp - 0x24]
mov word [esi + 0xc], ax
mov eax, dword [ebp - 0x30]
sub eax, 3
je 0x409d30
dec eax
je 0x409d2a
mov byte [esi + 0xe], bl
jmp 0x409d34
mov byte [esi + 0xe], 2
jmp 0x409d34
mov byte [esi + 0xe], 1
mov al, 1
pop edi
pop ebx
leave
ret 4

Function at 0x40a39d
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
xor ebx, ebx
push ebx
push 0x80
push 2
push ebx
push 1
push 0x40000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40a3fa
cmp dword [ebp + 0xc], ebx
je 0x40a3e4
cmp dword [ebp + 0x10], ebx
je 0x40a3e4
push ebx
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40a3e6
mov bl, 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp bl, 1
je 0x40a3fa
push dword [ebp + 8]
call fcn.0040a548
pop esi
mov al, bl
pop ebx
pop ebp
ret 0xc
Function at 0x40a402
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push edi
and al, 2
movzx eax, al
xor edi, edi
push edi
push edi
neg eax
push 3
sbb eax, eax
push edi
and eax, 6
or eax, 1
push eax
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 8], eax
cmp eax, 0xffffffff
je 0x40a4a3
lea ecx, [ebp - 8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x40a49a
cmp dword [ebp - 4], edi
jne 0x40a49a
mov eax, dword [ebp - 8]
mov dword [esi + 4], eax
cmp eax, edi
jne 0x40a459
mov dword [esi], edi
mov al, 1
jmp 0x40a4a5
push 4
push 0x3000
push eax
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [esi], eax
cmp eax, edi
je 0x40a49a
push edi
lea ecx, [ebp + 8]
push ecx
push dword [esi + 4]
push eax
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40a48c
mov eax, dword [ebp + 8]
cmp eax, dword [esi + 4]
je 0x40a455
push 0x8000
push edi
push dword [esi]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
pop edi
leave
ret 4

Function at 0x40a548
Capabilities:
Delete file
Set file attributes

Disassembly:
push 0x80
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
setne al
ret 4

Function at 0x40a569
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x410
push esi
push edi
lea eax, [ebp - 0x208]
push eax
push 0xf6
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
dec eax
cmp eax, 0xf5
ja 0x40a5e6
xor esi, esi
push dword [ebp + 8]
call fcn.0040651f
push eax
push 0x403444
push 0x40344c
mov edx, 0x104
lea edi, [ebp - 0x410]
call fcn.00405ed9
add esp, 0x10
cmp eax, 0xffffffff
je 0x40a5e6
lea eax, [ebp - 0x208]
push eax
push dword [ebp + 0xc]
mov eax, edi
call fcn.0040aa77
test al, al
je 0x40a5e0
push 0
push 0
push dword [ebp + 0xc]
call fcn.0040a39d
test al, al
jne 0x40a5ee
inc esi
cmp esi, 0x64
jb 0x40a590
xor al, al
pop edi
pop esi
leave
ret 8
mov al, 1
jmp 0x40a5e8

Function at 0x40a5f2
Capabilities:
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x410
push esi
push edi
lea eax, [ebp - 0x208]
push eax
push 0xf6
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
dec eax
cmp eax, 0xf5
ja 0x40a66b
xor esi, esi
call fcn.0040651f
push eax
push 0x403444
push 0x403460
mov edx, 0x104
lea edi, [ebp - 0x410]
call fcn.00405ed9
add esp, 0xc
cmp eax, 0xffffffff
je 0x40a66b
lea eax, [ebp - 0x208]
push eax
push dword [ebp + 8]
mov eax, edi
call fcn.0040aa77
test al, al
je 0x40a665
push 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40a673
inc esi
cmp esi, 0x64
jb 0x40a619
xor al, al
pop edi
pop esi
leave
ret 4
mov al, 1
jmp 0x40a66d
Function at 0x40a7f9
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0xc]
push esi
push edi
push ebp
xor bl, bl
call dword [sym.imp.SHLWAPI.dll_PathSkipRootW]
mov esi, eax
test esi, esi
jne 0x40a812
mov esi, ebp
movzx eax, word [esi]
cmp eax, 0x5c
je 0x40a824
cmp eax, 0x2f
je 0x40a824
test ax, ax
jne 0x40a850
mov edi, eax
xor eax, eax
push ebp
mov word [esi], ax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40a844
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jmp 0x40a846
test al, 0x10
je 0x40a857
test di, di
je 0x40a855
mov word [esi], di
add esi, 2
jmp 0x40a812
mov bl, 1
pop edi
pop esi
pop ebp
mov al, bl
pop ebx
ret 4

Function at 0x40a860
Capabilities:
Delete directory
Enumerate files on windows
Enumerate files recursively
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x458
push esi
push edi
mov edi, ecx
push edi
lea eax, [esp + 0xc]
push eax
mov eax, 0x403470
call fcn.0040aa77
test al, al
je 0x40a8fd
lea eax, [esp + 0x210]
push eax
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40a8fd
lea eax, [esp + 0x23c]
call fcn.0040a677
test al, al
jne 0x40a8e3
push edi
lea eax, [esp + 0xc]
push eax
lea eax, [esp + 0x244]
call fcn.0040aa77
test al, al
je 0x40a8e3
test byte [esp + 0x210], 0x10
je 0x40a8d9
lea ecx, [esp + 8]
call fcn.0040a860
jmp 0x40a8e3
lea eax, [esp + 8]
push eax
call fcn.0040a548
lea eax, [esp + 0x210]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40a89e
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
pop edi
setne al
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40a91b
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x464
push ebx
push esi
push edi
push ecx
lea eax, [esp + 0x26c]
push eax
mov eax, 0x403470
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], ecx
call fcn.0040aa77
test al, al
je 0x40aa6e
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x26c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0xc], eax
cmp eax, 0xffffffff
je 0x40aa6e
mov ebx, dword [ebp + 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
xor esi, esi
cmp dword [ebp + 0x18], esi
je 0x40a992
push esi
push dword [ebp + 0x18]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x40aa64
lea eax, [esp + 0x44]
call fcn.0040a677
test al, al
jne 0x40aa4d
mov eax, dword [esp + 0x18]
and eax, 0x10
je 0x40a9b1
test bl, 2
jne 0x40a9ba
cmp eax, esi
jne 0x40a9fa
test bl, 4
je 0x40a9fa
cmp dword [ebp + 8], esi
jbe 0x40a9fa
mov eax, dword [esp + 0x14]
push dword [eax + esi*4]
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.SHLWAPI.dll_PathMatchSpecW]
test eax, eax
jne 0x40a9dd
inc esi
cmp esi, dword [ebp + 8]
jb 0x40a9bf
jmp 0x40a9fa
push dword [ebp + 0x14]
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x1c]
call dword [ebp + 0x10]
test al, al
je 0x40aa64
cmp dword [ebp + 0x20], 0
je 0x40a9fa
push dword [ebp + 0x20]
call edi
test byte [esp + 0x18], 0x10
je 0x40aa4d
test bl, 1
je 0x40aa4d
push dword [esp + 0x10]
lea eax, [esp + 0x26c]
push eax
lea eax, [esp + 0x4c]
call fcn.0040aa77
test al, al
je 0x40aa4d
cmp dword [ebp + 0x1c], 0
je 0x40aa2a
push dword [ebp + 0x1c]
call edi
push dword [ebp + 0x20]
mov edx, dword [esp + 0x18]
push dword [ebp + 0x1c]
lea ecx, [esp + 0x270]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push ebx
push dword [ebp + 8]
call fcn.0040a91b
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40a976
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_FindClose]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
Function at 0x40ade1
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
test byte [ebp + 0xc], 1
mov eax, dword [ebp + 8]
mov edx, dword [eax]
push ebx
push esi
push edi
mov dword [ebp - 4], edx
je 0x40ae8a
xor eax, eax
call fcn.0040acae
mov esi, eax
test esi, esi
je 0x40ae8a
mov ebx, 0xfff0ffff
mov edi, 0x70000000
cmp dword [esi], 0
jbe 0x40ae7a
mov eax, dword [esi + 4]
test eax, 0xc0000
je 0x40ae2a
and dword [esi], 0
jmp 0x40ae7a
and eax, ebx
mov dword [esi + 4], eax
and eax, edi
mov dword [ebp + 0xc], eax
mov eax, esi
jmp 0x40ae54
mov ecx, dword [eax]
cmp ecx, dword [esi]
jne 0x40ae54
mov ecx, dword [eax + 4]
and ecx, edi
cmp ecx, dword [ebp + 0xc]
jne 0x40ae54
test dword [eax + 4], 0xe0000
jne 0x40ae62
and dword [eax], 0
mov edx, dword [ebp - 4]
call fcn.0040acae
test eax, eax
jne 0x40ae38
jmp 0x40ae7a
and dword [esi], 0
mov ecx, dword [eax + 4]
test ecx, 0x80000
je 0x40ae75
and dword [eax], 0
jmp 0x40ae7a
and ecx, ebx
mov dword [eax + 4], ecx
mov edx, dword [ebp - 4]
mov eax, esi
call fcn.0040acae
mov esi, eax
test esi, esi
jne 0x40ae16
call fcn.0040aad3
mov esi, eax
mov dword [ebp + 0xc], esi
test esi, esi
je 0x40af78
xor eax, eax
jmp 0x40aefb
cmp dword [edi], 0
jbe 0x40aef9
mov ebx, dword [edi + 8]
mov ecx, dword [esi + 0x14]
add ebx, 0x10
add ecx, ebx
lea esi, [ebp + 0xc]
call fcn.00405171
mov esi, dword [ebp + 0xc]
test al, al
je 0x40af72
mov eax, dword [esi + 0x14]
mov ecx, dword [edi]
add eax, esi
mov dword [eax], ecx
mov ecx, dword [edi + 4]
mov dword [eax + 4], ecx
mov ecx, dword [edi + 8]
mov dword [eax + 8], ecx
mov ecx, dword [edi + 0xc]
mov dword [eax + 0xc], ecx
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x40aef3
push ecx
lea ecx, [edi + 0x10]
push ecx
add eax, 0x10
push eax
call fcn.00405222
inc dword [esi + 0x1c]
add dword [esi + 0x14], ebx
mov eax, edi
mov edx, dword [ebp - 4]
call fcn.0040acae
mov edi, eax
test edi, edi
jne 0x40aea0
mov eax, dword [esi + 0x14]
sub eax, 0x30
push eax
lea eax, [esi + 0x30]
push eax
lea eax, [esi + 0x20]
push eax
call fcn.0040648b
test al, al
je 0x40af72
push edi
push 0x14
push esi
call fcn.004067c3
cmp dword [ebp + 0x10], 0
mov edi, dword [esi + 0x14]
je 0x40af61
xor eax, eax
inc eax
cmp edi, eax
jbe 0x40af46
mov cl, byte [eax + esi - 1]
xor byte [eax + esi], cl
inc eax
cmp eax, edi
jb 0x40af3a
push 0x102
push dword [ebp + 0x10]
lea eax, [ebp - 0x108]
push eax
call fcn.00405222
push edi
push esi
call fcn.00406662
push dword [ebp - 4]
call fcn.004051e6
mov eax, dword [ebp + 8]
mov dword [eax], esi
mov eax, edi
jmp 0x40af7a
push esi
call fcn.004051e6
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x40af81
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
push esi
mov esi, eax
lea eax, [edi - 0x30]
cmp eax, 0x9fffd0
ja 0x40afe0
cmp dword [ebp + 8], 0
je 0x40afcd
push 0x102
push dword [ebp + 8]
lea eax, [ebp - 0x104]
push eax
call fcn.00405222
push edi
push esi
call fcn.00406662
test edi, edi
je 0x40afcd
lea eax, [edi - 1]
test eax, eax
je 0x40afcd
mov cl, byte [eax + esi - 1]
xor byte [eax + esi], cl
dec eax
jne 0x40afc3
cmp dword [esi + 0x14], edi
ja 0x40afe0
call fcn.0040aaa4
test al, al
je 0x40afe0
mov eax, dword [esi + 0x14]
jmp 0x40afe2
xor eax, eax
pop esi
leave
ret 4

Function at 0x40b05b
Capabilities:
Clear file content
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push edi
xor edi, edi
push edi
push 0x80
push 4
push edi
push 1
push 0xc0000000
push dword [ebp + 8]
mov byte [ebp - 1], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi], eax
cmp eax, 0xffffffff
je 0x40b182
push eax
call fcn.0040a521
mov ecx, eax
and ecx, edx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
cmp ecx, 0xffffffff
je 0x40b0c7
or eax, edx
je 0x40b16c
push edi
lea eax, [ebp + 8]
push eax
push 5
lea eax, [ebp - 0xc]
push eax
push dword [esi]
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40b0d9
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [esi], 0xffffffff
jmp 0x40b182
xor edi, edi
cmp dword [ebp + 8], edi
je 0x40b16c
cmp dword [ebp + 8], 5
jne 0x40b146
mov eax, dword [ebp - 0xc]
xor eax, dword [esi + 0x10]
xor ecx, ecx
mov ebx, eax
add ebx, dword [ebp - 0x18]
mov edi, ecx
adc edi, dword [ebp - 0x14]
add ebx, 5
adc edi, ecx
mov dword [ebp - 0xc], eax
cmp edi, dword [ebp - 0x1c]
ja 0x40b144
jb 0x40b10e
cmp ebx, dword [ebp - 0x20]
ja 0x40b144
cmp eax, 0xa00000
ja 0x40b144
push 1
push ecx
push eax
push dword [esi]
call fcn.0040a4d1
test al, al
je 0x40b0c7
push 0
lea eax, [ebp + 8]
push eax
push 5
lea eax, [ebp - 0xc]
push eax
push dword [esi]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40b0d7
jmp 0x40b0c7
xor edi, edi
push edi
push dword [ebp - 0x14]
push dword [ebp - 0x18]
push dword [esi]
call fcn.0040a4d1
test al, al
je 0x40b0c7
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x40b0c7
or dword [esi + 8], 0xffffffff
or dword [esi + 0xc], 0xffffffff
push edi
push edi
push edi
push dword [esi]
mov byte [ebp - 1], 1
call fcn.0040a4d1
mov al, byte [ebp - 1]
pop edi
pop ebx
leave
ret 4
Function at 0x40b1a9
Capabilities:
Clear file content
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
xor ebx, ebx
cmp dword [ebp + 0xc], 0xa00000
push edi
mov byte [ebp - 1], bl
ja 0x40b283
push dword [esi]
call fcn.0040a4f1
mov dword [ebp - 0x20], eax
and eax, edx
mov dword [ebp - 0x1c], edx
cmp eax, 0xffffffff
je 0x40b283
push 2
push ebx
push ebx
push dword [esi]
call fcn.0040a4d1
test al, al
je 0x40b283
push dword [esi]
call fcn.0040a4f1
mov dword [ebp - 0x18], eax
and eax, edx
mov dword [ebp - 0x14], edx
cmp eax, 0xffffffff
je 0x40b26d
push 5
push ebx
lea eax, [ebp - 0x10]
push eax
call fcn.00405299
mov eax, dword [esi + 0x10]
xor eax, dword [ebp + 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
mov dword [ebp - 0x10], eax
lea eax, [ebp - 8]
push eax
push 5
lea eax, [ebp - 0x10]
push eax
push dword [esi]
call edi
test eax, eax
je 0x40b257
cmp dword [ebp - 8], 5
jne 0x40b257
push ebx
lea eax, [ebp - 8]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi]
call edi
test eax, eax
je 0x40b257
mov eax, dword [ebp + 0xc]
cmp dword [ebp - 8], eax
jne 0x40b257
mov byte [ebp - 1], 1
jmp 0x40b26d
push ebx
push dword [ebp - 0x14]
push dword [ebp - 0x18]
push dword [esi]
call fcn.0040a4d1
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push ebx
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [esi]
call fcn.0040a4d1
mov al, byte [ebp - 1]
pop edi
pop ebx
leave
ret 8

Function at 0x40b28c
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push edi
push dword [esi]
call fcn.0040a4f1
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
xor ebx, ebx
jmp 0x40b2e8
cmp dword [ebp - 4], ebx
je 0x40b303
cmp dword [ebp - 4], 5
jne 0x40b360
mov eax, dword [ebp - 0xc]
xor eax, dword [esi + 0x10]
mov dword [ebp - 0xc], eax
cmp eax, 0xa00000
ja 0x40b360
test byte [ebp - 8], 1
jne 0x40b2d2
cmp eax, ebx
jne 0x40b30c
push 1
push ebx
push eax
push dword [esi]
call fcn.0040a4d1
test al, al
je 0x40b360
push dword [esi]
call fcn.0040a4f1
push ebx
mov dword [ebp - 0x18], eax
lea eax, [ebp - 4]
push eax
push 5
lea eax, [ebp - 0xc]
push eax
push dword [esi]
mov dword [ebp - 0x14], edx
call edi
test eax, eax
jne 0x40b2a5
jmp 0x40b360
mov eax, dword [ebp + 0xc]
mov dword [eax], ebx
mov al, 1
jmp 0x40b362
call fcn.004051b6
mov ebx, eax
test ebx, ebx
je 0x40b360
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp - 0xc]
push ebx
push dword [esi]
call edi
test eax, eax
je 0x40b35a
mov edi, dword [ebp - 0xc]
cmp dword [ebp - 4], edi
jne 0x40b35a
push dword [ebp + 0x10]
mov eax, ebx
call fcn.0040af81
mov dword [ebp - 4], eax
test eax, eax
je 0x40b35a
mov ecx, dword [ebp + 8]
mov dword [ecx], ebx
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov eax, dword [ebp - 0x18]
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x14]
mov dword [esi + 0xc], eax
jmp 0x40b308
push ebx
call fcn.004051e6
xor al, al
pop edi
pop ebx
leave
ret 0xc