joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4c22f8
Capabilities:
Copy file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
mov ebx, edx
mov dword [ebp - 4], eax
mov byte [ebp - 5], 1
mov eax, dword [ebp - 4]
lea edx, [eax + 0x2b4]
mov eax, ebx
call fcn.004c1bb8
test al, al
je 0x4c2428
mov eax, dword [ebp - 4]
call fcn.004c208c
mov eax, dword [ebp - 4]
mov ax, word [eax + 0x68]
mov word [ebp - 8], ax
mov dx, 0xfff5
mov eax, dword [ebp - 4]
call fcn.0043ea10
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2cc]
call fcn.00404d00
push eax
mov eax, ebx
call fcn.00404d00
push eax
call sub.kernel32.dll_CopyFileA
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2cc]
call fcn.00404d00
push eax
call sub.kernel32.dll_SetFileAttributesA
push 2
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x2cc]
mov dl, 1
mov eax, dword [0x412ebc]
call fcn.0041779c
mov esi, eax
mov eax, dword [ebp - 4]
mov dword [eax + 0x2a4], esi
xor eax, eax
push ebp
push 0x4c2421
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, esi
xor edx, edx
call fcn.00417418
mov eax, dword [ebp - 4]
add eax, 0x2c8
mov edx, ebx
call fcn.004048e8
mov byte [ebp - 5], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4c2428
mov dx, word [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.0043ea10
mov eax, dword [ebp - 4]
call fcn.004c48f8
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2d0]
xor edx, edx
call fcn.00414e24
mov eax, dword [ebp - 4]
call fcn.004c2480
mov eax, dword [ebp - 4]
mov byte [eax + 0x321], 0
mov eax, dword [ebp - 4]
mov byte [eax + 0x308], 0
push 1
push 1
xor ecx, ecx
mov edx, 2
mov eax, dword [ebp - 4]
call fcn.004b20c0
ret
mov al, byte [ebp - 5]
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret
Function at 0x4c8bf4
Capabilities:
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff6c
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x94], ecx
mov ebx, edx
mov esi, eax
xor eax, eax
push ebp
push 0x4c8d76
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 0x90]
mov eax, esi
call fcn.004c88d4
mov eax, ebx
call fcn.00422834
dec al
je 0x4c8c38
dec al
je 0x4c8c3e
jmp 0x4c8c44
mov byte [ebp - 0x77], 2
jmp 0x4c8c48
mov byte [ebp - 0x77], 1
jmp 0x4c8c48
mov byte [ebp - 0x77], 0
mov eax, dword [ebp - 0x8c]
or eax, 0x80000000
or eax, 1
or eax, 2
or eax, 4
or eax, 8
or eax, 0x20000000
or eax, 0x40000000
mov dword [ebp - 0x8c], eax
mov eax, ebx
call fcn.00422790
shl eax, 2
lea eax, [eax + eax*4]
mov dword [ebp - 0x84], eax
mov eax, ebx
call fcn.004227ec
test al, 1
je 0x4c8c94
or dword [ebp - 0x88], 1
mov eax, ebx
call fcn.004227ec
test al, 2
je 0x4c8ca6
or dword [ebp - 0x88], 2
mov eax, ebx
call fcn.004227ec
test al, 4
je 0x4c8cb8
or dword [ebp - 0x88], 4
mov eax, ebx
call fcn.004227ec
test al, 8
je 0x4c8cca
or dword [ebp - 0x88], 8
lea edx, [ebp - 0x94]
mov eax, ebx
call fcn.00422708
mov edx, dword [ebp - 0x94]
lea eax, [ebp - 0x76]
mov ecx, 0x20
call fcn.0040b2a8
mov edi, dword [ebx + 0x18]
cmp edi, 0x80000008
je 0x4c8cfd
cmp edi, 0x20000000
jne 0x4c8d09
mov dword [ebp - 0x88], 0x40000000
jmp 0x4c8d13
mov eax, edi
call fcn.00421e44
mov dword [ebp - 0x7c], eax
or dword [ebp - 0x8c], 0x8000000
mov eax, ebx
call fcn.0042287c
mov byte [ebp - 0x78], al
lea eax, [ebp - 0x3c]
push eax
push 0x3c
mov eax, ebx
call fcn.004224e8
push eax
call sub.gdi32.dll_GetObjectA
test eax, eax
je 0x4c8d50
or dword [ebp - 0x8c], 0x400000
mov ax, word [ebp - 0x2c]
mov word [ebp - 0x56], ax
lea edx, [ebp - 0x90]
mov eax, esi
call fcn.004c8940
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4c8d7d
lea eax, [ebp - 0x94]
call fcn.00404894
ret

