joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4dc094
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [ebp + 0xc], 0
push esi
mov esi, ecx
je 0x4dc194
mov eax, dword [esi + 0xc]
test eax, eax
je 0x4dc0c1
dec eax
je 0x4dc0b6
dec eax
jne 0x4dc0c1
push 0xfffffffffffffff4
jmp 0x4dc0b8
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [esi + 4], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
xor edi, edi
cmp dword [esi + 0xc], edi
mov dword [ebp - 4], edi
je 0x4dc110
cmp dword [ebp + 0xc], edi
jbe 0x4dc12b
mov ecx, dword [ebp + 0xc]
sub ecx, edi
mov eax, 0x4000
cmp ecx, eax
jae 0x4dc0e8
mov eax, ecx
push 0
lea ecx, [ebp - 4]
push ecx
push eax
mov eax, dword [ebp + 8]
add eax, edi
push eax
push dword [esi + 4]
call ebx
dec eax
neg eax
sbb al, al
inc al
je 0x4dc12b
add edi, 0x4000
cmp edi, dword [ebp + 0xc]
jb 0x4dc0d8
jmp 0x4dc127
push edi
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 4]
call ebx
dec eax
neg eax
sbb al, al
inc al
test al, al
jne 0x4dc18e
cmp byte [esi + 0x14], 0
je 0x4dc18e
cmp dword [esi + 0xc], 0
jne 0x4dc18e
push 0
lea eax, [esi + 0x17]
mov edi, 0x51c90c
push eax
mov ecx, edi
call fcn.004e4852
test al, al
je 0x4dc181
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0xc]
jae 0x4dc0c9
test eax, eax
jbe 0x4dc0c9
push 0
mov ecx, esi
call fcn.004dbb1e
mov ecx, dword [ebp - 4]
xor edi, edi
sub eax, ecx
sbb edx, edi
push edx
push eax
mov ecx, esi
call fcn.004dc037
jmp 0x4dc0c9
lea eax, [esi + 0x17]
push eax
push 0
mov ecx, edi
call fcn.004e48e6
pop edi
mov byte [esi + 8], 1
pop ebx
pop esi
leave
ret 8

Function at 0x4e48f8
Capabilities:
Get file attributes

Disassembly:
call fcn.004e4e58
test eax, eax
je 0x4e4918
mov eax, dword [esp + 8]
test eax, eax
je 0x4e4918
cmp word [eax], 0
je 0x4e4918
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
jmp 0x4e4922
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov al, cl
ret

Function at 0x4e4945
Capabilities:
Get file attributes

Disassembly:
call fcn.004e4e58
test eax, eax
je 0x4e4964
mov eax, dword [esp + 8]
test eax, eax
je 0x4e4964
cmp word [eax], 0
je 0x4e4964
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
ret
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
ret

Function at 0x4e496f
Capabilities:
Set file attributes

