joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4035a5
Capabilities:
Contain obfuscated stackstrings

Disassembly:
sub esp, 0x68
push ebx
push ebp
push esi
push edi
push 0x41
pop eax
push 0x56
pop ecx
push 0x2e
mov byte [esp + 0x24], al
mov byte [esp + 0x27], al
pop eax
push 0x6c
pop ebx
push 0x65
mov byte [esp + 0x26], cl
pop ecx
push 0x4f
mov byte [esp + 0x2c], al
pop eax
push 0x70
mov byte [esp + 0x1b], al
pop eax
push 0x6e
mov byte [esp + 0x1c], al
pop eax
mov byte [esp + 0x1a], al
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x24]
mov byte [esp + 0x25], 0x44
push eax
mov dword [esp + 0x2c], 0x32334950
mov byte [esp + 0x31], 0x64
mov byte [esp + 0x32], bl
mov byte [esp + 0x33], bl
mov byte [esp + 0x34], 0
mov byte [esp + 0x1c], 0x52
mov byte [esp + 0x1d], cl
mov byte [esp + 0x1e], 0x67
mov byte [esp + 0x21], cl
mov byte [esp + 0x23], 0x4b
mov byte [esp + 0x24], cl
mov word [esp + 0x25], 0x5779
mov byte [esp + 0x27], 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x5c
pop ebp
push 0x41
pop ecx
push 0x70
mov word [esp + 0x38], cx
pop ecx
push 0x69
pop edx
push 0x63
mov word [esp + 0x3a], cx
mov word [esp + 0x3c], cx
pop ecx
push 0x61
pop esi
push 0x74
mov word [esp + 0x3e], bx
pop ebx
push 0x6f
pop edi
push 0x6e
mov word [esp + 0x42], cx
pop ecx
push 0x73
mov word [esp + 0x40], dx
mov word [esp + 0x48], dx
mov word [esp + 0x34], bp
mov word [esp + 0x36], bp
mov word [esp + 0x44], si
mov word [esp + 0x46], bx
mov word [esp + 0x4a], di
mov word [esp + 0x4c], cx
pop edx
push 0x56
pop ecx
push 0x4d
mov word [esp + 0x54], cx
pop ecx
push 0x77
mov word [esp + 0x56], cx
pop ecx
push 0x72
mov word [esp + 0x58], cx
pop ecx
push 0x65
mov word [esp + 0x5c], cx
mov word [esp + 0x5a], si
pop esi
push 0x48
pop ecx
push 0x4f
mov word [esp + 0x60], cx
pop ecx
push 0x70
mov word [esp + 0x68], cx
pop ecx
push 0x6e
mov word [esp + 0x6a], cx
pop ecx
push 0x2e
mov word [esp + 0x6e], cx
pop ecx
push 0x78
mov word [esp + 0x70], cx
pop ecx
mov word [esp + 0x70], cx
xor ecx, ecx
mov word [esp + 0x74], cx
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x34]
mov word [esp + 0x4e], dx
push ecx
push connect
mov word [esp + 0x58], bp
mov word [esp + 0x5a], bp
mov word [esp + 0x66], si
mov word [esp + 0x6a], di
mov word [esp + 0x6c], dx
mov word [esp + 0x6e], bx
mov word [esp + 0x74], si
mov word [esp + 0x7a], si
mov word [esp + 0x7e], si
call eax
pop edi
neg eax
pop esi
sbb eax, eax
pop ebp
inc eax
pop ebx
add esp, 0x68
ret
Function at 0x40374b
Capabilities:
Contain obfuscated stackstrings