Function at 0x4ce2ac
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebx
push esi
push edi
add esp, 0xffffffb8
mov esi, ecx
lea edi, [esp]
mov ecx, 0x11
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov cl, 0x47
mov eax, esp
mov ebx, edx
shr ebx, 8
and ebx, 0xffffff
movzx esi, byte [eax]
xor edx, esi
and edx, 0xff
mov edx, dword [edx*4 + 0x575540]
xor ebx, edx
mov edx, ebx
inc eax
dec cl
jne 0x4ce2c5
mov eax, edx
add esp, 0x48
pop edi
pop esi
pop ebx
ret
Function at 0x4d0858
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x10], ecx
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x4d095d
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebx + 0x3c]
lea eax, [ebp - 0xc]
call fcn.0040347c
mov edx, 0x4d096c
lea eax, [ebp - 0xc]
mov cl, 3
call fcn.0040344c
lea edx, [ebp - 0xc]
lea eax, [ebp - 4]
mov cl, 3
call fcn.00403498
lea eax, [ebp - 0x10]
lea edx, [ebp - 4]
call fcn.00404ae0
mov edx, dword [ebp - 0x10]
lea eax, [ebp - 7]
call fcn.0040b274
lea eax, [ebp - 7]
push eax
call sub.kernel32.dll_GetDriveTypeA
cmp eax, 6
ja case.default.0x4d08c7
jmp dword [eax*4 + 0x4d08ce]
mov edi, esi
mov esi, 0x4d0970
mov ecx, 5
rep movsd dword es:[edi], dword [esi]
jmp case.default.0x4d08c7
mov edi, esi
mov esi, 0x4d0984
mov ecx, 7
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
jmp case.default.0x4d08c7
mov edi, esi
mov esi, 0x4d09a4
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
jmp case.default.0x4d08c7
mov edi, esi
mov esi, 0x4d09b0
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
jmp case.default.0x4d08c7
mov edi, esi
mov esi, 0x4d09b8
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
jmp case.default.0x4d08c7
mov edi, esi
mov esi, 0x4d09c0
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
jmp case.default.0x4d08c7
mov edi, esi
mov esi, 0x4d09c8
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d0964
lea eax, [ebp - 0x10]
call fcn.00404894
ret
Function at 0x4d0c08
Capabilities:
Encode data using base64
Encrypt data using rc4 ksa

