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

Disassembly:
push 0x24
mov eax, 0x42f70c
call fcn.0041bec8
mov esi, dword [ebp + 8]
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x404436
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4044ba
xor ecx, ecx
mov dword [ebp - 0x14], 7
xor eax, eax
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x18], ecx
mov word [ebp - 0x28], ax
lea eax, [ebp - 0x28]
mov dword [ebp - 4], ecx
push eax
push esi
call fcn.0040608d
test al, al
je 0x40447f
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
jb 0x404476
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, eax
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x4044ba
mov ecx, dword [ebp - 0x28]
lea eax, [eax*2 + 2]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x30], ecx
cmp eax, 0x1000
jb 0x4044b1
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.004016b3
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x30]
push eax
push ecx
call fcn.0041be16
pop ecx
pop ecx
mov eax, edi
call fcn.0041be77
ret 4

Function at 0x4046fc
Capabilities:
Create directory

Disassembly:
push 0x24
mov eax, 0x42f70c
call fcn.0041bec8
mov esi, dword [ebp + 8]
push esi
call fcn.00405e79
movzx eax, ax
cmp eax, 0x2e
je 0x40473e
cmp eax, 0x20
je 0x40473e
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x404728
mov eax, dword [esi]
xor edi, edi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ebx, eax
test ebx, ebx
jne 0x4047dd
jmp 0x404742
xor edi, edi
mov ebx, edi
push esi
call fcn.0040440b
test al, al
jne 0x4047f0
xor eax, eax
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
lea eax, [ebp - 0x28]
mov dword [ebp - 4], edi
push eax
push esi
call fcn.0040608d
test al, al
je 0x40478a
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
jb 0x404780
mov eax, dword [ebp - 0x28]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ebx, eax
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x4047c9
mov ecx, dword [ebp - 0x28]
lea eax, [eax*2 + 2]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x30], ecx
cmp eax, 0x1000
jb 0x4047c0
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.004016b3
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x30]
push eax
push ecx
call fcn.0041be16
pop ecx
pop ecx
xor eax, eax
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
test ebx, ebx
je 0x4047f0
cmp byte [ebp + 0xc], 0
je 0x4047ec
push dword [ebp + 0x10]
push esi
call fcn.004049eb
xor eax, eax
jmp 0x404808
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
push 2
pop eax
cmp ecx, eax
je 0x404808
xor eax, eax
cmp ecx, 3
sete al
inc eax
call fcn.0041be77
ret 0xc
Function at 0x4049eb
Capabilities:
Set file attributes

Disassembly:
push 0x24
mov eax, 0x42f70c
call fcn.0041bec8
mov esi, dword [ebp + 8]
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x404a04
mov eax, dword [esi]
push dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
setne bl
test eax, eax
jne 0x404a91
xor ecx, ecx
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x18], ecx
mov word [ebp - 0x28], ax
lea eax, [ebp - 0x28]
mov dword [ebp - 4], ecx
push eax
push esi
call fcn.0040608d
test al, al
je 0x404a56
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
jb 0x404a47
mov eax, dword [ebp - 0x28]
push dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
setne bl
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x404a91
mov ecx, dword [ebp - 0x28]
lea eax, [eax*2 + 2]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x30], ecx
cmp eax, 0x1000
jb 0x404a88
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.004016b3
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x30]
push eax
push ecx
call fcn.0041be16
pop ecx
pop ecx
mov al, bl
call fcn.0041be77
ret 8
Function at 0x404d46
Capabilities:
Check if file exists
Enumerate files on windows