Disassembly:
sub esp, 0x7c
push ebx
push ebp
push esi
push edi
push 0x41
pop ecx
push 0x56
pop eax
push 0x64
mov byte [esp + 0x26], al
pop eax
push 0x6c
mov byte [esp + 0x2d], al
pop eax
push 0x52
mov byte [esp + 0x2e], al
mov byte [esp + 0x2f], al
pop eax
push 0x65
mov byte [esp + 0x24], cl
mov byte [esp + 0x27], cl
pop ecx
push 0x4f
mov byte [esp + 0x18], al
pop eax
push 0x6e
mov byte [esp + 0x1b], al
pop eax
push 0x57
mov byte [esp + 0x1e], al
lea eax, [esp + 0x18]
pop ebx
push eax
lea eax, [esp + 0x24]
mov byte [esp + 0x25], 0x44
push eax
mov dword [esp + 0x2c], 0x32334950
mov byte [esp + 0x30], 0x2e
mov byte [esp + 0x34], 0
mov byte [esp + 0x1d], cl
mov byte [esp + 0x1e], 0x67
mov byte [esp + 0x20], 0x70
mov byte [esp + 0x21], cl
mov byte [esp + 0x23], 0x4b
mov byte [esp + 0x24], cl
mov byte [esp + 0x25], 0x79
mov byte [esp + 0x26], bl
mov byte [esp + 0x27], 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x53
pop ecx
push 0x4f
pop esi
push 0x46
mov word [esp + 0x34], cx
pop ecx
push 0x54
mov word [esp + 0x38], cx
pop ecx
push 0x41
mov word [esp + 0x3a], cx
pop ecx
push 0x52
mov word [esp + 0x3e], cx
pop ecx
push 0x45
mov word [esp + 0x40], cx
pop ecx
push 0x5c
pop edx
push 0x72
mov word [esp + 0x36], si
mov word [esp + 0x48], si
pop esi
mov word [esp + 0x38], bx
mov word [esp + 0x3e], cx
mov word [esp + 0x40], dx
mov word [esp + 0x42], dx
mov word [esp + 0x46], si
push 0x61
pop edi
push 0x63
pop ecx
push 0x6c
mov word [esp + 0x4e], cx
pop ecx
push 0x65
mov word [esp + 0x50], cx
pop ecx
push 0x56
mov word [esp + 0x52], cx
pop ecx
push 0x69
pop ebp
push 0x74
pop ebx
push 0x75
mov word [esp + 0x58], cx
mov word [esp + 0x5c], si
pop esi
push 0x6c
pop ecx
push 0x42
mov word [esp + 0x64], cx
pop ecx
push 0x6f
mov word [esp + 0x66], cx
mov word [esp + 0x4c], di
mov word [esp + 0x62], di
pop edi
push 0x78
pop ecx
push 0x20
mov word [esp + 0x54], dx
mov word [esp + 0x56], dx
pop edx
push 0x47
mov word [esp + 0x6a], cx
pop ecx
push 0x65
mov word [esp + 0x6e], cx
pop ecx
push 0x73
mov word [esp + 0x72], cx
pop ecx
push 0x41
mov word [esp + 0x6c], dx
mov word [esp + 0x78], dx
pop edx
push 0x64
mov word [esp + 0x74], cx
mov word [esp + 0x7a], dx
pop edx
mov word [esp + 0x86], cx
xor ecx, ecx
push 0x6e
mov word [esp + 0x8c], cx
lea ecx, [esp + 0x14]
mov word [esp + 0x7c], dx
mov word [esp + 0x7e], dx
pop edx
push ecx
lea ecx, [esp + 0x34]
mov word [esp + 0x5a], bp
push ecx
push reloc.WS2_32.dll_bind
mov word [esp + 0x66], bx
mov word [esp + 0x68], si
mov word [esp + 0x70], di
mov word [esp + 0x78], si
mov word [esp + 0x7e], bx
mov word [esp + 0x88], bp
mov word [esp + 0x8a], bx
mov word [esp + 0x8c], bp
mov word [esp + 0x8e], di
mov word [esp + 0x90], dx
call eax
neg eax
sbb eax, eax
inc eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7c
ret
Function at 0x403952
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
movaps xmm0, xmmword [str.IsDebuggerPresenC:windows_sysfalse]
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0x6e72654b
push eax
mov dword [ebp - 8], 0x32336c65
mov byte [ebp - 4], 0
movups xmmword [ebp - 0x20], xmm0
mov word [ebp - 0x10], 0x74
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
call eax
neg eax
sbb eax, eax
neg eax
leave
ret