Disassembly:
call fcn.004e4e58
test eax, eax
je 0x4e4993
mov eax, dword [esp + 8]
test eax, eax
je 0x4e4993
cmp word [eax], 0
je 0x4e4993
push dword [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
jmp 0x4e49a1
push dword [esp + 0xc]
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
setne al
ret
Function at 0x4e4aa9
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
push esi
call fcn.004e4e58
test eax, eax
mov esi, dword [ebp + 0xc]
je 0x4e4ace
test esi, esi
je 0x4e4ace
cmp word [esi], 0
je 0x4e4ace
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
jmp 0x4e4ad9
push 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x4e4af6
cmp byte [ebp + 0x10], 0
je 0x4e4af2
push dword [ebp + 0x14]
push esi
push dword [ebp + 8]
call fcn.004e496f
add esp, 0xc
xor eax, eax
jmp 0x4e4b0e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x4e4b0b
cmp eax, 3
je 0x4e4b0b
xor eax, eax
inc eax
jmp 0x4e4b0e
push 2
pop eax
pop esi
pop ebp
ret

Function at 0x4e4eb9
Capabilities:
Move file

Disassembly:
mov eax, 0x4ecc6f
call fcn.004eadec
mov eax, 0x24cc
call fcn.004eae50
mov eax, dword [0x516ad4]
push ebx
push esi
push edi
lea ecx, [ebp - 0x24d0]
mov dword [ebp - 0x10], eax
call fcn.004d906b
mov edi, dword [ebp + 8]
xor ebx, ebx
push ebx
lea eax, [ebp - 0x24d0]
push eax
push dword [ebp + 0xc]
push edi
call fcn.004e562b
add esp, 0x10
test al, al
je 0x4e509b
cmp byte [ebp - 0x24d0], bl
je 0x4e509b
cmp byte [ebp - 0x1850], bl
je 0x4e509b
lea eax, [ebp - 0x1850]
push eax
lea eax, [ebp - 0x24d0]
push eax
call fcn.004dea48
pop ecx
push eax
call fcn.004db53f
test eax, eax
pop ecx
pop ecx
je 0x4e509b
lea eax, [ebp - 0x1850]
push eax
push edi
call fcn.004dea48
pop ecx
push eax
call fcn.004db53f
test eax, eax
pop ecx
pop ecx
jne 0x4e509b
mov dword [ebp - 0x24d8], ebx
mov esi, 0x400
push esi
lea eax, [ebp - 0x410]
push edi
push eax
call fcn.004db4d6
add esp, 0xc
push dword [ebp - 0x24d8]
lea eax, [ebp - 0x410]
push 0x4f6da8
push eax
call fcn.004dea48
pop ecx
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [ebp - 0x410]
push ebx
push eax
call fcn.004e48f8
add esp, 0x14
test al, al
je 0x4e4fc0
add dword [ebp - 0x24d8], 0x7b
cmp dword [ebp - 0x24d8], 0x2710
jl 0x4e4f69
lea eax, [ebp - 0x410]
push ebx
push eax
call fcn.004e48f8
test al, al
pop ecx
pop ecx
jne 0x4e509b
push esi
lea eax, [ebp - 0x810]
push edi
push eax
call fcn.004db4d6
lea eax, [ebp - 0x24d0]
push eax
call fcn.004dea48
add esp, 0x10
push eax
lea eax, [ebp - 0x810]
push eax
call fcn.004dea48
pop ecx
push eax
call sub.MSVCRT.dll_strcpy
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileA]
pop ecx
pop ecx
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x810]
push eax
call esi
test eax, eax
je 0x4e509b
lea ecx, [ebp - 0x1430]
call fcn.004dba05
push ebx
push edi
mov dword [ebp - 4], ebx
mov byte [ebp - 0x24d1], bl
call fcn.004e48f8
test al, al
pop ecx
pop ecx
jne 0x4e505a
push 1
push ebx
push edi
lea ecx, [ebp - 0x1430]
call fcn.004dbe27
mov byte [ebp - 0x24d1], al
lea eax, [ebp - 0x810]
push eax
lea eax, [ebp - 0x410]
push eax
call esi
cmp byte [ebp - 0x24d1], bl
je 0x4e5088
lea ecx, [ebp - 0x1430]
call fcn.004dba6e
lea ecx, [ebp - 0x1430]
call fcn.004dbaec
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1430]
call fcn.004dbce7
mov al, 1
jmp 0x4e509d
xor al, al
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop ebx
call fcn.004eae3c
leave
ret
Function at 0x4e5ff6
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x516ad4]
push ebx
push esi
push edi
push 0x20
push dword [ebp + 8]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x24]
push eax
mov dword [ebp - 0x2c], ecx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
xor eax, eax
push 4
xor ecx, ecx
mov dword [ebp + 8], eax
xor ebx, ebx
pop edx
cmp eax, 0xa
jg 0x4e610f
cmp ebx, edx
jge 0x4e6056
lea esi, [ebp + ebx*4 - 0x24]
mov dword [ebp - 0x28], esi
cmp ecx, edx
jge 0x4e6058
mov edi, dword [ebp - 0x2c]
lea esi, [ecx + eax*4]
lea edi, [edi + esi*4 + 0x14]
mov esi, dword [ebp - 0x28]
add dword [ebp - 0x28], edx
inc ebx
inc ecx
cmp ebx, edx
movsd dword es:[edi], dword [esi]
jl 0x4e603b
cmp ecx, edx
jne 0x4e6060
inc eax
mov dword [ebp + 8], eax
xor ecx, ecx
cmp ebx, edx
jl 0x4e6027
cmp eax, 0xa
jg 0x4e610f
mov dword [ebp - 0x28], 0x51cd28
movzx esi, byte [ebp - 0x17]
mov al, byte [ebp - 0x24]
xor al, byte [esi + 0x51f248]
movzx esi, byte [ebp - 0x16]
mov bl, byte [esi + 0x51f248]
movzx esi, byte [ebp - 0x15]
xor byte [ebp - 0x23], bl
mov bl, byte [esi + 0x51f248]
movzx esi, byte [ebp - 0x18]
xor byte [ebp - 0x22], bl
mov bl, byte [esi + 0x51f248]
mov esi, dword [ebp - 0x28]
xor al, byte [esi]
xor byte [ebp - 0x21], bl
inc dword [ebp - 0x28]
push 3
mov byte [ebp - 0x24], al
lea eax, [ebp - 0x20]
pop edi
xor esi, esi
mov bl, byte [eax + esi - 4]
xor byte [eax + esi], bl
inc esi
cmp esi, edx
jl 0x4e60bb
add eax, edx
dec edi
jne 0x4e60b9
xor ebx, ebx
cmp dword [ebp + 8], 0xa
jg 0x4e610f
cmp ebx, edx
jge 0x4e60f8
lea eax, [ebp + ebx*4 - 0x24]
cmp ecx, edx
jge 0x4e60fa
mov esi, dword [ebp + 8]
mov edi, dword [ebp - 0x2c]
lea esi, [ecx + esi*4]
lea edi, [edi + esi*4 + 0x14]
mov esi, eax
inc ebx
add eax, edx
inc ecx
cmp ebx, edx
movsd dword es:[edi], dword [esi]
jl 0x4e60dc
cmp ecx, edx
jne 0x4e6101
inc dword [ebp + 8]
xor ecx, ecx
cmp ebx, edx
jl 0x4e60ce
cmp dword [ebp + 8], 0xa
jle 0x4e6074
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.004eae3c
leave
ret 4