Disassembly:
push ebx
push esi
push edi
push ebp
push ecx
mov dword [esp], ecx
mov esi, eax
mov ebp, edx
xor ebx, ebx
xor edi, edi
mov eax, dword [esp]
mov ecx, 3
cdq
idiv ecx
test eax, eax
jle 0x4d0ca4
xor edx, edx
mov dl, byte [esi + ebx]
shr edx, 2
mov dl, byte [edx + 0x575a54]
mov byte [ebp + edi], dl
mov dl, byte [esi + ebx]
and dl, 3
and edx, 0xff
shl edx, 4
xor ecx, ecx
mov cl, byte [esi + ebx + 1]
shr ecx, 4
add edx, ecx
push dword [edx + 0x575a54]
pop edx
mov byte [ebp + edi + 1], dl
mov dl, byte [esi + ebx + 1]
and dl, 0xf
and edx, 0xff
shl edx, 2
xor ecx, ecx
mov cl, byte [esi + ebx + 2]
shr ecx, 6
add edx, ecx
push dword [edx + 0x575a54]
pop edx
mov byte [ebp + edi + 2], dl
mov dl, byte [esi + ebx + 2]
and dl, 0x3f
and edx, 0xff
mov dl, byte [edx + 0x575a54]
mov byte [ebp + edi + 3], dl
add edi, 4
add ebx, 3
dec eax
jne 0x4d0c27
mov eax, dword [esp]
mov ecx, 3
cdq
idiv ecx
dec edx
je 0x4d0cba
dec edx
je 0x4d0cef
jmp 0x4d0d40
xor eax, eax
mov al, byte [esi + ebx]
shr eax, 2
mov al, byte [eax + 0x575a54]
mov byte [ebp + edi], al
mov al, byte [esi + ebx]
and al, 3
and eax, 0xff
shl eax, 4
mov al, byte [eax + 0x575a54]
mov byte [ebp + edi + 1], al
mov byte [ebp + edi + 2], 0x3d
mov byte [ebp + edi + 3], 0x3d
jmp 0x4d0d40
xor eax, eax
mov al, byte [esi + ebx]
shr eax, 2
mov al, byte [eax + 0x575a54]
mov byte [ebp + edi], al
mov al, byte [esi + ebx]
and al, 3
and eax, 0xff
shl eax, 4
xor edx, edx
mov dl, byte [esi + ebx + 1]
shr edx, 4
add eax, edx
mov al, byte [eax + 0x575a54]
mov byte [ebp + edi + 1], al
mov al, byte [esi + ebx + 1]
and al, 0xf
and eax, 0xff
shl eax, 2
mov al, byte [eax + 0x575a54]
mov byte [ebp + edi + 2], al
mov byte [ebp + edi + 3], 0x3d
mov eax, dword [esp]
add eax, 2
mov ecx, 3
cdq
idiv ecx
shl eax, 2
pop edx
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x4d0da0
Capabilities:
Encode data using base64