Function at 0x4058d4
Capabilities:
Read file on windows

Disassembly:
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push esi
mov esi, dword [esp + 0x18]
mov ebp, ecx
test esi, esi
jg 0x4058f4
jl 0x4058eb
test ebx, ebx
jne 0x4058f4
xor eax, eax
xor edx, edx
jmp 0x4059b7
cmp dword [ebp + 0x38], 0
je 0x40590a
push esi
push ebx
push dword [esp + 0x18]
call fcn.004059bd
jmp 0x4059b7
mov eax, dword [ebp + 0x1c]
push edi
mov edi, ebx
mov ecx, dword [eax]
test ecx, ecx
je 0x40594e
mov eax, dword [ebp + 0x2c]
cmp dword [eax], 0
jbe 0x40594e
cmp dword [eax], ebx
mov esi, ebx
mov edi, dword [esp + 0x14]
cmovb esi, dword [eax]
push esi
push ecx
push edi
call fcn.0045f1c0
mov eax, dword [ebp + 0x2c]
add edi, esi
mov dword [esp + 0x20], edi
add esp, 0xc
mov edi, ebx
sub edi, esi
sub dword [eax], esi
mov eax, dword [ebp + 0x1c]
add dword [eax], esi
mov esi, dword [esp + 0x1c]
jmp 0x405956
mov eax, dword [esp + 0x14]
mov dword [esp + 0x14], eax
cmp dword [ebp + 0x4c], 0
je 0x4059ad
mov ecx, ebp
call fcn.00404d15
mov ecx, dword [esp + 0x14]
mov edx, edi
mov eax, 0xfff
cmp edi, eax
jbe 0x405998
push dword [ebp + 0x4c]
push eax
push 1
push ecx
call fcn.0046b890
mov ecx, dword [esp + 0x24]
sub edi, eax
add ecx, eax
add esp, 0x10
mov dword [esp + 0x14], ecx
mov edx, edi
cmp eax, 0xfff
jne 0x4059ad
jmp 0x405969
test edx, edx
je 0x4059ad
push dword [ebp + 0x4c]
push edi
push 1
push ecx
call fcn.0046b890
add esp, 0x10
sub edi, eax
sub ebx, edi
mov eax, ebx
sbb esi, 0
mov edx, esi
pop edi
pop esi
pop ebp
pop ebx
ret 0xc
Function at 0x4083d2
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov edx, dword [esp + 8]
test edx, edx
jne 0x4083dd
xor eax, eax
ret
mov ecx, dword [esp + 4]
push esi
mov esi, dword [esp + 0x10]
not ecx
cmp esi, 8
jb 0x40849e
push edi
mov edi, esi
shr edi, 3
movzx eax, byte [edx]
sub esi, 8
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4bbfc0]
movzx eax, byte [edx + 1]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4bbfc0]
movzx eax, byte [edx + 2]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4bbfc0]
movzx eax, byte [edx + 3]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4bbfc0]
movzx eax, byte [edx + 4]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4bbfc0]
movzx eax, byte [edx + 5]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4bbfc0]
movzx eax, byte [edx + 6]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4bbfc0]
movzx eax, byte [edx + 7]
add edx, 8
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4bbfc0]
sub edi, 1
jne 0x4083f7
pop edi
test esi, esi
je 0x4084ba
movzx eax, byte [edx]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4bbfc0]
inc edx
sub esi, 1
jne 0x4084a2
not ecx
mov eax, ecx
pop esi
ret

Function at 0x40a08c
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov edx, dword [esp + 4]
movsx eax, byte [esp + 8]
mov ecx, dword [edx]
xor eax, ecx
movzx eax, al
shr ecx, 8
xor ecx, dword [eax*4 + 0x4bbfc0]
movzx eax, cl
add eax, dword [edx + 4]
imul eax, eax, 0x8088405
mov dword [edx], ecx
mov ecx, dword [edx + 8]
inc eax
mov dword [edx + 4], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4bbfc0]
mov dword [edx + 8], ecx
ret