Function at 0x4e611e
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x516ad4]
push ebx
push esi
push edi
add ecx, 0x24
push 4
mov dword [ebp - 4], eax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x20], 9
pop edi
xor eax, eax
mov ecx, dword [ebp - 0x18]
lea esi, [ebp + eax - 0x14]
add ecx, 2
mov dword [ebp - 0x1c], edi
movzx edx, byte [ecx + 1]
movzx ebx, byte [ecx - 1]
mov dl, byte [eax + edx*4 + 0x51da48]
xor dl, byte [eax + ebx*4 + 0x51e248]
movzx ebx, byte [ecx - 2]
xor dl, byte [eax + ebx*4 + 0x51f748]
movzx ebx, byte [ecx]
xor dl, byte [eax + ebx*4 + 0x51d648]
add ecx, edi
mov byte [esi], dl
add esi, edi
dec dword [ebp - 0x1c]
jne 0x4e614e
inc eax
cmp eax, edi
jl 0x4e6141
push 0x10
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x18]
call sub.MSVCRT.dll_memcpy
add dword [ebp - 0x18], 0x10
add esp, 0xc
dec dword [ebp - 0x20]
jne 0x4e613f
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.004eae3c
leave
ret
Function at 0x4e68d6
Capabilities:
Encode data using xor

Disassembly:
cmp dword [0x51ff54], 0
jne 0x4e68e4
call fcn.004e68ac
mov ecx, dword [esp + 8]
mov eax, dword [esp + 4]
push esi
mov esi, dword [esp + 0x10]
push edi
test esi, esi
jbe 0x4e6911
test cl, 7
je 0x4e6911
movzx edx, byte [ecx]
movzx edi, al
xor edx, edi
shr eax, 8
xor eax, dword [edx*4 + 0x51ff50]
dec esi
inc ecx
jmp 0x4e68f2
cmp esi, 8
jb 0x4e6995
mov edi, esi
shr edi, 3
xor eax, dword [ecx]
add ecx, 8
movzx edx, al
shr eax, 8
xor eax, dword [edx*4 + 0x51ff50]
sub esi, 8
movzx edx, al
shr eax, 8
xor eax, dword [edx*4 + 0x51ff50]
movzx edx, al
shr eax, 8
xor eax, dword [edx*4 + 0x51ff50]
mov edx, eax
movzx eax, dl
mov eax, dword [eax*4 + 0x51ff50]
xor eax, dword [ecx - 4]
shr edx, 8
xor eax, edx
movzx edx, al
shr eax, 8
xor eax, dword [edx*4 + 0x51ff50]
movzx edx, al
shr eax, 8
xor eax, dword [edx*4 + 0x51ff50]
movzx edx, al
shr eax, 8
xor eax, dword [edx*4 + 0x51ff50]
movzx edx, al
shr eax, 8
xor eax, dword [edx*4 + 0x51ff50]
dec edi
jne 0x4e691b
xor edx, edx
test esi, esi
jbe 0x4e69b5
push ebx
movzx edi, byte [edx + ecx]
movzx ebx, al
xor edi, ebx
shr eax, 8
xor eax, dword [edi*4 + 0x51ff50]
inc edx
cmp edx, esi
jb 0x4e699c
pop ebx
pop edi
pop esi
ret