Disassembly:
push esi
push edi
push ebp
add esp, 0xfffffff0
mov dword [esp], ecx
mov edi, eax
mov dword [esp + 8], edx
xor esi, esi
xor ebp, ebp
xor eax, eax
mov edx, dword [esp]
test edx, edx
jns 0x4d0dbf
add edx, 3
sar edx, 2
test edx, edx
jle 0x4d0ecc
mov dword [esp + 0xc], edx
mov edx, 4
lea eax, [esp + 4]
xor ecx, ecx
mov cl, byte [edi + esi]
cmp ecx, 0x3d
jg 0x4d0df5
je 0x4d0e35
sub ecx, 0x2b
je 0x4d0e2b
sub ecx, 4
je 0x4d0e30
dec ecx
sub ecx, 0xa
jb 0x4d0e1e
jmp 0x4d0e38
add ecx, 0xffffffbf
sub ecx, 0x1a
jb 0x4d0e07
add ecx, 0xfffffffa
sub ecx, 0x1a
jb 0x4d0e11
jmp 0x4d0e38
mov cl, byte [edi + esi]
sub cl, 0x41
mov byte [eax], cl
jmp 0x4d0e38
mov cl, byte [edi + esi]
sub cl, 0x61
add cl, 0x1a
mov byte [eax], cl
jmp 0x4d0e38
mov cl, byte [edi + esi]
sub cl, 0x30
add cl, 0x34
mov byte [eax], cl
jmp 0x4d0e38
mov byte [eax], 0x3e
jmp 0x4d0e38
mov byte [eax], 0x3f
jmp 0x4d0e38
mov byte [eax], 0xff
inc esi
inc eax
dec edx
jne 0x4d0dd7
mov al, byte [esp + 4]
shl eax, 2
xor edx, edx
mov dl, byte [esp + 5]
shr edx, 4
or al, dl
mov edx, dword [esp + 8]
mov byte [edx + ebp], al
lea eax, [ebp + 1]
mov dl, byte [esp + 6]
cmp dl, 0xff
je 0x4d0e89
cmp byte [esp + 7], 0xff
jne 0x4d0e89
mov al, byte [esp + 5]
shl eax, 4
and edx, 0xff
shr edx, 2
or al, dl
mov edx, dword [esp + 8]
mov byte [edx + ebp + 1], al
lea eax, [ebp + 2]
inc ebp
jmp 0x4d0ec1
cmp dl, 0xff
je 0x4d0ec1
mov al, byte [esp + 5]
shl eax, 4
and edx, 0xff
shr edx, 2
or al, dl
mov edx, dword [esp + 8]
mov byte [edx + ebp + 1], al
mov eax, dword [esp + 8]
mov dl, byte [esp + 6]
shl edx, 6
or dl, byte [esp + 7]
mov byte [eax + ebp + 2], dl
lea eax, [ebp + 3]
add ebp, 2
inc ebp
dec dword [esp + 0xc]
jne 0x4d0dce
add esp, 0x10
pop ebp
pop edi
pop esi
ret
Function at 0x4d2fb0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov ebx, eax
cmp byte [ebx + 0x24], 0
jne 0x4d2fda
mov ecx, 0x4d3038
mov dl, 1
mov eax, dword [0x4d26b0]
call fcn.0040e328
call fcn.004041fc
mov dword [ebp - 8], edx
mov esi, dword [ebp - 4]
mov eax, dword [ebp + 8]
test eax, eax
jle 0x4d3027
mov dword [ebp - 0xc], eax
mov ecx, dword [ebx + 0x34]
mov edx, dword [ebx + 0x30]
mov eax, ebx
mov edi, dword [eax]
call dword [edi + 0x60]
mov eax, dword [ebp - 8]
mov al, byte [eax]
mov edx, dword [ebx + 0x34]
xor al, byte [edx]
mov byte [esi], al
mov ecx, dword [ebx + 0x38]
dec ecx
mov edx, dword [ebx + 0x30]
mov eax, dword [ebx + 0x30]
inc eax
call fcn.0040319c
mov eax, dword [ebx + 0x30]
add eax, dword [ebx + 0x38]
dec eax
mov dl, byte [esi]
mov byte [eax], dl
inc dword [ebp - 8]
inc esi
dec dword [ebp - 0xc]
jne 0x4d2fea
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x4d3050
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov ebx, eax
cmp byte [ebx + 0x24], 0
jne 0x4d307a
mov ecx, 0x4d30e0
mov dl, 1
mov eax, dword [0x4d26b0]
call fcn.0040e328
call fcn.004041fc
mov esi, edx
mov eax, dword [ebp - 4]
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
test eax, eax
jle 0x4d30cf
mov dword [ebp - 0x10], eax
mov al, byte [esi]
mov byte [ebp - 9], al
mov ecx, dword [ebx + 0x34]
mov edx, dword [ebx + 0x30]
mov eax, ebx
mov edi, dword [eax]
call dword [edi + 0x60]
mov eax, dword [ebx + 0x34]
mov al, byte [eax]
xor al, byte [esi]
mov edx, dword [ebp - 8]
mov byte [edx], al
mov ecx, dword [ebx + 0x38]
dec ecx
mov edx, dword [ebx + 0x30]
mov eax, dword [ebx + 0x30]
inc eax
call fcn.0040319c
mov eax, dword [ebx + 0x30]
add eax, dword [ebx + 0x38]
dec eax
mov dl, byte [ebp - 9]
mov byte [eax], dl
inc esi
inc dword [ebp - 8]
dec dword [ebp - 0x10]
jne 0x4d308c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x4d3698
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0
push 0
push ebx
push esi
push edi
mov ebx, edx
mov esi, eax
xor eax, eax
push ebp
push 0x4d371a
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, dword [0x4d29d4]
mov eax, 0x14
call fcn.004056d4
mov edi, eax
mov dword [edi + 0xc], esi
lea edx, [ebp - 8]
mov eax, esi
call dword [eax + 0x34]
mov eax, dword [ebp - 8]
lea edx, [ebp - 4]
call fcn.0040a050
mov edx, dword [ebp - 4]
lea eax, [edi + 4]
call fcn.004048e8
mov eax, esi
call dword [eax + 0x30]
mov dword [edi + 8], eax
mov eax, dword [0x579ae0]
mov dword [edi], eax
mov byte [edi + 0x10], bl
mov dword [0x579ae0], edi
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d3721
lea eax, [ebp - 8]
mov edx, 2
call fcn.004048b8
ret
Function at 0x4d3728
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0
push 0
push ebx
push esi
mov esi, eax
xor eax, eax
push ebp
push 0x4d37a4
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, dword [0x4d29fc]
mov eax, 0x10
call fcn.004056d4
mov ebx, eax
mov dword [ebx + 0xc], esi
lea edx, [ebp - 8]
mov eax, esi
call dword [eax + 0x34]
mov eax, dword [ebp - 8]
lea edx, [ebp - 4]
call fcn.0040a050
mov edx, dword [ebp - 4]
lea eax, [ebx + 4]
call fcn.004048e8
mov eax, esi
call dword [eax + 0x30]
mov dword [ebx + 8], eax
mov eax, dword [0x579ae4]
mov dword [ebx], eax
mov dword [0x579ae4], ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d37ab
lea eax, [ebp - 8]
mov edx, 2
call fcn.004048b8
ret

