joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4020c0
Capabilities:
Encode data using xor
Encrypt data using rc4 ksa
Encrypt data using rc4 prga

Disassembly:
mov eax, 0x1084c
call fcn.00404380
push ebx
push ebp
push esi
push edi
push 0x1083d
call dword [sym.imp.MSVCRT.dll_malloc]
mov ecx, eax
lea eax, [esp + 0x20]
mov edi, ecx
add esp, 4
xor ebp, ebp
xor ebx, ebx
sub edi, eax
mov eax, ebx
lea esi, [esp + ebx + 0x1c]
cdq
idiv dword [esp + 0x1086c]
mov eax, dword [esp + 0x10868]
mov byte [edi + esi], bl
inc ebx
cmp ebx, 0x1083d
mov dl, byte [edx + eax]
mov byte [esi], dl
jl 0x4020ea
lea eax, [esp + 0x1c]
mov esi, ecx
sub eax, ecx
mov dword [esp + 0x10], 0x1083d
mov dword [esp + 0x14], eax
mov edi, 0x1083d
jmp 0x40212f
mov eax, dword [esp + 0x14]
mov bl, byte [esi]
xor edx, edx
mov dl, byte [eax + esi]
mov eax, ebx
and eax, 0xff
add ebp, edx
add eax, ebp
mov ebp, 0x1083d
cdq
idiv ebp
inc esi
mov ebp, edx
mov al, byte [ecx + ebp]
mov byte [ecx + ebp], bl
mov byte [esi - 1], al
mov eax, dword [esp + 0x10]
dec eax
mov dword [esp + 0x10], eax
jne 0x40212b
mov edx, dword [esp + 0x10864]
xor esi, esi
test edx, edx
jle 0x4021e5
mov ebx, dword [esp + 0x10870]
mov eax, dword [esp + 0x10860]
sub eax, ebx
mov dword [esp + 0x10], edx
mov dword [esp + 0x18], eax
lea eax, [edi + 1]
mov edi, 0x1083d
cdq
idiv edi
xor eax, eax
mov ebp, 0x1083d
mov edi, edx
mov al, byte [edi + ecx]
add eax, esi
mov esi, 0x1083d
cdq
idiv esi
mov esi, edx
mov dl, byte [edi + ecx]
mov al, byte [esi + ecx]
mov byte [esi + ecx], dl
mov byte [esp + 0x14], al
mov byte [edi + ecx], al
mov edx, dword [esp + 0x14]
xor eax, eax
mov al, byte [esi + ecx]
and edx, 0xff
add eax, edx
cdq
idiv ebp
mov al, byte [edx + ecx]
mov edx, dword [esp + 0x18]
xor al, byte [edx + ebx]
inc ebx
mov byte [ebx - 1], al
mov eax, dword [esp + 0x10]
dec eax
mov dword [esp + 0x10], eax
jne 0x402185
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1084c
ret

Function at 0x403bd0
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x404a08
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebx
mov ebx, ecx
push edi
mov eax, dword [ebx + 0x7c]
test eax, eax
jne 0x403c96
call sub.MFC42.DLL_AfxGetModuleState
mov edi, dword [sym.imp.USER32.dll_LoadCursorA]
push 0x7f89
push 0
call edi
test eax, eax
mov dword [ebx + 0x7c], eax
jne 0x403c96
push esi
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::CString_2
push 0x104
push 0x104
lea ecx, [esp + 0x14]
mov dword [esp + 0x20], 0
call sub.MFC42.DLL_CString::GetBuffer
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push 0xffffffffffffffff
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::ReleaseBuffer
push str.winhlp32.exe
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::operator
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x403c84
push 0x6a
push esi
call edi
test eax, eax
je 0x403c7d
push eax
call dword [sym.imp.USER32.dll_CopyIcon]
mov dword [ebx + 0x7c], eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea ecx, [esp + 0xc]
mov dword [esp + 0x18], 0xffffffff
call fcn.004040e6
pop esi
mov ecx, dword [esp + 0xc]
pop edi
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret
Function at 0x403cb0
Capabilities:
Query or enumerate registry value