Function at 0x4e6d2b
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 4]
push 4
pop edx
inc eax
push esi
movzx esi, byte [eax - 1]
mov esi, dword [esi*4 + 0x51ff50]
xor dword [ecx + 0x204], esi
movzx esi, byte [eax]
mov esi, dword [esi*4 + 0x51ff50]
xor dword [ecx + 0x208], esi
movzx esi, byte [eax + 1]
mov esi, dword [esi*4 + 0x51ff50]
xor dword [ecx + 0x20c], esi
movzx esi, byte [eax + 2]
mov esi, dword [esi*4 + 0x51ff50]
xor dword [ecx + 0x210], esi
add eax, 4
dec edx
jne 0x4e6d34
pop esi
ret 4

Function at 0x4e6d81
Capabilities:
Encode data using xor

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
push edi
mov esi, ecx
call sub.MSVCRT.dll_strlen
push eax
push edi
push 0xffffffffffffffff
call fcn.004e68d6
xor edx, edx
mov word [esi + 0x214], ax
shr eax, 0x10
mov word [esi + 0x216], ax
mov word [esi + 0x21a], dx
mov word [esi + 0x218], dx
mov byte [esi + 0x21e], dl
mov byte [esi + 0x21d], dl
mov byte [esi + 0x21c], dl
mov al, byte [edi]
add esp, 0x10
cmp al, dl
je 0x4e6e30
push ebx
mov cl, byte [esi + 0x21e]
add byte [esi + 0x21c], al
xor byte [esi + 0x21d], al
add cl, al
mov bl, cl
shl cl, 1
shr bl, 7
or bl, cl
mov byte [esi + 0x21e], bl
mov bx, word [esi + 0x218]
movzx ecx, al
movzx ax, al
xor bx, ax
lea ecx, [ecx*4 + 0x51ff50]
xor bx, word [ecx]
mov word [esi + 0x218], bx
mov cx, word [ecx + 2]
add cx, ax
add word [esi + 0x21a], cx
inc edi
mov al, byte [edi]
cmp al, dl
jne 0x4e6dd5
pop ebx
pop edi
pop esi
ret 4
Function at 0x4e6eb5
Capabilities:
Encode data using add xor sub operations
Encode data using xor

Disassembly:
push ebx
mov ebx, dword [esp + 0xc]
test ebx, ebx
je 0x4e6f60
push esi
push edi
mov edi, dword [esp + 0x10]
mov esi, 0xff
add word [ecx + 0x214], 0x1234
xor edx, edx
mov dx, word [ecx + 0x214]
mov eax, edx
shr eax, 1
and eax, esi
mov ax, word [eax*4 + 0x51ff50]
xor word [ecx + 0x216], ax
mov eax, edx
shr eax, 1
and eax, esi
mov ax, word [eax*4 + 0x51ff52]
sub word [ecx + 0x218], ax
xor eax, eax
mov ax, word [ecx + 0x218]
xor eax, edx
xor edx, edx
mov dx, word [ecx + 0x21a]
mov word [ecx + 0x214], ax
mov eax, edx
shr dx, 1
shl eax, 0xf
or eax, edx
xor ax, word [ecx + 0x216]
mov edx, eax
shr ax, 1
shl edx, 0xf
or edx, eax
xor word [ecx + 0x214], dx
mov ax, word [ecx + 0x214]
mov word [ecx + 0x21a], dx
xor byte [edi], ah
inc edi
dec ebx
jne 0x4e6ecd
pop edi
pop esi
pop ebx
ret 8