Function at 0x4d3800
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
mov esi, ecx
test esi, esi
jle 0x4d3820
mov ecx, 1
mov ebx, edx
add ebx, ecx
dec ebx
mov bl, byte [ebx]
mov edi, eax
add edi, ecx
dec edi
xor byte [edi], bl
inc ecx
dec esi
jne 0x4d380e
pop edi
pop esi
pop ebx
ret

Function at 0x4d8534
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
xor ecx, ecx
mov dword [ebp - 0x10], ecx
mov ebx, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00404cf0
xor eax, eax
push ebp
push 0x4d8601
push dword fs:[eax]
mov dword fs:[eax], esp
push 1
call sub.kernel32.dll_SetErrorMode
mov dword [ebp - 0xc], eax
xor eax, eax
push ebp
push 0x4d85dc
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call fcn.00404b3c
test eax, eax
jle 0x4d85c1
push pe_nt_image_headers32
lea eax, [ebx + 0x10d]
push eax
lea eax, [ebx + 8]
push eax
lea eax, [ebx + 4]
push eax
push ebx
push pe_nt_image_headers32
lea eax, [ebx + 0xc]
push eax
lea edx, [ebp - 0x10]
mov eax, dword [ebp - 4]
call fcn.004dcb70
mov eax, dword [ebp - 0x10]
call fcn.00404d00
push eax
call sub.kernel32.dll_GetVolumeInformationA
neg eax
sbb eax, eax
neg eax
mov byte [ebp - 5], al
jmp 0x4d85c5
mov byte [ebp - 5], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d85e3
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_SetErrorMode
ret
Function at 0x4d888c
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov ebx, ecx
mov dword [ebp - 4], edx
mov esi, eax
mov eax, dword [ebp - 4]
call fcn.00404cf0
xor eax, eax
push ebp
push 0x4d896c
push dword fs:[eax]
mov dword fs:[eax], esp
cmp byte [esi + 0x7c], 4
jne 0x4d88c5
mov byte [ebp - 5], 1
jmp 0x4d894e
mov eax, ebx
xor ecx, ecx
mov edx, 0x18
call fcn.004035bc
push 1
call sub.kernel32.dll_SetErrorMode
mov dword [ebp - 0xc], eax
xor eax, eax
push ebp
push 0x4d8947
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebx + 0xc]
push eax
lea eax, [ebx + 8]
push eax
lea eax, [ebx + 4]
push eax
push ebx
lea edx, [ebp - 0x10]
mov eax, dword [ebp - 4]
call fcn.004dcb70
mov eax, dword [ebp - 0x10]
call fcn.00404d00
push eax
call sub.kernel32.dll_GetDiskFreeSpaceA
neg eax
sbb eax, eax
neg eax
mov byte [ebp - 5], al
mov eax, dword [ebx + 4]
imul dword [ebx]
imul dword [ebx + 8]
mov dword [ebx + 0x14], eax
mov eax, dword [ebx + 4]
imul dword [ebx]
imul dword [ebx + 0xc]
mov dword [ebx + 0x10], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d894e
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_SetErrorMode
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d8973
lea eax, [ebp - 0x10]
call fcn.00404894
lea eax, [ebp - 4]
call fcn.00404894
ret