Disassembly:
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
sub esp, 0x10c
lea eax, [esp]
push ebx
push eax
push 1
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov ebx, eax
test ebx, ebx
jne 0x403d33
mov edx, dword [esp + 4]
push esi
lea eax, [esp + 0xc]
push edi
lea ecx, [esp + 0x14]
push eax
push ecx
push ebx
push edx
mov dword [esp + 0x20], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x124]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, ebx
pop esi
pop ebx
add esp, 0x10c
ret
mov eax, ebx
pop ebx
add esp, 0x10c
ret
Function at 0x403da0
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x208
push ebp
mov ebp, dword [esp + 0x210]
test ebp, ebp
je 0x403f19
cmp byte [ebp], 0
je 0x403f19
mov ecx, dword [esp + 0x218]
mov eax, str.open
test ecx, ecx
je 0x403dd5
mov eax, 0x407644
mov ecx, dword [esp + 0x214]
push ebx
push esi
push edi
push ecx
push 0
push 0
push ebp
push eax
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
mov ebx, eax
cmp ebx, 0x20
ja 0x403f0c
lea edx, [esp + 0x10]
push edx
push str..htm
push 0x80000000
call fcn.00403cb0
add esp, 0xc
test eax, eax
jne 0x403f0c
mov edi, str._shellopencommand
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x10]
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
push ecx
push 0x80000000
call fcn.00403cb0
add esp, 0xc
test eax, eax
jne 0x403f0c
mov esi, dword [sym.imp.MSVCRT.dll__mbsstr]
lea edx, [esp + 0x10]
push str.__1_
push edx
call esi
mov edx, eax
add esp, 8
test edx, edx
jne 0x403ea5
lea eax, [esp + 0x10]
push 0x40761c
push eax
call esi
mov edx, eax
add esp, 8
test edx, edx
jne 0x403ea5
lea edi, [esp + 0x10]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [esp + ecx + 0xf]
jmp 0x403ea8
mov byte [edx], 0
mov edi, 0x407618
or ecx, 0xffffffff
xor eax, eax
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
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebp
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 edx, [esp + 0x10]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x220]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WinExec]
mov ebx, eax
pop edi
mov eax, ebx
pop esi
pop ebx
pop ebp
add esp, 0x208
ret
mov eax, 0x24
pop ebp
add esp, 0x208
ret
Function at 0x401756
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x401788
test dl, 7
je 0x401788
movzx ecx, byte [edx]
movzx eax, bl
xor ecx, eax
shr ebx, 8
xor ebx, dword [ecx*4 + 0x42ba70]
inc edx
mov dword [ebp + 0xc], edx
sub esi, 1
jne 0x401768
cmp esi, 8
jb 0x401818
push edi
mov edi, esi
shr edi, 3
xor ebx, dword [edx]
sub esi, 8
mov edx, dword [edx + 4]
mov ecx, edx
shr ecx, 0x18
mov eax, edx
shr eax, 0x10
movzx eax, al
mov ecx, dword [ecx*4 + 0x42ba70]
xor ecx, dword [eax*4 + 0x42be70]
mov eax, edx
shr eax, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x42c270]
mov eax, ebx
shr eax, 0x18
xor ecx, dword [eax*4 + 0x42ca70]
mov eax, ebx
shr eax, 0x10
movzx eax, al
xor ecx, dword [eax*4 + 0x42ce70]
mov eax, ebx
shr eax, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x42d270]
movzx eax, dl
mov edx, dword [ebp + 0xc]
add edx, 8
mov dword [ebp + 0xc], edx
xor ecx, dword [eax*4 + 0x42c670]
movzx eax, bl
xor ecx, dword [eax*4 + 0x42d670]
mov ebx, ecx
sub edi, 1
jne 0x401797
pop edi
test esi, esi
je 0x401834
movzx ecx, byte [edx]
movzx eax, bl
xor ecx, eax
shr ebx, 8
xor ebx, dword [ecx*4 + 0x42ba70]
inc edx
sub esi, 1
jne 0x40181c
pop esi
mov eax, ebx
pop ebx
pop ebp
ret 0xc

Function at 0x401dda
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, ecx
cmp dword [esi + 0xc], 1
jne 0x401df3
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [esi + 4], eax
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x401e66
mov ecx, esi
call fcn.00401ec7
test al, al
je 0x401e2e
mov eax, 0x4e20
cmp dword [ebp + 0xc], eax
jbe 0x401e2e
push eax
push dword [ebp + 8]
mov ecx, esi
call fcn.00401dda
jmp 0x401e69
cmp dword [esi + 0xc], 1
jne 0x401e43
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
jne 0x401e43
xor eax, eax
jmp 0x401e69
cmp dword [esi + 0xc], 0
jne 0x401e61
mov ebx, 0x8000
cmp dword [ebp + 0xc], ebx
jbe 0x401e61
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x21
jne 0x401e61
push ebx
jmp 0x401e22
or eax, 0xffffffff
jmp 0x401e69
mov eax, dword [ebp - 4]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x401eea
Capabilities:
Check if file exists