Disassembly:
push 0x274
mov eax, 0x42f82e
call fcn.0041bec8
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
cmp esi, 0xffffffff
jne 0x404e45
cmp dword [ebx + 0x14], 8
mov eax, ebx
jb 0x404d71
mov eax, dword [ebx]
lea ecx, [ebp - 0x278]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x404e68
xor ecx, ecx
mov dword [ebp - 0x14], 7
xor eax, eax
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x18], ecx
mov word [ebp - 0x28], ax
lea eax, [ebp - 0x28]
mov dword [ebp - 4], ecx
push eax
push ebx
call fcn.0040608d
test al, al
je 0x404dcc
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
jb 0x404dbc
mov eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x278]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x404e1d
mov ecx, dword [ebp - 0x28]
lea eax, [eax*2 + 2]
mov dword [ebp - 0x27c], eax
mov dword [ebp - 0x280], ecx
cmp eax, 0x1000
jb 0x404e14
lea eax, [ebp - 0x27c]
push eax
lea eax, [ebp - 0x280]
push eax
call fcn.004016b3
mov eax, dword [ebp - 0x27c]
mov ecx, dword [ebp - 0x280]
push eax
push ecx
call fcn.0041be16
pop ecx
pop ecx
cmp esi, 0xffffffff
jne 0x404e68
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x404e3b
cmp eax, 3
je 0x404e3b
cmp eax, 0x12
je 0x404e3b
mov al, 1
jmp 0x404e3d
xor al, al
mov byte [edi + 0x5c], al
jmp 0x404f1f
lea eax, [ebp - 0x278]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x404e68
or esi, 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
setne al
jmp 0x404e3d
push ebx
mov ecx, edi
call fcn.004021af
lea eax, [ebp - 0x24c]
push eax
lea ecx, [ebp - 0x28]
call fcn.004014a3
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 1
push eax
push edi
call fcn.004066ba
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.00401770
mov ecx, dword [ebp - 0x25c]
xor eax, eax
add eax, dword [ebp - 0x258]
mov dword [edi + 0x18], eax
mov eax, dword [ebp - 0x278]
adc ecx, 0
mov dword [edi + 0x20], eax
mov eax, dword [ebp - 0x274]
mov dword [edi + 0x1c], ecx
mov ecx, dword [ebp - 0x270]
mov dword [edi + 0x40], eax
mov eax, dword [ebp - 0x26c]
mov dword [edi + 0x44], ecx
mov ecx, dword [ebp - 0x268]
mov dword [edi + 0x48], eax
mov eax, dword [ebp - 0x264]
mov dword [edi + 0x4c], ecx
mov ecx, dword [ebp - 0x260]
mov dword [edi + 0x50], eax
lea eax, [ebp - 0x264]
mov dword [edi + 0x54], ecx
lea ecx, [edi + 0x28]
push eax
call fcn.0040adab
lea eax, [ebp - 0x274]
push eax
lea ecx, [edi + 0x30]
call fcn.0040adab
lea eax, [ebp - 0x26c]
push eax
lea ecx, [edi + 0x38]
call fcn.0040adab
and dword [edi + 0x58], 0
mov eax, esi
call fcn.0041be77
ret 0xc
Function at 0x408057
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
push ecx
push ecx
push ebx
push ebp
xor ebp, ebp
push edi
mov ecx, ebp
movzx eax, byte [ecx + str.cw]
mov byte [eax + 0x444038], cl
inc ecx
cmp ecx, 0x100
jl 0x408060
mov al, byte [ebp + str.cw]
mov byte [esp + 0x10], al
push 2
push dword [esp + 0x14]
mov byte [ebp*4 + 0x444d39], al
mov byte [ebp*4 + 0x444d38], al
mov byte [ebp*4 + 0x44493b], al
mov byte [ebp*4 + 0x444938], al
mov byte [ebp*4 + 0x44453b], al
mov byte [ebp*4 + 0x44453a], al
mov byte [ebp*4 + 0x44413a], al
mov byte [ebp*4 + 0x444139], al
call fcn.0040882e
push 3
push dword [esp + 0x14]
mov byte [ebp*4 + 0x444d3b], al
mov byte [ebp*4 + 0x44493a], al
mov byte [ebp*4 + 0x444539], al
mov byte [ebp*4 + 0x444138], al
call fcn.0040882e
mov bl, byte [ebp + 0x444038]
push 0xb
mov byte [esp + 0x10], bl
push dword [esp + 0x10]
mov byte [ebp*4 + 0x444d3a], al
mov byte [ebp*4 + 0x444939], al
mov byte [ebp*4 + 0x444538], al
mov byte [ebp*4 + 0x44413b], al
call fcn.0040882e
movzx edi, bl
push 9
push dword [esp + 0x10]
mov byte [ebp*4 + 0x445d3a], al
mov byte [ebp*4 + 0x445939], al
mov byte [ebp*4 + 0x445538], al
mov byte [ebp*4 + 0x44513b], al
mov byte [edi*4 + 0x446d3a], al
mov byte [edi*4 + 0x446939], al
mov byte [edi*4 + 0x446538], al
mov byte [edi*4 + 0x44613b], al
call fcn.0040882e
push 0xd
push dword [esp + 0x10]
mov byte [ebp*4 + 0x445d38], al
mov byte [ebp*4 + 0x44593b], al
mov byte [ebp*4 + 0x44553a], al
mov byte [ebp*4 + 0x445139], al
mov byte [edi*4 + 0x446d38], al
mov byte [edi*4 + 0x44693b], al
mov byte [edi*4 + 0x44653a], al
mov byte [edi*4 + 0x446139], al
call fcn.0040882e
push 0xe
push dword [esp + 0x10]
mov byte [ebp*4 + 0x445d39], al
mov byte [ebp*4 + 0x445938], al
mov byte [ebp*4 + 0x44553b], al
mov byte [ebp*4 + 0x44513a], al
mov byte [edi*4 + 0x446d39], al
mov byte [edi*4 + 0x446938], al
mov byte [edi*4 + 0x44653b], al
mov byte [edi*4 + 0x44613a], al
call fcn.0040882e
mov byte [ebp*4 + 0x445d3b], al
mov byte [ebp*4 + 0x44593a], al
mov byte [ebp*4 + 0x445539], al
mov byte [ebp*4 + 0x445138], al
inc ebp
mov byte [edi*4 + 0x446d3b], al
mov byte [edi*4 + 0x44693a], al
mov byte [edi*4 + 0x446539], al
mov byte [edi*4 + 0x446138], al
cmp ebp, 0x100
jl 0x408076
pop edi
pop ebp
pop ebx
pop ecx
pop ecx
ret
Function at 0x4087a9
Capabilities:
Encrypt data using aes via x86 extensions