Function at 0x4d8a78
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
xor ecx, ecx
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
call fcn.00404cf0
xor eax, eax
push ebp
push 0x4d8ae3
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call fcn.00404b3c
test eax, eax
jle 0x4d8ac6
lea edx, [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.004dcb70
mov eax, dword [ebp - 8]
call fcn.00404d00
push eax
call sub.kernel32.dll_GetDriveTypeA
mov ebx, eax
jmp 0x4d8ac8
mov bl, 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d8aea
lea eax, [ebp - 8]
mov edx, 2
call fcn.004048b8
ret

Function at 0x4d900c
Capabilities:
Get file size

Disassembly:
push ebx
push ecx
push esp
push eax
call sub.kernel32.dll_GetFileSize_1
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4d9029
call sub.kernel32.dll_GetLastError_1
test eax, eax
je 0x4d9029
xor ebx, ebx
jmp 0x4d9032
mov eax, dword [esp]
mov edx, eax
neg eax
add ebx, eax
mov eax, ebx
pop edx
pop ebx
ret
Function at 0x4dc450
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
push esi
push edi
mov ebx, eax
mov esi, 0x579b1c
mov edx, dword [esi]
mov eax, ebx
call fcn.004dcf5c
mov edi, eax
mov dword [esi], edi
and edi, 0xff
add dword [esi + 4], edi
imul ebx, dword [esi + 4], 0x8088405
inc ebx
mov dword [esi + 4], ebx
mov eax, ebx
call fcn.00408de4
call fcn.00408de8
mov edx, dword [esi + 8]
call fcn.004dcf5c
mov dword [esi + 8], eax
pop edi
pop esi
pop ebx
ret

Function at 0x4dc544
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, ecx
mov byte [ebp - 1], dl
mov esi, eax
mov eax, dword [ebp + 8]
call fcn.00404cf0
xor eax, eax
push ebp
push 0x4dc60d
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 2], 0
cmp dword [ebp + 8], 0
je 0x4dc5f7
mov eax, dword [ebp + 8]
call fcn.004dc498
mov al, byte [ebp - 1]
dec eax
test al, al
jb 0x4dc5ba
inc eax
mov byte [ebp - 4], al
mov bl, 0
call fcn.004dc430
xor edx, edx
mov dl, bl
xor ecx, ecx
mov cl, byte [ebp - 1]
add edx, ecx
xor al, byte [esi + edx]
mov byte [ebp - 3], al
mov al, byte [ebp - 3]
call fcn.004dc450
xor eax, eax
mov al, bl
mov dl, byte [ebp - 3]
mov byte [esi + eax], dl
inc ebx
dec byte [ebp - 4]
jne 0x4dc58c
xor eax, eax
mov al, byte [ebp - 1]
mov bl, byte [esi + eax - 1]
and di, 8
cmp di, 8
je 0x4dc5e4
mov eax, dword [ebp + 0x10]
call fcn.00408de4
call fcn.00408de8
cmp bl, al
jne 0x4dc5f7
mov byte [ebp - 2], 1
jmp 0x4dc5f7
xor eax, eax
mov al, bl
movzx edx, word [ebp + 0xc]
shr edx, 8
cmp eax, edx
jne 0x4dc5f7
mov byte [ebp - 2], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4dc614
lea eax, [ebp + 8]
call fcn.00404894
ret

Function at 0x4dd45c
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
test edx, edx
jle 0x4dd486
mov ebx, dword [ecx]
movzx esi, byte [eax]
xor ebx, esi
and ebx, 0xff
movzx ebx, word [ebx*2 + 0x577120]
mov esi, dword [ecx]
shr esi, 8
xor ebx, esi
mov dword [ecx], ebx
inc eax
dec edx
test edx, edx
jg 0x4dd462
pop esi
pop ebx
ret

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