Disassembly:
mov eax, 0x1008
call fcn.0040f4a0
push ebx
mov ebx, dword [esp + 0x1014]
xor edx, edx
push ebp
push edi
mov edi, ecx
mov dword [edi + 0x1020], edx
cmp byte [edi + 0x1c], dl
jne 0x401f14
mov cl, dl
test bl, 4
je 0x401f16
mov cl, 1
mov eax, ebx
shr eax, 1
push esi
and al, 1
movzx esi, al
neg esi
sbb esi, esi
and esi, 0xc0000000
add esi, 0x80000000
test bl, 1
je 0x401f3b
or esi, 0x40000000
shr ebx, 3
not ebx
and ebx, 1
test cl, cl
je 0x401f4a
or ebx, 2
xor eax, eax
cmp byte [edi + 0x15], al
push edx
setne al
dec eax
and eax, 0x8000000
push eax
push 3
push edx
push ebx
push esi
push dword [esp + 0x1034]
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x401fd9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x18]
push 0x800
push eax
push dword [esp + 0x1024]
call fcn.004033c1
test al, al
je 0x401fc8
push 0
push dword [esp + 0x18]
lea eax, [esp + 0x20]
push 3
push 0
push ebx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x401fc3
mov dword [esp + 0x10], eax
cmp ebp, 0xffffffff
jne 0x401fd9
cmp dword [esp + 0x10], 2
jne 0x401fd9
mov dword [edi + 0x1020], 1
xor eax, eax
cmp ebp, 0xffffffff
mov byte [edi + 0x12], al
setne bl
mov dword [edi + 0xc], eax
mov byte [edi + 0x10], al
pop esi
test bl, bl
je 0x402007
push 0x800
push dword [esp + 0x101c]
lea ecx, [edi + 0x1e]
mov dword [edi + 4], ebp
push ecx
call fcn.0040459a
pop edi
pop ebp
mov al, bl
pop ebx
add esp, 0x1008
ret 8

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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1000
call fcn.0040f4a0
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4025b4
push 0x800
lea eax, [ebp - 0x1000]
push eax
push dword [ebp + 8]
call fcn.004033c1
test al, al
je 0x4025b4
lea eax, [ebp - 0x1000]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, eax
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret 4

Function at 0x4025f0
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1000
call fcn.0040f4a0
push esi
mov esi, dword [ebp + 8]
push esi
call fcn.0040365f
movzx eax, word [eax]
cmp eax, 0x2e
je 0x402621
cmp eax, 0x20
je 0x402621
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x402654
push esi
call fcn.0040255b
test al, al
jne 0x402667
push 0x800
lea eax, [ebp - 0x1000]
push eax
push esi
call fcn.004033c1
test al, al
je 0x402667
push 0
lea eax, [ebp - 0x1000]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x402667
cmp byte [ebp + 0xc], 0
je 0x402663
push dword [ebp + 0x10]
push esi
call fcn.0040282d
xor eax, eax
jmp 0x40267f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x40267c
cmp eax, 3
je 0x40267c
xor eax, eax
inc eax
jmp 0x40267f
push 2
pop eax
pop esi
mov esp, ebp
pop ebp
ret 0xc
Function at 0x40282d
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1000
call fcn.0040f4a0
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
setne bl
test bl, bl
jne 0x40287d
push 0x800
lea eax, [ebp - 0x1000]
push eax
push dword [ebp + 8]
call fcn.004033c1
test al, al
je 0x40287d
push dword [ebp + 0xc]
lea eax, [ebp - 0x1000]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
setne bl
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x4029da
Capabilities:
Check if file exists
Enumerate files on windows