Disassembly:
push ecx
cmp dword [esp + 0xc], 0
movups xmm1, xmmword [ecx + 8]
push esi
mov esi, dword [esp + 0xc]
push edi
lea edi, [ecx + 0x18]
jbe 0x408824
mov edx, dword [esp + 0x18]
mov eax, esi
add esi, 0x10
cmp byte [ecx + 1], 0
movups xmm0, xmmword [eax]
je 0x4087d4
pxor xmm0, xmm1
movups xmm1, xmmword [edi]
mov eax, dword [ecx + 4]
pxor xmm1, xmm0
cmp eax, 1
jle 0x408806
lea edx, [edi + 0x10]
lea edi, [eax - 1]
mov dword [esp + 8], edi
lea edi, [ecx + 0x18]
sub dword [esp + 8], 1
movups xmm0, xmmword [edx]
lea edx, [edx + 0x10]
aesenc xmm1, xmm0
jne 0x4087f0
mov edx, dword [esp + 0x18]
add eax, eax
movups xmm0, xmmword [edi + eax*8]
mov eax, edx
add edx, 0x10
sub dword [esp + 0x14], 1
aesenclast xmm1, xmm0
mov dword [esp + 0x18], edx
movups xmmword [eax], xmm1
jne 0x4087c2
pop edi
movups xmmword [ecx + 8], xmm1
pop esi
pop ecx
ret 0xc