Function at 0x40a3b2
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
imul ecx, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0x14]
cmp byte [edi], 0
je 0x40a3e5
push 0
lea eax, [ebp + 0x10]
push eax
push ecx
push dword [ebp + 8]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40a3e0
mov byte [edi + 8], 1
mov eax, dword [ebp + 0x10]
jmp 0x40a40f
mov edx, dword [edi + 0x1c]
push esi
mov esi, dword [edi + 0x18]
sub esi, edx
lea eax, [edx + ecx]
cmp eax, dword [edi + 0x18]
cmovbe esi, ecx
mov ecx, dword [edi + 0x14]
push esi
add ecx, edx
push ecx
push dword [ebp + 8]
call fcn.0045f1c0
add esp, 0xc
mov eax, esi
add dword [edi + 0x1c], esi
pop esi
xor edx, edx
div dword [ebp + 0xc]
pop edi
pop ebp
ret
Function at 0x40afd7
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ecx
push ecx
push ebx
push esi
push edi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x40b12f
xor ebx, ebx
cmp dword [edi + 0x18], ebx
je 0x40b12f
cmp dword [edi + 0x7c], ebx
je 0x40afff
push edi
call fcn.0040a7b1
pop ecx
lea eax, [esp + 0xc]
push eax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x18]
push eax
push edi
call fcn.0040ae1c
add esp, 0x10
test eax, eax
je 0x40b022
push 0xffffffffffffff99
jmp 0x40b131
push 0x84
call fcn.0047b060
mov esi, eax
pop ecx
test esi, esi
jne 0x40b03a
push 0xffffffffffffff98
jmp 0x40b131
push 0x4000
call fcn.0047b060
mov dword [esi], eax
mov dword [esi + 0x4c], ebx
pop ecx
mov ecx, dword [esp + 0x18]
mov dword [esi + 0x44], ecx
mov ecx, dword [esp + 0xc]
mov dword [esi + 0x48], ecx
test eax, eax
jne 0x40b065
push esi
call fcn.00467110
pop ecx
jmp 0x40b033
mov eax, dword [edi + 0x3c]
mov ecx, dword [edi + 0x34]
mov dword [esi + 0x54], eax
mov eax, dword [edi]
mov dword [esi + 0x60], eax
mov eax, dword [edi + 0xc]
mov dword [esi + 0x40], ebx
mov dword [esi + 0x50], ebx
mov dword [esi + 0x64], ecx
mov dword [esi + 0x68], eax
mov dword [esi + 0x18], ebx
test ecx, ecx
je 0x40b0a7
lea eax, [esi + 4]
mov dword [esi + 0x24], ebx
push eax
mov dword [esi + 0x28], ebx
mov dword [esi + 0x2c], ebx
call fcn.0040a114
pop ecx
test eax, eax
jne 0x40b0a7
mov dword [esi + 0x40], 1
mov eax, dword [edi + 0x40]
mov cl, byte [edi + 0x30]
mov dword [esi + 0x58], eax
and cl, 1
mov eax, dword [edi + 0x44]
mov dword [esi + 0x5c], eax
mov eax, dword [edi + 0x30]
shr eax, 3
mov byte [esi + 0x6c], cl
test al, 1
je 0x40b0cb
mov al, byte [edi + 0x39]
jmp 0x40b0ce
mov al, byte [edi + 0x3f]
mov ebx, dword [esp + 0x1c]
mov byte [esi + 0x80], al
xor eax, eax
push ebp
push 0xc
test cl, cl
mov dword [esi + 0x74], 0x23456789
pop edx
cmovne eax, edx
mov dword [esi + 0x78], 0x34567890
mov dword [esi + 0x7c], eax
lea ebp, [esi + 0x70]
mov dword [ebp], 0x12345678
test ebx, ebx
je 0x40b116
mov al, byte [ebx]
test al, al
je 0x40b116
push eax
push ebp
call fcn.0040a08c
pop ecx
pop ecx
add ebx, 1
jne 0x40b102
mov eax, dword [esp + 0x14]
and dword [esi + 8], 0
add eax, 0x1e
add eax, dword [edi + 0x78]
mov dword [esi + 0x3c], eax
xor eax, eax
mov dword [edi + 0x7c], esi
pop ebp
jmp 0x40b132
push 0xffffffffffffff9a
pop eax
pop edi
pop esi
pop ebx
pop ecx
pop ecx
ret
Function at 0x40b489
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, ecx
xor ebx, ebx
cmp dword [esi], ebx
jne 0x40b54b
cmp dword [esi + 4], 0xffffffff
jne 0x40b54b
push edi
lea edi, [esi + 0x244]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x40b4bd
sub ecx, edx
sar ecx, 1
movzx eax, word [esi + ecx*2 + 0x242]
cmp eax, 0x5c
je 0x40b4f4
cmp eax, 0x2f
je 0x40b4f4
sub edi, 2
mov ax, word [edi + 2]
lea edi, [edi + 2]
cmp ax, bx
jne 0x40b4e1
mov eax, dword [0x4bc6fc]
mov dword [edi], eax
cmp dword [ebp + 0x10], 1
pop edi
jne 0x40b514
push 1
push ebx
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x40b514
mov eax, 0x2000000
jmp 0x40b550
lea eax, [ebp - 4]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040a1ca
add esp, 0x10
test eax, eax
jne 0x40b532
mov eax, dword [ebp - 4]
jmp 0x40b550
push eax
call fcn.0040a80f
pop ecx
xor ecx, ecx
mov dword [esi], eax
test eax, eax
mov edx, 0x200
cmove ecx, edx
mov eax, ecx
jmp 0x40b550
mov eax, 0x1000000
pop esi
pop ebx
leave
ret 0xc
Function at 0x40bf1f
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x410
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
test esi, esi
je 0x40bf47
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40bf47
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ebx, dword [ebp + 0xc]
movzx eax, word [ebx]
test ax, ax
je 0x40c023
push edi
mov edi, ebx
mov ecx, ebx
mov edx, eax
cmp dx, 0x2f
je 0x40bf69
cmp dx, 0x5c
jne 0x40bf6b
mov edi, ecx
add ecx, 2
movzx eax, word [ecx]
mov edx, eax
test ax, ax
jne 0x40bf5d
cmp edi, ebx
je 0x40bfa9
sub edi, ebx
lea eax, [ebp - 0x410]
and edi, 0xfffffffe
push edi
push ebx
push eax
call fcn.0045f1c0
xor eax, eax
mov word [ebp + edi - 0x410], ax
lea eax, [ebp - 0x410]
push eax
push esi
call fcn.0040bf1f
add esp, 0x14
xor eax, eax
mov word [ebp - 0x208], ax
test esi, esi
je 0x40bfcd
lea ecx, [ebp - 0x208]
sub ecx, esi
movzx eax, word [esi]
mov word [ecx + esi], ax
lea esi, [esi + 2]
test ax, ax
jne 0x40bfbe
mov esi, ebx
xor ecx, ecx
mov ax, word [ebx]
add ebx, 2
cmp ax, cx
jne 0x40bfd1
lea edi, [ebp - 0x208]
sub ebx, esi
sub edi, 2
mov ax, word [edi + 2]
add edi, 2
cmp ax, cx
jne 0x40bfe7
mov ecx, ebx
lea eax, [ebp - 0x208]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
pop edi
cmp eax, 0xffffffff
jne 0x40c023
push 0
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
pop esi
pop ebx
leave
ret
Function at 0x40da5e
Capabilities:
Encode data using xor

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, dword [esp + 0x14]
xor ebp, ebp
mov ecx, ebp
mov ebx, ebp
push edi
mov dword [esp + 0x10], ecx
mov dword [esi + 0x6af80], 2
lea edi, [esi + 0x6af84]
jmp 0x40dc32
cmp eax, 3
jb 0x40dad7
mov edx, dword [edi]
mov eax, dword [esi + 0x6af7c]
shl eax, 5
movzx ecx, byte [edx + esi + 0x1af72]
xor ecx, eax
and ecx, 0x7fff
and edx, 0x7fff
mov dword [esi + 0x6af7c], ecx
mov eax, dword [esi + ecx*4 + 0x4af70]
mov dword [esi + edx*4 + 0x2af70], eax
mov ecx, dword [esi + 0x6af7c]
mov dword [esp + 0x10], eax
mov eax, dword [edi]
mov dword [esi + ecx*4 + 0x4af70], eax
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x40db10
mov eax, dword [edi]
sub eax, ecx
cmp eax, 0x7efa
ja 0x40db10
mov eax, dword [esi + 0x6af90]
cmp dword [esi + 0x6afa0], eax
jbe 0x40dafa
mov dword [esi + 0x6afa0], eax
push ecx
push esi
call fcn.0040dc69
pop ecx
pop ecx
mov ecx, dword [esi + 0x6af90]
mov ebx, eax
cmp ebx, ecx
cmova ebx, ecx
mov ecx, dword [edi]
cmp ebx, 3
jb 0x40dbc9
sub ecx, dword [esi + 0x6af88]
lea eax, [ebx - 3]
push eax
push ecx
push esi
call fcn.0040d75d
mov ecx, dword [esi + 0x6af90]
add esp, 0xc
sub ecx, ebx
mov dword [esp + 0x18], eax
mov dword [esi + 0x6af90], ecx
cmp ebx, dword [esi + 0x6af98]
ja 0x40dba0
cmp ecx, 3
jb 0x40dba0
dec ebx
inc dword [edi]
mov edx, dword [edi]
mov eax, dword [esi + 0x6af7c]
shl eax, 5
movzx ecx, byte [edx + esi + 0x1af72]
and edx, 0x7fff
xor ecx, eax
and ecx, 0x7fff
mov dword [esi + 0x6af7c], ecx
mov eax, dword [esi + ecx*4 + 0x4af70]
mov dword [esi + edx*4 + 0x2af70], eax
mov ecx, dword [esi + 0x6af7c]
mov dword [esp + 0x10], eax
mov eax, dword [edi]
mov dword [esi + ecx*4 + 0x4af70], eax
sub ebx, 1
jne 0x40db4f
jmp 0x40dbe6
add dword [edi], ebx
mov ebx, ebp
mov edx, dword [edi]
movzx ecx, byte [edx + esi + 0x1af70]
mov dword [esi + 0x6af7c], ecx
movzx eax, byte [edx + esi + 0x1af71]
shl ecx, 5
xor eax, ecx
mov dword [esi + 0x6af7c], eax
jmp 0x40dbea
movzx eax, byte [ecx + esi + 0x1af70]
push eax
push ebp
push esi
call fcn.0040d75d
add esp, 0xc
mov dword [esp + 0x18], eax
dec dword [esi + 0x6af90]
inc dword [edi]
mov edx, dword [edi]
cmp dword [esp + 0x18], ebp
je 0x40dc1b
mov eax, dword [esi + 0x6af74]
sub edx, eax
test eax, eax
js 0x40dc05
add eax, 0x1af70
add eax, esi
jmp 0x40dc07
mov eax, ebp
push ebp
push edx
push eax
push esi
call fcn.0040d5b4
mov eax, dword [edi]
add esp, 0x10
mov dword [esi + 0x6af74], eax
cmp dword [esi + 0x6af90], 0x106
jae 0x40dc2e
push esi
call fcn.0040d928
pop ecx
mov ecx, dword [esp + 0x10]
mov eax, dword [esi + 0x6af90]
test eax, eax
jne 0x40da86
mov eax, dword [esi + 0x6af74]
mov ecx, dword [edi]
sub ecx, eax
test eax, eax
js 0x40dc56
lea ebp, [esi + 0x1af70]
add ebp, eax
push 1
push ecx
push ebp
push esi
call fcn.0040d5b4
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x40de35
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push esi
mov esi, dword [esp + 0x10]
lea eax, [ebx - 1]
push edi
cmp eax, 7
jbe 0x40de53
mov dword [esi + 0x6afa4], str.bad_pack_level
xor ebp, ebp
xor edi, edi
inc ebp
mov dword [esi + 0x6af78], edi
cmp dword [esi + 0x6af70], edi
jne 0x40de76
mov dword [esi + 0x6af78], ebp
mov dword [esi + 0x6af70], 0x10000
push 0x1fffc
lea eax, [esi + 0x4af70]
mov dword [esi + 0x6af6c], edi
push edi
push eax
call fcn.0045f740
movzx eax, word [ebx*8 + 0x4bcefa]
add esp, 0xc
mov dword [esi + 0x6af98], eax
movzx eax, word [ebx*8 + 0x4bcef8]
mov dword [esi + 0x6af9c], eax
movzx eax, word [ebx*8 + 0x4bcefc]
push 2
mov dword [esi + 0x6afa0], eax
movzx eax, word [ebx*8 + 0x4bcefe]
pop ecx
mov dword [esi + 0x6af94], eax
cmp ebx, ecx
jg 0x40deda
mov eax, dword [esp + 0x1c]
or word [eax], 4
jmp 0x40dee6
cmp ebx, 8
jl 0x40dee6
mov eax, dword [esp + 0x1c]
or word [eax], cx
push 0x10000
lea ebx, [esi + 0x1af70]
mov dword [esi + 0x6af84], edi
push ebx
push esi
mov dword [esi + 0x6af74], edi
call dword [esi + 0xc]
add esp, 0xc
mov dword [esi + 0x6af90], eax
test eax, eax
je 0x40df4d
cmp eax, 0xffffffff
je 0x40df4d
mov dword [esi + 0x6af8c], edi
cmp eax, 0x106
jae 0x40df28
push esi
call fcn.0040d928
pop ecx
mov dword [esi + 0x6af7c], edi
mov ecx, edi
movzx eax, byte [ebx + edi]
shl ecx, 5
xor ecx, eax
and ecx, 0x7fff
inc edi
mov dword [esi + 0x6af7c], ecx
cmp edi, 2
jb 0x40df30
jmp 0x40df59
mov dword [esi + 0x6af8c], ebp
mov dword [esi + 0x6af90], edi
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x40eaf8
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov edx, dword [esp + 8]
test edx, edx
jne 0x40eb03
xor eax, eax
ret
mov ecx, dword [esp + 4]
push esi
mov esi, dword [esp + 0x10]
not ecx
cmp esi, 8
jb 0x40ebc4
push edi
mov edi, esi
shr edi, 3
movzx eax, byte [edx]
sub esi, 8
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4bcf60]
movzx eax, byte [edx + 1]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4bcf60]
movzx eax, byte [edx + 2]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4bcf60]
movzx eax, byte [edx + 3]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4bcf60]
movzx eax, byte [edx + 4]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4bcf60]
movzx eax, byte [edx + 5]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4bcf60]
movzx eax, byte [edx + 6]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4bcf60]
movzx eax, byte [edx + 7]
add edx, 8
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4bcf60]
sub edi, 1
jne 0x40eb1d
pop edi
test esi, esi
je 0x40ebe0
movzx eax, byte [edx]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4bcf60]
inc edx
sub esi, 1
jne 0x40ebc8
not ecx
mov eax, ecx
pop esi
ret

Function at 0x40ebe6
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov edx, dword [esp + 4]
movsx eax, byte [esp + 8]
mov ecx, dword [edx]
xor eax, ecx
movzx eax, al
shr ecx, 8
xor ecx, dword [eax*4 + 0x4bcf60]
movzx eax, cl
add eax, dword [edx + 4]
imul eax, eax, 0x8088405
mov dword [edx], ecx
mov ecx, dword [edx + 8]
inc eax
mov dword [edx + 4], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4bcf60]
mov dword [edx + 8], ecx
ret