Function at 0x4e6f64
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov edx, dword [ecx + 0x204]
push ebx
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi]
xor eax, edx
mov dword [ebp - 0x1c], edx
mov edx, dword [esi + 0xc]
xor edx, dword [ecx + 0x210]
mov dword [ebp - 0xc], eax
mov eax, dword [ecx + 0x208]
xor eax, dword [esi + 4]
push edi
mov edi, dword [ecx + 0x20c]
xor edi, dword [esi + 8]
and dword [ebp + 8], 0
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], edx
mov eax, dword [ebp + 8]
and eax, 3
mov ebx, dword [ecx + eax*4 + 0x204]
mov eax, edx
shl edx, 0xb
shr eax, 0x15
or eax, edx
add eax, edi
xor eax, ebx
mov dword [ebp - 4], eax
movzx edx, byte [ebp - 2]
movzx edx, byte [edx + ecx + 0x104]
mov dword [ebp - 0x18], ebx
mov ebx, eax
shr ebx, 0x18
mov dh, byte [ebx + ecx + 0x104]
movzx ebx, ah
movzx ebx, byte [ebx + ecx + 0x104]
shl edx, 8
or edx, ebx
shl edx, 8
and eax, 0xff
movzx eax, byte [eax + ecx + 0x104]
or edx, eax
xor edx, dword [ebp - 0xc]
mov eax, edi
mov dword [ebp - 0x14], edx
shr eax, 0xf
mov edx, edi
shl edx, 0x11
or eax, edx
xor eax, dword [ebp - 8]
mov dword [ebp - 0xc], edi
add eax, dword [ebp - 0x18]
mov edi, dword [ebp - 0x14]
mov dword [ebp - 4], eax
movzx edx, byte [ebp - 2]
movzx edx, byte [edx + ecx + 0x104]
mov ebx, eax
shr ebx, 0x18
mov dh, byte [ebx + ecx + 0x104]
movzx ebx, ah
movzx ebx, byte [ebx + ecx + 0x104]
shl edx, 8
or edx, ebx
mov ebx, dword [ebp - 8]
and eax, 0xff
movzx eax, byte [eax + ecx + 0x104]
shl edx, 8
or edx, eax
xor edx, dword [ebp - 0x10]
inc dword [ebp + 8]
cmp dword [ebp + 8], 0x20
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 8], edx
jl 0x4e6fa5
mov eax, dword [ebp - 0x1c]
xor eax, edi
mov dword [esi], eax
mov eax, dword [ecx + 0x208]
xor eax, edx
mov dword [esi + 4], eax
mov eax, dword [ecx + 0x20c]
xor eax, dword [ebp - 0xc]
push esi
mov dword [esi + 8], eax
mov eax, dword [ecx + 0x210]
xor eax, ebx
mov dword [esi + 0xc], eax
call fcn.004e6d2b
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x4e70ad
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x516ad4]
push ebx
push esi
mov dword [ebp - 4], eax
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi]
mov esi, ecx
xor eax, dword [esi + 0x204]
mov ebx, dword [esi + 0x20c]
xor ebx, dword [edi + 8]
mov dword [ebp - 0x24], eax
mov eax, dword [esi + 0x208]
xor eax, dword [edi + 4]
push 0x10
mov dword [ebp - 0x18], eax
mov eax, dword [edi + 0xc]
xor eax, dword [esi + 0x210]
push edi
mov dword [ebp + 8], eax
lea eax, [ebp - 0x14]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov dword [ebp - 0x20], 0x1f
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp + 8]
and eax, 3
mov ecx, dword [esi + eax*4 + 0x204]
mov eax, dword [ebp + 8]
shr eax, 0x15
mov dword [ebp - 0x28], ecx
shl edx, 0xb
or eax, edx
add eax, ebx
xor eax, ecx
mov dword [ebp - 0x1c], eax
movzx ecx, byte [ebp - 0x1a]
movzx ecx, byte [ecx + esi + 0x104]
mov edx, eax
shr edx, 0x18
mov ch, byte [edx + esi + 0x104]
movzx edx, ah
movzx edx, byte [edx + esi + 0x104]
shl ecx, 8
or ecx, edx
shl ecx, 8
and eax, 0xff
movzx eax, byte [eax + esi + 0x104]
or ecx, eax
xor ecx, dword [ebp - 0x24]
mov eax, ebx
mov dword [ebp - 0x2c], ecx
shr eax, 0xf
mov ecx, ebx
shl ecx, 0x11
or eax, ecx
xor eax, dword [ebp + 8]
mov dword [ebp - 0x24], ebx
add eax, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], eax
movzx ecx, byte [ebp - 0x1a]
movzx ecx, byte [ecx + esi + 0x104]
mov edx, eax
shr edx, 0x18
mov ch, byte [edx + esi + 0x104]
movzx edx, ah
movzx edx, byte [edx + esi + 0x104]
shl ecx, 8
or ecx, edx
and eax, 0xff
movzx eax, byte [eax + esi + 0x104]
shl ecx, 8
or ecx, eax
xor ecx, dword [ebp - 0x18]
dec dword [ebp - 0x20]
mov eax, ecx
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x18], ecx
mov dword [ebp + 8], eax
jns 0x4e7105
mov ecx, dword [esi + 0x204]
xor ecx, ebx
mov dword [edi], ecx
mov ecx, dword [esi + 0x208]
xor ecx, eax
mov dword [edi + 4], ecx
mov eax, dword [esi + 0x20c]
xor eax, dword [ebp - 0x24]
mov ecx, esi
mov dword [edi + 8], eax
mov eax, dword [esi + 0x210]
xor eax, dword [ebp - 0x18]
mov dword [edi + 0xc], eax
lea eax, [ebp - 0x14]
push eax
call fcn.004e6d2b
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.004eae3c
leave
ret 4
Function at 0x4eaa93
Capabilities:
Hash data using sha1