Function at 0x408858
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x24
mov eax, dword [0x43d748]
xor eax, esp
mov dword [esp + 0x20], eax
push ebx
push ebp
mov ebp, ecx
xor ebx, ebx
inc ebx
mov dword [esp + 0x14], ebp
mov dword [esp + 8], ebx
cmp dword [ebp + 4], ebx
jle 0x408911
push esi
push edi
lea edi, [ebp + 0x28]
mov dword [esp + 0x14], edi
lea eax, [edi + 2]
xor esi, esi
mov dword [esp + 0x18], eax
lea ebx, [esp + 0x20]
mov ebp, eax
push 4
add ebx, esi
pop edi
movzx eax, byte [ebp + 1]
movzx ecx, byte [ebp - 1]
mov dl, byte [esi + eax*4 + 0x446d38]
movzx eax, byte [ebp - 2]
xor dl, byte [esi + ecx*4 + 0x446538]
xor dl, byte [esi + eax*4 + 0x446138]
movzx eax, byte [ebp]
lea ebp, [ebp + 4]
xor dl, byte [esi + eax*4 + 0x446938]
mov byte [ebx], dl
lea ebx, [ebx + 4]
sub edi, 1
jne 0x40889b
mov eax, dword [esp + 0x18]
inc esi
cmp esi, 4
jl 0x408890
mov edi, dword [esp + 0x14]
lea eax, [esp + 0x20]
push 0x10
push eax
push edi
call fcn.0041d110
mov ebx, dword [esp + 0x1c]
add esp, 0xc
mov ebp, dword [esp + 0x1c]
inc ebx
add edi, 0x10
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], edi
cmp ebx, dword [ebp + 4]
jl 0x408887
pop edi
pop esi
mov ecx, dword [esp + 0x28]
pop ebp
pop ebx
xor ecx, esp
call fcn.0041be24
add esp, 0x24
ret
Function at 0x408922
Capabilities:
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
sub esp, 0x30
mov eax, dword [0x43d748]
xor eax, esp
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x34]
push ebx
push ebp
push esi
mov ebp, ecx
push edi
push 0x20
push eax
mov esi, dword [ebp + 4]
lea eax, [esp + 0x24]
sub esi, 6
mov dword [esp + 0x18], ebp
push eax
mov dword [esp + 0x20], esi
call fcn.0041d110
add esp, 0xc
xor ebx, ebx
xor edx, edx
xor edi, edi
test esi, esi
jle 0x4089ae
cmp ebx, dword [ebp + 4]
jg 0x408b06
cmp edi, esi
jge 0x40899b
lea ebp, [esp + 0x1c]
lea ebp, [ebp + edi*4]
cmp edx, 4
jge 0x408997
mov esi, dword [esp + 0x10]
lea ecx, [edx + ebx*4]
mov eax, dword [ebp]
inc edi
add ebp, 4
inc edx
mov dword [esi + ecx*4 + 0x18], eax
mov esi, dword [esp + 0x14]
cmp edi, esi
jl 0x408977
mov ebp, dword [esp + 0x10]
cmp edx, 4
jne 0x4089a1
inc ebx
lea eax, [edx - 4]
neg eax
sbb eax, eax
and edx, eax
cmp edi, esi
jl 0x408962
cmp ebx, dword [ebp + 4]
jg 0x408b06
mov edi, 0x43d108
movzx eax, byte [esp + esi*4 + 0x19]
mov cl, byte [esp + 0x1c]
xor cl, byte [eax + str.cw]
mov byte [esp + 0x1c], cl
movzx eax, byte [esp + esi*4 + 0x1a]
mov al, byte [eax + str.cw]
xor byte [esp + 0x1d], al
movzx eax, byte [esp + esi*4 + 0x1b]
mov al, byte [eax + str.cw]
xor byte [esp + 0x1e], al
movzx eax, byte [esp + esi*4 + 0x18]
mov al, byte [eax + str.cw]
xor byte [esp + 0x1f], al
mov al, byte [edi]
xor al, cl
inc edi
mov byte [esp + 0x1c], al
mov dword [esp + 0x18], edi
cmp esi, 8
je 0x408a3d
cmp esi, 1
jle 0x408a31
lea ecx, [esp + 0x20]
lea ebp, [esi - 1]
push 4
pop edi
mov al, byte [ecx - 4]
xor byte [ecx], al
inc ecx
sub edi, 1
jne 0x408a1d
sub ebp, 1
jne 0x408a1a
mov ebp, dword [esp + 0x10]
xor edi, edi
test esi, esi
jle 0x408af9
jmp 0x408aad
push 3
lea ecx, [esp + 0x24]
pop ebp
push 4
pop edi
mov al, byte [ecx - 4]
xor byte [ecx], al
inc ecx
sub edi, 1
jne 0x408a47
sub ebp, 1
jne 0x408a44
movzx eax, byte [esp + 0x28]
lea ecx, [esp + 0x30]
push 3
pop ebp
mov al, byte [eax + str.cw]
xor byte [esp + 0x2c], al
movzx eax, byte [esp + 0x29]
mov al, byte [eax + str.cw]
xor byte [esp + 0x2d], al
movzx eax, byte [esp + 0x2a]
mov al, byte [eax + str.cw]
xor byte [esp + 0x2e], al
movzx eax, byte [esp + 0x2b]
mov al, byte [eax + str.cw]
xor byte [esp + 0x2f], al
push 4
pop edi
mov al, byte [ecx - 4]
xor byte [ecx], al
inc ecx
sub edi, 1
jne 0x408a9d
sub ebp, 1
jne 0x408a9a
mov eax, dword [esp + 0x10]
cmp ebx, dword [eax + 4]
jg 0x408af5
cmp edi, esi
jge 0x408ae2
lea ebp, [esp + 0x1c]
lea ebp, [ebp + edi*4]
cmp edx, 4
jge 0x408ae5
mov esi, dword [esp + 0x10]
lea ecx, [edx + ebx*4]
mov eax, dword [ebp]
inc edi
add ebp, 4
inc edx
mov dword [esi + ecx*4 + 0x18], eax
mov esi, dword [esp + 0x14]
cmp edi, esi
jl 0x408ac2
cmp edx, 4
jne 0x408ae8
inc ebx
lea eax, [edx - 4]
neg eax
sbb eax, eax
and edx, eax
cmp edi, esi
jl 0x408aad
mov ebp, dword [esp + 0x10]
mov edi, dword [esp + 0x18]
cmp ebx, dword [ebp + 4]
jle 0x4089bc
mov ecx, dword [esp + 0x3c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0041be24
add esp, 0x30
ret 4
Function at 0x408c6c
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [0x447140]
test esi, esi
jne 0x408c8a
mov ecx, 0x447138
call fcn.00408bf7
mov esi, dword [0x447140]
mov eax, dword [ebp + 0xc]
movzx ecx, byte [ebp + 0x14]
and eax, 0xfffffff0
cmp byte [ebp + 0x10], 0
je 0x408cd5
test esi, esi
je 0x408cf9
push ecx
push eax
push dword [ebp + 8]
mov ecx, esi
call dword [0x431248]
call esi
test eax, eax
jne 0x408d1d
push str.CryptProtectMemory_failed
mov esi, 0x4584e8
push esi
call fcn.00402d7f
pop ecx
pop ecx
mov ecx, esi
call fcn.00402f81
push 2
mov ecx, esi
call fcn.00402d7a
jmp 0x408d1d
mov esi, dword [0x447144]
test esi, esi
je 0x408cf9
push ecx
push eax
push dword [ebp + 8]
mov ecx, esi
call dword [0x431248]
call esi
test eax, eax
jne 0x408d1d
push str.CryptUnprotectMemory_failed
jmp 0x408cb6
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor edx, edx
mov ebx, eax
cmp dword [ebp + 0xc], edx
jbe 0x408d1c
mov esi, dword [ebp + 8]
lea eax, [ebx + 0x4b]
add al, dl
lea ecx, [edx + esi]
xor byte [ecx], al
inc edx
cmp edx, dword [ebp + 0xc]
jb 0x408d0c
pop ebx
pop esi
pop ebp
ret 0x10
Function at 0x4096cf
Capabilities:
Hash data using sha1

Disassembly:
mov eax, dword [esp + 4]
and dword [eax + 0x18], 0
and dword [eax + 0x1c], 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 4

Function at 0x40a3c8
Capabilities:
Get common file path

Disassembly:
push 0x60
mov eax, 0x42fbd4
call fcn.0041bec8
mov ebx, dword [ebp + 8]
push 0x208
call fcn.0041bde6
mov edi, eax
pop ecx
mov dword [ebp - 0x6c], edi
lea esi, [edi + 0x208]
push esi
push edi
mov dword [ebp - 0x64], esi
call fcn.00401485
mov dword [ebp - 0x68], esi
and dword [ebp - 4], 0
push 0x104
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jne 0x40a415
xor ebx, ebx
jmp 0x40a4cb
and dword [ebp - 0x28], 0
xor eax, eax
and dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
push ebx
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 1
call fcn.004014a3
push edi
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 2
call fcn.004014a3
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.0040642e
lea ecx, [ebp - 0x40]
call fcn.00401770
lea ecx, [ebp - 0x58]
call fcn.00401770
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
jb 0x40a475
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ecx, dword [ebp - 0x14]
mov ebx, eax
cmp ecx, 8
jb 0x40a4ba
mov edx, dword [ebp - 0x28]
lea ecx, [ecx*2 + 2]
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x60], edx
cmp ecx, 0x1000
jb 0x40a4b1
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x60]
push eax
call fcn.004016b3
mov ecx, dword [ebp - 0x5c]
mov edx, dword [ebp - 0x60]
push ecx
push edx
call fcn.0041be16
pop ecx
pop ecx
and dword [ebp - 0x18], 0
xor eax, eax
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
test edi, edi
je 0x40a4db
sub esi, edi
and esi, 0xfffffffe
push esi
push edi
call fcn.004012a3
mov eax, ebx
call fcn.0041be77
ret 4
Function at 0x40f36d
Capabilities:
Encode data using xor