Disassembly:
mov eax, 0x1250
call fcn.0040f4a0
push ebx
push ebp
push esi
mov esi, dword [esp + 0x1260]
lea eax, [esp + 0xc]
push edi
mov edi, dword [esp + 0x126c]
or ebp, 0xffffffff
push eax
cmp esi, ebp
jne 0x402a74
push dword [esp + 0x126c]
mov ebx, dword [sym.imp.KERNEL32.dll_FindFirstFileW]
call ebx
mov esi, eax
cmp esi, ebp
jne 0x402a9b
push 0x800
lea eax, [esp + 0x264]
push eax
push dword [esp + 0x1270]
call fcn.004033c1
test al, al
je 0x402a4d
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x264]
push eax
call ebx
mov esi, eax
cmp esi, ebp
jne 0x402a9b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x402a67
cmp eax, 3
je 0x402a67
cmp eax, 0x12
je 0x402a67
xor eax, eax
inc eax
jmp 0x402a69
xor eax, eax
mov byte [edi + 0x1044], al
jmp 0x402b49
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x402a93
mov esi, ebp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
setne al
mov byte [edi + 0x1044], al
cmp esi, ebp
je 0x402b49
mov ebx, 0x800
push ebx
push dword [esp + 0x126c]
push edi
call fcn.0040459a
push ebx
lea eax, [esp + 0x40]
push eax
push edi
call fcn.0040372f
mov ecx, dword [esp + 0x2c]
xor eax, eax
add eax, dword [esp + 0x30]
mov dword [edi + 0x1000], eax
mov eax, dword [esp + 0x10]
adc ecx, 0
mov dword [edi + 0x1008], eax
mov eax, dword [esp + 0x14]
mov dword [edi + 0x1028], eax
mov eax, dword [esp + 0x18]
mov dword [edi + 0x102c], eax
mov eax, dword [esp + 0x1c]
mov dword [edi + 0x1030], eax
mov eax, dword [esp + 0x20]
mov dword [edi + 0x1034], eax
mov eax, dword [esp + 0x24]
mov dword [edi + 0x1038], eax
mov eax, dword [esp + 0x28]
mov dword [edi + 0x103c], eax
lea eax, [esp + 0x24]
mov dword [edi + 0x1004], ecx
lea ecx, [edi + 0x1010]
push eax
call fcn.00404d82
lea eax, [esp + 0x14]
push eax
lea ecx, [edi + 0x1018]
call fcn.00404d82
lea eax, [esp + 0x1c]
push eax
lea ecx, [edi + 0x1020]
call fcn.00404d82
and dword [edi + 0x1040], 0
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1250
ret 0xc
Function at 0x4033c1
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1000
call fcn.0040f4a0
push edi
mov edi, dword [ebp + 8]
cmp word [edi], 0
jne 0x4033df
xor al, al
jmp 0x403561
push esi
push edi
call fcn.00403568
push edi
call fcn.00414935
pop ecx
push edi
mov esi, eax
call fcn.00403594
test al, al
je 0x40347f
push edi
call fcn.00403568
test al, al
je 0x40342e
lea eax, [esi + 4]
cmp dword [ebp + 0x10], eax
jbe 0x403478
mov esi, dword [ebp + 0xc]
push 4
push 0x42229c
push esi
call fcn.00415cdb
lea eax, [esi + 8]
push edi
push eax
call fcn.00414913
add esp, 0x14
jmp 0x403471
push 0x5c
pop eax
cmp word [edi], ax
jne 0x403478
add edi, 2
cmp word [edi], ax
jne 0x403478
lea eax, [esi + 6]
cmp dword [ebp + 0x10], eax
jbe 0x403478
mov esi, dword [ebp + 0xc]
push 4
push 0x42229c
push esi
call fcn.00415cdb
lea eax, [esi + 8]
push 0x4222a8
push eax
call fcn.00414913
lea eax, [esi + 0xe]
push edi
push eax
call fcn.00414913
add esp, 0x1c
mov al, 1
jmp 0x403560
xor al, al
jmp 0x403560
push ebx
lea eax, [ebp - 0x1000]
mov ebx, 0x7ff
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x40355d
cmp eax, ebx
ja 0x40355d
movzx eax, word [edi]
push eax
call fcn.004035ca
test al, al
je 0x4034ed
lea eax, [esi + 6]
cmp dword [ebp + 0x10], eax
jbe 0x40355d
mov esi, dword [ebp + 0xc]
push 4
push 0x42229c
push esi
call fcn.00415cdb
push 2
lea eax, [ebp - 0x1000]
push eax
lea eax, [esi + 8]
push eax
call fcn.00415cdb
lea eax, [esi + 0xc]
push edi
push eax
call fcn.00414913
add esp, 0x20
jmp 0x403559
push 0x800
lea eax, [ebp - 0x1000]
push eax
call fcn.00402fd3
lea eax, [ebp - 0x1000]
push eax
call fcn.00414935
add eax, 4
add eax, esi
pop ecx
cmp dword [ebp + 0x10], eax
jbe 0x40355d
mov esi, dword [ebp + 0xc]
push 4
push 0x42229c
push esi
call fcn.00415cdb
lea eax, [ebp - 0x1000]
push eax
lea eax, [esi + 8]
push eax
call fcn.00414913
add esp, 0x14
cmp word [edi], 0x2e
jne 0x40354f
movzx eax, word [edi + 2]
push eax
call fcn.004035ca
test al, al
je 0x40354f
add edi, 4
push dword [ebp + 0x10]
push edi
push esi
call fcn.0040456e
mov al, 1
jmp 0x40355f
xor al, al
pop ebx
pop esi
pop edi
mov esp, ebp
pop ebp
ret 0xc
Function at 0x4041f4
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [0x42fa94]
test ecx, ecx
jne 0x404211
mov ecx, 0x42fa8c
call fcn.00404175
mov ecx, dword [0x42fa94]
push esi
mov esi, dword [ebp + 0xc]
mov eax, esi
and eax, 0xf
mov edx, esi
sub edx, eax
xor eax, eax
cmp byte [ebp + 0x14], al
setne al
cmp byte [ebp + 0x10], 0
je 0x40425f
test ecx, ecx
je 0x40427b
push eax
push edx
push dword [ebp + 8]
call ecx
test eax, eax
jne 0x4042a0
push str.CryptProtectMemory_failed
mov esi, 0x44a2fc
push esi
call fcn.0040196f
pop ecx
pop ecx
mov ecx, esi
call fcn.004102b3
push 2
mov ecx, esi
call fcn.0040196a
jmp 0x4042a0
mov ecx, dword [0x42fa98]
test ecx, ecx
je 0x40427b
push eax
push edx
push dword [ebp + 8]
call ecx
test eax, eax
jne 0x4042a0
push str.CryptUnprotectMemory_failed
jmp 0x404240
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor edx, edx
mov ebx, eax
test esi, esi
je 0x40429f
push edi
mov edi, dword [ebp + 8]
add bl, 0x4b
lea ecx, [edx + edi]
lea eax, [edx + ebx]
xor byte [ecx], al
inc edx
cmp edx, esi
jb 0x404291
pop edi
pop ebx
pop esi
pop ebp
ret 0x10
Function at 0x407342
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, dword [esp + 0xc]
push edi
mov edi, ecx
test ebp, ebp
jne 0x40230b
mov al, 1
jmp 0x4023fc
cmp dword [edi + 0xc], 1
jne 0x40231c
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [edi + 4], eax
push ebx
push esi
and dword [esp + 0x18], 0
xor bl, bl
cmp dword [edi + 0xc], 0
je 0x402371
xor esi, esi
test ebp, ebp
je 0x402393
mov eax, ebp
sub eax, esi
cmp eax, 0x4000
jb 0x402341
mov eax, 0x4000
push 0
lea ecx, [esp + 0x1c]
push ecx
push eax
mov eax, dword [esp + 0x20]
add eax, esi
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea ebx, [eax - 1]
neg ebx
sbb bl, bl
add bl, 1
je 0x402393
add esi, 0x4000
cmp esi, ebp
jb 0x402331
jmp 0x40238f
push 0
lea eax, [esp + 0x1c]
push eax
push ebp
push dword [esp + 0x20]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
dec eax
neg eax
sbb al, al
inc al
mov bl, al
test bl, bl
jne 0x4023f4
cmp byte [edi + 0x14], 0
je 0x4023f4
cmp dword [edi + 0xc], 0
jne 0x4023f4
push 0
lea eax, [edi + 0x1e]
mov ecx, 0x44a2fc
push eax
call fcn.00401904
test al, al
je 0x4023e4
cmp dword [esp + 0x18], ebp
jae 0x40231e
cmp dword [esp + 0x18], 0
jbe 0x40231e
mov esi, dword [edi]
mov ecx, edi
push 0
call dword [esi + 0x10]
sub eax, dword [esp + 0x1c]
mov ecx, edi
sbb edx, 0
push edx
push eax
call dword [esi + 0xc]
jmp 0x40231e
lea eax, [edi + 0x1e]
mov ecx, 0x44a2fc
push eax
push 0
call fcn.00401afd
pop esi
mov al, bl
mov byte [edi + 8], 1
pop ebx
pop edi
pop ebp
ret 8
push ebp
mov ebp, esp
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [0x43fffc]
call fcn.00401756
cmp byte [0x44f4e1], 0
mov dword [0x43fffc], eax
jne 0x407376
cmp dword [ebp + 0xc], 0
jbe 0x407376
mov ecx, dword [0x4400f8]
pop ebp
jmp 0x4022f8
pop ebp
ret 8
Function at 0x40764d
Capabilities:
Encode data using xor