Disassembly:
mov eax, dword [esp + 4]
and dword [eax + 0x18], 0
and dword [eax + 0x14], 0
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
mov dword [eax + 0x10], 0xc3d2e1f0
ret

Function at 0x4eb0f0
Capabilities:
Terminate process

Disassembly:
push 0x11c
push 0x4f71a0
call fcn.004eb254
mov eax, dword [0x516ad4]
mov dword [ebp - 0x1c], eax
mov eax, dword [0x520640]
test eax, eax
je 0x4eb130
and dword [ebp - 4], 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
pop ecx
pop ecx
or dword [ebp - 4], 0xffffffff
jmp 0x4eb23a
mov eax, dword [ebp + 8]
dec eax
je 0x4eb14c
mov ebx, str.Unknown_security_failure_detected_
mov dword [ebp - 0x12c], str.A_security_error_of_unknown_cause_has_been_detected_which_has_ncorrupted_the_programs_internal_state.__The_program_cannot_safely_ncontinue_execution_and_must_now_be_terminated._n
mov edi, 0xd4
jmp 0x4eb160
mov ebx, str.Buffer_overrun_detected_
mov dword [ebp - 0x12c], str.A_buffer_overrun_has_been_detected_which_has_corrupted_the_programs_ninternal_state.__The_program_cannot_safely_continue_execution_and_must_nnow_be_terminated._n
mov edi, 0xb9
mov byte [ebp - 0x20], 0
push 0x104
lea eax, [ebp - 0x124]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4eb18f
push str._program_name_unknown_
lea eax, [ebp - 0x124]
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
lea eax, [ebp - 0x124]
mov dword [ebp - 0x128], eax
push eax
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
call esi
add eax, 0xb
cmp eax, 0x3c
jbe 0x4eb1d6
lea eax, [ebp - 0x124]
push eax
call esi
lea ecx, [ebp - 0x124]
sub ecx, 0x31
add eax, ecx
mov dword [ebp - 0x128], eax
push 3
push 0x4f6fec
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
push dword [ebp - 0x128]
call esi
lea eax, [eax + edi + 0xc]
add eax, 3
and eax, 0xfffffffc
call fcn.004eae50
mov dword [ebp - 0x18], esp
mov edi, esp
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ebx, 0x4f6fe8
push ebx
push edi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
call esi
push str.Program:
push edi
call esi
push dword [ebp - 0x128]
push edi
call esi
push ebx
push edi
call esi
push dword [ebp - 0x12c]
push edi
call esi
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push edi
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 3
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x404970
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffdf4
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.00406ca8
test esi, esi
jne 0x4049a6
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameW
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.00406e30
jmp 0x4049c4
call sub.kernel32.dll_GetCommandLineW
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.004048b4
mov edi, eax
test esi, esi
je 0x4049c4
cmp dword [ebx], 0
je 0x4049c4
dec esi
jmp 0x4049ad
add esp, 0x20c
pop edi
pop esi
pop ebx
ret