Disassembly:
cmp dword [0x4577b0], 0
je 0x40f37a
or eax, 0xffffffff
ret
mov eax, dword [0x44768c]
push ebx
push ebp
xor ebp, ebp
cmp eax, ebp
jg 0x40f3b8
mov ecx, dword [0x447688]
jl 0x40f393
cmp ecx, ebp
ja 0x40f3b8
or ebx, 0xffffffff
mov dword [0x4576d0], ebp
add ecx, ebx
mov dword [0x4576d4], ebp
mov dword [0x447688], ecx
adc eax, ebx
mov dword [0x44768c], eax
mov eax, ebx
jmp 0x40f4c5
push esi
push edi
mov edi, dword [0x4576d4]
or ebx, 0xffffffff
cmp edi, ebp
jg 0x40f41d
jl 0x40f3d3
mov esi, dword [0x4576d0]
cmp esi, ebp
ja 0x40f423
mov esi, 0x2000
push esi
push dword [0x4576c4]
call fcn.0040f69f
cdq
mov ecx, eax
mov dword [0x4576d0], eax
or ecx, edx
mov dword [0x4576d4], edx
je 0x40f462
and eax, edx
cmp eax, ebx
je 0x40f453
add dword [0x457708], esi
mov eax, dword [0x4576c4]
adc dword [0x45770c], ebp
mov dword [0x4576c8], eax
call fcn.0040ed1c
mov edi, dword [0x4576d4]
mov esi, dword [0x4576d0]
mov eax, dword [0x4476b8]
test byte [eax + 0x80], 1
je 0x40f4a5
cmp byte [0x457888], 0
mov eax, esi
je 0x40f472
or eax, edi
je 0x40f4a5
push esi
push dword [0x4576c8]
push 0x457898
call fcn.00412dad
jmp 0x40f499
push 0x4581e4
mov ecx, 0x4584e8
call fcn.00402ed4
mov dword [0x4576d0], ebp
mov eax, ebx
mov dword [0x4576d4], ebp
jmp 0x40f4c3
or eax, edi
mov ebp, dword [0x4576c8]
je 0x40f4a5
add esi, ebx
adc edi, ebx
call fcn.00412b75
xor byte [ebp], al
movzx eax, byte [ebp]
push eax
call fcn.00412c9f
mov eax, esi
inc ebp
or eax, edi
jne 0x40f47c
mov esi, dword [0x4576d0]
mov edi, dword [0x4576d4]
mov eax, dword [0x4576c8]
add esi, ebx
mov dword [0x4576d0], esi
adc edi, ebx
mov dword [0x4576d4], edi
movzx eax, byte [eax]
inc dword [0x4576c8]
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x412bd6
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x43d748]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push eax
call fcn.00412b93
push 0xc
lea eax, [ebp - 0x10]
push esi
push eax
call fcn.0041d110
add esp, 0xc
xor esi, esi
call fcn.00412b75
xor byte [ebp + esi - 0x10], al
movzx eax, byte [ebp + esi - 0x10]
push eax
call fcn.00412c9f
inc esi
cmp esi, 0xc
jl 0x412c04
mov eax, dword [0x4476b8]
movzx edx, byte [ebp - 5]
movzx ecx, byte [0x457727]
test byte [eax + 0x80], 2
jne 0x412c3e
movzx ecx, byte [0x45772f]
cmp edx, ecx
je 0x412c47
or eax, 0xffffffff
jmp 0x412c90
cmp byte [ebp + 0x10], 0
je 0x412c8e
mov ecx, dword [0x4576d0]
mov eax, ecx
cdq
cmp edx, dword [0x44768c]
jl 0x412c6a
mov esi, dword [0x447688]
jg 0x412c6c
cmp eax, esi
ja 0x412c6c
mov esi, ecx
push edi
mov edi, dword [0x4576c8]
test esi, esi
je 0x412c8d
call fcn.00412b75
xor byte [edi], al
movzx eax, byte [edi]
push eax
call fcn.00412c9f
inc edi
sub esi, 1
jne 0x412c77
pop edi
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0041be24
leave
ret 0xc

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