Disassembly:
cmp dword [0x4400e8], 0
je 0x40765a
or eax, 0xffffffff
ret
mov eax, dword [0x42ffd4]
push esi
xor esi, esi
push edi
cmp eax, esi
jg 0x407698
mov ecx, dword [0x42ffd0]
jl 0x407673
cmp ecx, esi
ja 0x407698
or edi, 0xffffffff
mov dword [0x440008], esi
add ecx, edi
mov dword [0x44000c], esi
mov dword [0x42ffd0], ecx
adc eax, edi
mov dword [0x42ffd4], eax
mov eax, edi
jmp 0x407761
push ebx
mov ebx, dword [0x44000c]
or edi, 0xffffffff
cmp ebx, esi
jg 0x407702
jl 0x4076b0
cmp dword [0x440008], esi
ja 0x407702
mov ebx, 0x2000
push ebx
push dword [0x440000]
call fcn.00407914
cdq
mov ecx, eax
mov dword [0x440008], eax
or ecx, edx
mov dword [0x44000c], edx
je 0x407773
and eax, edx
cmp eax, edi
je 0x407764
add dword [0x440040], ebx
mov eax, dword [0x440000]
adc dword [0x440044], esi
mov dword [0x440004], eax
call fcn.0040710b
mov ebx, dword [0x44000c]
mov eax, dword [0x42fff4]
mov esi, dword [0x440004]
push ebp
test byte [eax + 0x40], 1
je 0x407747
mov ebp, dword [0x440008]
mov eax, ebp
or eax, ebx
je 0x407747
add ebp, edi
adc ebx, edi
call fcn.0040a2d6
xor byte [esi], al
movzx eax, byte [esi]
push eax
call fcn.0040a3e8
mov eax, ebp
inc esi
or eax, ebx
jne 0x407720
mov ebx, dword [0x44000c]
mov esi, dword [0x440004]
add dword [0x440008], edi
pop ebp
adc ebx, edi
mov dword [0x44000c], ebx
movzx eax, byte [esi]
inc esi
mov dword [0x440004], esi
pop ebx
pop edi
pop esi
ret
push 0x4525f2
mov ecx, 0x44a2fc
call fcn.00401a36
mov dword [0x440008], esi
mov eax, edi
mov dword [0x44000c], esi
jmp 0x407760