Disassembly:
push ebx
mov ebx, eax
mov eax, ebx
call fcn.00404d00
push eax
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
je 0x4dd4c9
test al, 0x10
jne 0x4dd4cd
xor eax, eax
pop ebx
ret
mov al, 1
pop ebx
ret
Function at 0x4de344
Capabilities:
Read file on windows

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffff8
mov edi, edx
mov esi, eax
xor ebx, ebx
mov byte [esi + 0x50], 0
cmp dword [esi + 0x4c], 4
jbe 0x4de42e
xor ecx, ecx
mov edx, 0x1e24
mov eax, edi
call fcn.004d8fe4
test al, al
je 0x4de3a6
xor eax, eax
mov dword [esp + 4], eax
push 0
lea eax, [esp + 4]
push eax
push 2
lea eax, [esp + 0x10]
push eax
push edi
call sub.kernel32.dll_ReadFile_1
cmp dword [esp + 4], 0x91a
jne 0x4de3a6
mov dword [esi + 0x30], 0x1e25
mov byte [esi + 0x50], 7
mov bl, 1
jmp 0x4de44c
cmp dword [esi + 0x4c], 0x1dc0
jbe 0x4de3ea
xor ecx, ecx
mov edx, 0x1dbc
mov eax, edi
call fcn.004d8fe4
test al, al
je 0x4de3ea
push 0
lea eax, [esp + 4]
push eax
push 4
lea eax, [esp + 0x10]
push eax
push edi
call sub.kernel32.dll_ReadFile_1
cmp dword [esp + 4], 0x4034b50
jne 0x4de3ea
mov dword [esi + 0x30], 0x1dbc
mov bl, 1
jmp 0x4de44c
cmp dword [esi + 0x4c], 0x6441
jbe 0x4de42e
xor ecx, ecx
mov edx, 0x643d
mov eax, edi
call fcn.004d8fe4
test al, al
je 0x4de42e
push 0
lea eax, [esp + 4]
push eax
push 4
lea eax, [esp + 0x10]
push eax
push edi
call sub.kernel32.dll_ReadFile_1
cmp dword [esp + 4], 0x4034b50
jne 0x4de42e
mov dword [esi + 0x30], 0x643d
mov bl, 1
jmp 0x4de44c
test bl, bl
je 0x4de448
mov edx, edi
mov eax, esi
call fcn.004dd9d4
mov byte [esi + 0x50], 0x1d
mov byte [esi + 0x328], 0x10
jmp 0x4de44c
mov byte [esi + 0x50], 0
mov eax, ebx
pop ecx
pop edx
pop edi
pop esi
pop ebx
ret
Function at 0x4de5e4
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0xc], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x4de73f
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 1], 0
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
cmp dword [eax + 0x4c], 0x200
jbe 0x4de729
xor ecx, ecx
xor edx, edx
mov eax, ebx
call fcn.004d8fe4
push 0
lea eax, [ebp - 8]
push eax
push 0x200
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
add eax, 0x124
push eax
push ebx
call sub.kernel32.dll_ReadFile_1
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
cmp byte [eax + 0x1c0], 0x56
jne 0x4de698
mov eax, ebx
call fcn.004d8fd4
mov esi, eax
inc esi
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov dword [eax + 0x30], esi
mov eax, dword [ebp + 8]
add esi, 0x200
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
cmp esi, dword [eax + 0x4c]
jae 0x4de729
push 0
lea eax, [ebp - 8]
push eax
push 0x200
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
add eax, 0x124
push eax
push ebx
call sub.kernel32.dll_ReadFile_1
lea eax, [ebp - 0xc]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
add edx, 0x1b8
mov ecx, 8
call fcn.00404aec
mov eax, dword [ebp - 0xc]
call fcn.004dc370
mov esi, eax
xor ecx, ecx
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
lea edx, [eax + 0x124]
xor eax, eax
lea ebx, [edx + eax]
mov edi, dword [ebp + 8]
mov edi, dword [edi - 4]
add edi, 0x1b8
cmp ebx, edi
jl 0x4de6f4
lea ebx, [edx + eax]
mov edi, dword [ebp + 8]
mov edi, dword [edi - 4]
add edi, 0x1b8
add edi, 8
cmp ebx, edi
jl 0x4de6fd
xor ebx, ebx
mov bl, byte [edx + eax]
add ecx, ebx
jmp 0x4de700
add ecx, 0x20
inc eax
cmp eax, 0x200
jne 0x4de6cb
cmp esi, ecx
jne 0x4de71c
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov byte [eax + 0x50], 0x1a
mov byte [ebp - 1], 1
jmp 0x4de729
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov dword [eax + 0x30], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4de746
lea eax, [ebp - 0xc]
call fcn.00404894
ret