Disassembly:
mov ecx, dword [0x457808]
mov eax, dword [esp + 4]
mov edx, dword [0x457810]
xor eax, ecx
movzx eax, al
shr ecx, 8
xor ecx, dword [eax*4 + 0x447260]
movzx eax, cl
add eax, dword [0x45780c]
mov dword [0x457808], ecx
imul ecx, eax, 0x8088405
mov eax, dword [esp + 4]
inc ecx
mov dword [0x45780c], ecx
shr ecx, 0x18
xor ecx, edx
shr edx, 8
movzx ecx, cl
xor edx, dword [ecx*4 + 0x447260]
mov dword [0x457810], edx
ret 4

Function at 0x412ee3
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x20
mov eax, dword [0x43d748]
xor eax, esp
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x28]
push ebx
mov ebx, dword [esp + 0x28]
push ebp
mov ebp, dword [esp + 0x38]
push esi
mov esi, dword [esp + 0x40]
push edi
mov dword [esp + 0x14], eax
lea eax, [esp + 0x18]
push eax
push ebx
mov dword [esp + 0x18], esi
call fcn.00413282
test ebp, ebp
je 0x412f30
cmp byte [esi], 0
je 0x412f30
push 0x18
pop ecx
mov esi, ebp
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x10]
jmp 0x412f54
lea edi, [ebx + 0x60]
push 0x40
mov eax, edi
pop ecx
xor byte [eax], 0x6a
inc eax
sub ecx, 1
jne 0x412f38
push ebx
call fcn.004096cf
push 0x40
push edi
push ebx
call fcn.00409700
test ebp, ebp
je 0x412f69
cmp byte [esi], 0
jne 0x412f69
mov eax, dword [esp + 0x10]
mov esi, ebx
push 0x18
pop ecx
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov byte [eax], 1
push 0x14
lea eax, [esp + 0x1c]
push eax
push ebx
call fcn.00409700
lea eax, [esp + 0x18]
push eax
push ebx
call fcn.00413282
cmp dword [esp + 0x3c], 0
pop edi
pop esi
pop ebp
pop ebx
jbe 0x412fa1
push dword [esp + 0x2c]
lea eax, [esp + 0xc]
push eax
push dword [esp + 0xc]
call fcn.0041d110
add esp, 0xc
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.0041be24
add esp, 0x20
ret 0x14
Function at 0x412fb2
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
mov edi, dword [esp + 0x18]
lea ebx, [esi + 0x60]
cmp edi, 0x40
jbe 0x412fe2
push esi
call fcn.004096cf
push edi
push dword [esp + 0x18]
push esi
call fcn.00409700
push ebx
push esi
call fcn.00413282
push 0x14
pop edi
jmp 0x412ff0
push edi
push dword [esp + 0x18]
push ebx
call fcn.0041d110
add esp, 0xc
mov dword [esi + 0xa0], edi
test edi, edi
je 0x413012
push 0xffffffffffffffa0
pop edx
mov ecx, ebx
sub edx, esi
xor byte [ecx], 0x36
inc ecx
mov edi, dword [esi + 0xa0]
lea eax, [edx + ecx]
cmp eax, edi
jb 0x413001
push 0x40
pop eax
sub eax, edi
push eax
lea eax, [esi + 0x60]
add eax, edi
push 0x36
push eax
call fcn.0041d690
add esp, 0xc
push esi
call fcn.004096cf
push 0x40
push ebx
push esi
call fcn.00409700
pop edi
pop esi
pop ebx
ret 0xc