Function at 0x40a337
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push dword [ebp + 0xc]
call fcn.0040a2f4
push 0xc
push dword [ebp + 8]
lea eax, [ebp - 0xc]
push eax
call fcn.00410c90
add esp, 0xc
xor esi, esi
call fcn.0040a2d6
movzx ecx, byte [ebp + esi - 0xc]
xor eax, ecx
mov byte [ebp + esi - 0xc], al
movzx eax, al
push eax
call fcn.0040a3e8
inc esi
cmp esi, 0xc
jl 0x40a359
mov eax, dword [0x42fff4]
movzx edx, byte [ebp - 1]
movzx ecx, byte [0x44005f]
test byte [eax + 0x40], 2
jne 0x40a395
movzx ecx, byte [0x440067]
cmp edx, ecx
je 0x40a39e
or eax, 0xffffffff
jmp 0x40a3e1
mov ecx, dword [0x440008]
mov eax, ecx
cdq
cmp edx, dword [0x42ffd4]
jl 0x40a3bb
mov esi, dword [0x42ffd0]
jg 0x40a3bd
cmp eax, esi
ja 0x40a3bd
mov esi, ecx
push edi
mov edi, dword [0x440004]
test esi, esi
je 0x40a3de
call fcn.0040a2d6
xor byte [edi], al
movzx eax, byte [edi]
push eax
call fcn.0040a3e8
inc edi
sub esi, 1
jne 0x40a3c8
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8

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

Disassembly:
mov ecx, dword [0x44112c]
mov eax, ecx
xor eax, dword [esp + 4]
mov edx, dword [0x441134]
movzx eax, al
shr ecx, 8
xor ecx, dword [eax*4 + 0x42fbb0]
movzx eax, cl
add eax, dword [0x441130]
mov dword [0x44112c], ecx
imul ecx, eax, 0x8088405
mov eax, dword [esp + 4]
inc ecx
mov dword [0x441130], ecx
shr ecx, 0x18
xor ecx, edx
shr edx, 8
movzx ecx, cl
xor edx, dword [ecx*4 + 0x42fbb0]
mov dword [0x441134], edx
ret 4