Function at 0x4049f8
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x636008], 0x8088405
inc edx
mov dword [ebx + 0x636008], edx
mul edx
mov eax, edx
pop ebx
ret

Function at 0x405a24
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff4
mov edi, edx
mov esi, eax
mov ebp, dword [esi + 0x10]
mov eax, esi
call fcn.00405e1c
mov byte [esp], al
cmp byte [esp], 0
jne 0x405bb0
test edi, edi
je 0x405bb0
mov byte [esp + 1], 0
test ebp, ebp
jle 0x405ae7
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
test ebp, ebp
jle 0x405ac2
cmp edi, 0xffffffff
je 0x405a83
call sub.kernel32.dll_GetTickCount
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x405a83
mov byte [esp], 0
jmp 0x405bb0
mov ebx, dword [esi]
cmp ebx, 1
jg 0x405ac2
test ebx, ebx
jne 0x405ab8
mov eax, esi
xor ecx, ecx
mov edx, 1
call fcn.00402858
test eax, eax
jne 0x405ab8
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
mov byte [esp], 1
jmp 0x405bb0
call 0x405f40
dec ebp
test ebp, ebp
jg 0x405a68
cmp edi, 0xffffffff
je 0x405ae7
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x405ae5
mov byte [esp], 0
jmp 0x405bb0
sub edi, eax
mov ebx, dword [esi]
test ebx, ebx
je 0x405a32
lea edx, [ebx + 2]
mov eax, esi
mov ecx, ebx
call fcn.00402858
cmp ebx, eax
jne 0x405ae7
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
mov eax, esi
call fcn.00405c20
mov edx, eax
mov ebx, dword [0x6438f8]
mov ecx, edi
xor eax, eax
call dword [ebx + 0x10]
test eax, eax
sete byte [esp]
cmp edi, 0xffffffff
je 0x405b4e
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
jbe 0x405b4c
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
sub edi, eax
jmp 0x405b4e
xor edi, edi
cmp byte [esp], 0
je 0x405b77
mov ebx, dword [esi]
test bl, 1
jne 0x405b90
mov edx, ebx
sub edx, 2
or edx, 1
mov eax, esi
mov ecx, ebx
call fcn.00402858
cmp ebx, eax
jne 0x405b54
mov byte [esp + 1], 1
jmp 0x405b90
mov ebx, dword [esi]
mov edx, ebx
sub edx, 2
mov eax, esi
mov ecx, ebx
call fcn.00402858
cmp ebx, eax
jne 0x405b77
mov byte [esp + 1], 1
cmp byte [esp + 1], 0
je 0x405b01
cmp byte [esp], 0
je 0x405bb0
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
movzx eax, byte [esp]
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x406940
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x643058], 0
je 0x4069a7
cmp word [0x643344], 0xd7b2
jne 0x406969
cmp dword [0x64334c], 0
jbe 0x406969
mov eax, 0x643340
call dword [0x64335c]
push 0
lea eax, [esp + 4]
push eax
push 0x1d
push str.Runtime_error_____at_00000000
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
mov eax, 0x4069d4
call fcn.00407588
push eax
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x636034], 0
jne 0x4069c3
push 0
push 0x6369ca
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x406b64
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov edi, dword [ebp + 0x10]
cmp dword [0x636038], 0
je 0x406b8f
mov edx, edi
mov eax, esi
call dword [0x636038]
mov ebx, eax
jmp 0x406ba0
mov eax, 8
call fcn.004045f0
mov ebx, eax
mov dword [ebx], esi
mov dword [ebx + 4], edi
mov byte [0x643059], 1
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp + 0xc]
push eax
push ebx
mov eax, 0x406b2c
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_CreateThread
mov esi, eax
test esi, esi
jne 0x406bd5
mov edx, 8
mov eax, ebx
call fcn.0040460c
mov eax, esi
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret 0xc