joyce8/EMBER2024-capa huggingface dataset:
Function at 0x594f70
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
je 0x5950f5
cmp dword [esi + 0x20], 0
je 0x5950f5
cmp dword [esi + 0x24], 0
je 0x5950f5
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x5950f5
cmp dword [eax], esi
jne 0x5950f5
mov eax, dword [eax + 4]
cmp eax, 0x2a
je 0x594fd5
cmp eax, 0x39
je 0x594fd5
cmp eax, 0x45
je 0x594fd5
cmp eax, 0x49
je 0x594fd5
cmp eax, 0x5b
je 0x594fd5
cmp eax, 0x67
je 0x594fd5
cmp eax, 0x71
je 0x594fd5
cmp eax, 0x29a
jne 0x5950f5
push edi
mov edi, dword [esi + 0x1c]
mov dword [esi + 0x14], 0
mov dword [esi + 8], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x2c], 2
mov ecx, dword [edi + 0x18]
mov eax, dword [edi + 8]
mov dword [edi + 0x14], 0
mov dword [edi + 0x10], eax
test ecx, ecx
jns 0x59500e
neg ecx
mov dword [edi + 0x18], ecx
cmp ecx, 2
mov eax, 0x2a
push 0
mov edx, 0x39
cmove eax, edx
push 0
mov dword [edi + 4], eax
push 0
jne 0x595030
call fcn.00592680
jmp 0x595035
call fcn.00592400
add esp, 0xc
mov dword [esi + 0x30], eax
mov dword [edi + 0x28], 0xfffffffe
push edi
call fcn.00596050
mov esi, dword [esi + 0x1c]
xor edx, edx
mov eax, dword [esi + 0x2c]
mov ecx, dword [esi + 0x4c]
add eax, eax
mov dword [esi + 0x3c], eax
mov eax, dword [esi + 0x44]
mov word [eax + ecx*2 - 2], dx
mov eax, dword [esi + 0x4c]
lea eax, [eax*2 - 2]
push eax
push edx
push dword [esi + 0x44]
call fcn.00541c50
mov eax, dword [esi + 0x84]
add esp, 0x10
lea ecx, [eax + eax*2]
movzx eax, word [ecx*4 + 0x6565e2]
mov dword [esi + 0x80], eax
movzx eax, word [ecx*4 + 0x6565e0]
mov dword [esi + 0x8c], eax
movzx eax, word [ecx*4 + 0x6565e4]
mov dword [esi + 0x90], eax
xor eax, eax
movzx ecx, word [ecx*4 + 0x6565e6]
pop edi
mov dword [esi + 0x7c], ecx
mov dword [esi + 0x6c], 0
mov dword [esi + 0x5c], 0
mov dword [esi + 0x74], 0
mov dword [esi + 0x16b4], 0
mov dword [esi + 0x78], 2
mov dword [esi + 0x60], 2
mov dword [esi + 0x68], 0
mov dword [esi + 0x48], 0
pop esi
ret
mov eax, 0xfffffffe
pop esi
ret
Function at 0x598e40
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
sub esp, 0x1c
push ebx
mov ebx, dword [esp + 0x24]
push ebp
mov eax, dword [ebx + 0x440]
mov ebp, dword [eax]
cmp byte [ebp + 0x1e40], 0
je 0x598e62
pop ebp
xor eax, eax
pop ebx
add esp, 0x1c
ret
mov eax, dword [ebp + 0x44]
test byte [eax + 0x66], 8
jne 0x598e99
mov ecx, dword [ebp + 0x4c]
mov eax, dword [ebp + 0x48]
test ecx, ecx
jg 0x598e99
jl 0x598e7c
cmp eax, 0xc
jae 0x598e99
push ecx
push eax
push str.Truncated_Zip_encrypted_body:_only__jd_bytes_available
push 0x2a
push ebx
call fcn.005a36b0
add esp, 0x14
mov eax, 0xffffffe2
pop ebp
pop ebx
add esp, 0x1c
ret
push 0
push 0xc
push ebx
call fcn.0059f200
add esp, 0xc
mov dword [esp + 0x14], eax
test eax, eax
jne 0x598ec9
push str.Truncated_ZIP_file_data
push 0x2a
push ebx
call fcn.005a36b0
add esp, 0xc
mov eax, 0xffffffe2
pop ebp
pop ebx
add esp, 0x1c
ret
push esi
push edi
xor esi, esi
push ebx
mov dword [esp + 0x1c], esi
call fcn.005a96a0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x598fb1
lea edi, [ebp + 0x1e34]
nop word [eax + eax]
mov esi, ebx
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x598ef5
mov dword [edi], 0x12345678
mov dword [edi + 4], 0x23456789
mov dword [edi + 8], 0x34567890
sub esi, ecx
je 0x598f68
mov al, byte [ebx]
mov byte [esp + 0x10], al
lea eax, [esp + 0x10]
push 1
push eax
mov eax, dword [edi]
not eax
push eax
call fcn.00592680
not eax
mov dword [edi], eax
movzx eax, al
add eax, dword [edi + 4]
imul eax, eax, 0x8088405
push 1
inc eax
mov dword [edi + 4], eax
shr eax, 0x18
mov byte [esp + 0x27], al
lea eax, [esp + 0x27]
push eax
mov eax, dword [edi + 8]
not eax
push eax
call fcn.00592680
add esp, 0x18
lea ebx, [ebx + 1]
not eax
mov dword [edi + 8], eax
sub esi, 1
jne 0x598f14
push 0xc
lea eax, [esp + 0x24]
push eax
push 0xc
push dword [esp + 0x28]
push edi
call fcn.0059a3a0
mov ecx, dword [ebp + 0x44]
add esp, 0x14
mov al, byte [esp + 0x2b]
cmp al, byte [ecx + 0x6b]
je 0x598fe3
mov esi, dword [esp + 0x18]
cmp esi, 0x2710
jg 0x598fdc
push dword [esp + 0x30]
inc esi
mov dword [esp + 0x1c], esi
call fcn.005a96a0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x598ef0
test esi, esi
mov eax, str.Incorrect_passphrase
mov ecx, str.Passphrase_required_for_this_entry
cmovle eax, ecx
push eax
push 0xffffffffffffffff
push dword [esp + 0x38]
call fcn.005a36b0
add esp, 0xc
mov eax, 0xffffffe7
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
push str.Too_many_incorrect_passphrases
jmp 0x598fc1
mov ebx, dword [esp + 0x30]
push 0
push 0xc
push ebx
call fcn.0059f220
mov eax, dword [ebp + 0x44]
add esp, 0xc
mov byte [ebp + 0x1e40], 1
test byte [eax + 0x66], 8
jne 0x59900c
add dword [ebp + 0x48], 0xfffffff4
adc dword [ebp + 0x4c], 0xffffffff
add dword [ebp + 0x50], 0xc
push ebx
adc dword [ebp + 0x54], 0
mov dword [ebp + 0x1e2c], 0
call fcn.0059a430
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
Function at 0x59a3a0
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg

Disassembly:
push esi
mov esi, dword [esp + 0x18]
cmp dword [esp + 0x10], esi
cmovb esi, dword [esp + 0x10]
test esi, esi
je 0x59a42e
push ebx
mov ebx, dword [esp + 0x18]
push ebp
mov ebp, dword [esp + 0x14]
push edi
mov edi, dword [esp + 0x14]
sub ebp, ebx
mov eax, dword [edi + 8]
or eax, 2
mov ecx, eax
xor ecx, 1
imul ecx, eax
lea eax, [esp + 0x24]
push 1
push eax
shr ecx, 8
xor cl, byte [ebx + ebp]
mov byte [ebx], cl
mov eax, dword [edi]
not eax
mov byte [esp + 0x2c], cl
push eax
call fcn.00592680
not eax
mov dword [edi], eax
movzx eax, al
add eax, dword [edi + 4]
imul eax, eax, 0x8088405
push 1
inc eax
mov dword [edi + 4], eax
shr eax, 0x18
mov byte [esp + 0x2c], al
lea eax, [esp + 0x2c]
push eax
mov eax, dword [edi + 8]
not eax
push eax
call fcn.00592680
add esp, 0x18
lea ebx, [ebx + 1]
not eax
mov dword [edi + 8], eax
sub esi, 1
jne 0x59a3c3
pop edi
pop ebp
pop ebx
pop esi
ret
Function at 0x59e8b0
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0x1c]
cmp dword [esp + 0x14], esi
cmovb esi, dword [esp + 0x14]
test esi, esi
je 0x59e954
push ebx
mov ebx, dword [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x18]
push edi
mov edi, dword [esp + 0x18]
sub ebp, ebx
mov dword [esp + 0x10], esi
nop dword [eax]
mov eax, dword [edi + 8]
mov dl, byte [ebx + ebp]
or eax, 2
mov ecx, eax
mov byte [esp + 0x28], dl
xor ecx, 1
imul ecx, eax
lea eax, [esp + 0x28]
push 1
push eax
shr ecx, 8
xor cl, dl
mov byte [ebx], cl
mov eax, dword [edi]
not eax
push eax
call fcn.00592680
not eax
mov dword [edi], eax
movzx eax, al
add eax, dword [edi + 4]
imul eax, eax, 0x8088405
push 1
inc eax
mov dword [edi + 4], eax
shr eax, 0x18
mov byte [esp + 0x30], al
lea eax, [esp + 0x30]
push eax
mov eax, dword [edi + 8]
not eax
push eax
call fcn.00592680
add esp, 0x18
lea ebx, [ebx + 1]
not eax
mov dword [edi + 8], eax
sub esi, 1
jne 0x59e8e0
mov eax, dword [esp + 0x10]
pop edi
pop ebp
pop ebx
pop esi
pop ecx
ret
xor eax, eax
pop esi
pop ecx
ret
Function at 0x5ab820
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
push ebp
mov ebp, dword [esp + 0x10]
push esi
xor esi, esi
push edi
mov edi, dword [esp + 0x14]
test ebp, 0xffff7fff
jne 0x5ab8fb
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x5ab89a
call ebx
cmp eax, 3
jne 0x5ab881
push edi
call fcn.005abc20
mov esi, eax
add esp, 4
test esi, esi
jne 0x5ab875
call fcn.005360ed
pop edi
pop esi
pop ebp
mov dword [eax], 0x16
or eax, 0xffffffff
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x5ab89a
call ebx
push eax
call fcn.005ab760
push esi
call fcn.0061ae8f
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
ret
test al, 0x10
je 0x5ab8f3
push 0
push 0x2000001
push 3
push 0
push 0
push 0
test esi, esi
je 0x5ab8ba
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x5ab8c1
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push esi
mov edi, eax
call fcn.0061ae8f
add esp, 4
cmp edi, 0xffffffff
jne 0x5ab8e3
call ebx
push eax
call fcn.005ab760
add esp, 4
or eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
push 0
push edi
call fcn.005384e9
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
ret
test esi, esi
jne 0x5ab98f
push dword [esp + 0x1c]
push ebp
push edi
call fcn.0062862c
mov esi, eax
add esp, 0xc
test esi, esi
jns 0x5aba16
call fcn.005360ed
cmp dword [eax], 0xd
jne 0x5ab96e
test ebp, 0x100
je 0x5ab96e
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x5ab944
call ebx
push eax
call fcn.005ab760
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
ret
test al, 0x10
je 0x5ab95b
call fcn.005360ed
pop edi
pop esi
pop ebp
mov dword [eax], 0x15
or eax, 0xffffffff
pop ebx
ret
call fcn.005360ed
pop edi
pop esi
pop ebp
mov dword [eax], 0xd
or eax, 0xffffffff
pop ebx
ret
call fcn.005360ed
cmp dword [eax], 2
jne 0x5aba16
push edi
call fcn.005abc20
mov esi, eax
add esp, 4
test esi, esi
je 0x5ab862
push dword [esp + 0x1c]
push ebp
push esi
call fcn.006286d2
mov edi, eax
add esp, 0xc
test edi, edi
jns 0x5aba06
call fcn.005360ed
cmp dword [eax], 0xd
jne 0x5aba06
test ebp, 0x100
je 0x5aba06
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x5ab9dc
call ebx
push eax
call fcn.005ab760
add esp, 4
push esi
call fcn.0061ae8f
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
test al, 0x10
je 0x5ab9fb
call fcn.005360ed
push esi
mov dword [eax], 0x15
call fcn.0061ae8f
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
call fcn.005360ed
mov dword [eax], 0xd
push esi
call fcn.0061ae8f
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
ret
Function at 0x5aba20
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jns 0x5aba37
call fcn.005360ed
mov dword [eax], 9
or eax, 0xffffffff
ret
cmp dword [esp + 0xc], 0
je 0x5abaa8
push eax
call fcn.0053847f
add esp, 4
lea ecx, [esp + 4]
push 0
push ecx
push dword [esp + 0x14]
push dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x5abaa3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe8
jne 0x5aba7d
call fcn.005360ed
mov dword [eax], 0xb
or eax, 0xffffffff
ret
cmp eax, 0x6d
je 0x5abaa8
cmp eax, 5
jne 0x5aba96
call fcn.005360ed
mov dword [eax], 9
or eax, 0xffffffff
ret
push eax
call fcn.005ab760
add esp, 4
or eax, 0xffffffff
ret
mov eax, dword [esp + 4]
ret
xor eax, eax
ret

Function at 0x5abe30
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jns 0x5abe47
call fcn.005360ed
mov dword [eax], 9
or eax, 0xffffffff
ret
push 0
lea ecx, [esp + 8]
push ecx
push dword [esp + 0x14]
push dword [esp + 0x14]
push eax
call fcn.0053847f
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x5abe91
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x5abe84
call fcn.005360ed
mov dword [eax], 9
or eax, 0xffffffff
ret
push eax
call fcn.005ab760
add esp, 4
or eax, 0xffffffff
ret
mov eax, dword [esp + 4]
ret

Function at 0x5ac0a0
Capabilities:
Create new key via cryptacquirecontext
Generate random numbers via winapi

Disassembly:
push ecx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
lea eax, [esp + 4]
push 0xf0000000
push 1
push 0
push 0
push eax
call esi
test eax, eax
jne 0x5ac0e6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x5ac0de
push 8
push 1
push 0
push 0
lea eax, [esp + 0x14]
push eax
call esi
test eax, eax
jne 0x5ac0e6
mov eax, 0xffffffe7
pop esi
pop ecx
ret
push dword [esp + 0xc]
push dword [esp + 0x14]
push dword [esp + 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
push 0
push dword [esp + 8]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor ecx, ecx
mov eax, 0xffffffe7
test esi, esi
pop esi
cmovne eax, ecx
pop ecx
ret
Function at 0x5bc720
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x18
mov eax, dword [esp + 0x1c]
push ebx
push ebp
push esi
mov ebx, dword [eax + 0xa4]
push edi
mov dword [esp + 0x24], ebx
mov eax, dword [ebx + 0xc]
mov dword [esp + 0x20], eax
push dword [eax + 0x10]
call fcn.005a2ec0
mov ecx, edx
mov dword [esp + 0x1c], eax
add esp, 4
mov dword [esp + 0x14], ecx
test ecx, ecx
jg 0x5bc764
jl 0x5bc75c
cmp eax, 0x40
jae 0x5bc764
mov ebp, eax
mov dword [esp + 0x10], eax
jmp 0x5bc76d
mov ebp, 0x40
mov dword [esp + 0x10], ebp
mov eax, dword [ebx + 0x154]
mov ecx, dword [esp + 0x34]
test eax, eax
jne 0x5bc785
cmp ecx, ebp
jb 0x5bc785
mov edi, dword [esp + 0x30]
jmp 0x5bc7c2
cmp eax, ebp
jge 0x5bc7bc
mov esi, 0x40
sub esi, eax
cmp esi, ecx
cmova esi, ecx
add eax, 0x114
push esi
push dword [esp + 0x34]
add eax, ebx
push eax
call fcn.00541db0
add dword [ebx + 0x154], esi
add esp, 0xc
cmp dword [ebx + 0x154], ebp
jl 0x5bc918
lea edi, [ebx + 0x114]
and dword [ebx + 0x110], 0xfffffffe
mov eax, dword [edi]
cmp eax, dword [0x660d20]
jne 0x5bc918
mov eax, dword [edi + 4]
cmp eax, dword [0x660d24]
jne 0x5bc918
movzx ebx, byte [edi + 0xb]
movzx eax, byte [edi + 0xa]
shl ebx, 8
or ebx, eax
movzx eax, byte [edi + 9]
shl ebx, 8
or ebx, eax
movzx eax, byte [edi + 8]
shl ebx, 8
or ebx, eax
cmp ebx, 0x18
jb 0x5bc918
cmp byte [edi + 0xc], 4
jne 0x5bc918
mov cl, byte [edi + 0xd]
mov byte [esp + 0x2c], cl
lea eax, [ecx - 7]
cmp al, 0x17
ja 0x5bc918
xor eax, eax
movzx esi, cl
xor edx, edx
mov ecx, esi
bts eax, ecx
cmp ecx, 0x20
cmovae edx, eax
xor eax, edx
cmp ecx, 0x40
cmovae edx, eax
add eax, ebx
adc edx, 0
sub eax, 1
sbb edx, 0
call fcn.0061ad40
cmp dword [esp + 0x14], 0
mov dword [esp + 0x1c], eax
lea ebp, [eax*4 + 0x14]
jl 0x5bc918
jg 0x5bc876
cmp dword [esp + 0x18], ebp
jb 0x5bc918
mov ecx, dword [esp + 0x10]
lea esi, [edi + 0x10]
add ecx, edi
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x10], ecx
test edi, edi
je 0x5bc8fb
nop dword [eax + eax]
lea eax, [esi + 8]
cmp eax, ecx
ja 0x5bc8fb
movzx edx, byte [esi + 3]
movzx eax, byte [esi + 2]
shl edx, 8
or edx, eax
movzx eax, byte [esi + 1]
shl edx, 8
or edx, eax
movzx eax, byte [esi]
shl edx, 8
or edx, eax
cmp edx, ebp
jne 0x5bc918
movzx eax, byte [esi + 7]
add esi, 4
shl eax, 8
movzx ecx, byte [esi + 2]
or eax, ecx
movzx ecx, byte [esi + 1]
shl eax, 8
or eax, ecx
movzx ecx, byte [esi]
shl eax, 8
or eax, ecx
cmp eax, edx
jb 0x5bc918
xor ecx, ecx
cmp ecx, dword [esp + 0x14]
jg 0x5bc918
jl 0x5bc8ee
cmp eax, dword [esp + 0x18]
ja 0x5bc918
mov ecx, dword [esp + 0x10]
sub eax, edx
add ebp, eax
sub edi, 1
jne 0x5bc890
mov eax, dword [esp + 0x20]
mov cl, byte [esp + 0x2c]
mov dword [eax + 0x78], ebx
mov byte [eax + 0x74], 4
mov byte [eax + 0x75], cl
mov eax, dword [esp + 0x24]
and dword [eax + 0x110], 0xfffffffd
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
Function at 0x5c6dc0
Capabilities:
Create new key via cryptacquirecontext
Initialize hashing via wincrypt

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
push 0xf0000000
push dword [esp + 0x14]
lea edi, [esi + 4]
mov dword [esi], 0
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x5c6e09
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x5c6e2a
push 8
push dword [esp + 0x14]
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x5c6e2a
lea eax, [esi + 8]
push eax
push 0
push 0
push dword [esp + 0x20]
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x5c6e32
push eax
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
pop edi
mov eax, 0xffffffe7
pop esi
ret
pop edi
mov dword [esi], 1
xor eax, eax
pop esi
ret
Function at 0x5cb9e0
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, dword [esp + 0x10]
push esi
mov esi, dword [esp + 0xc]
push edi
mov edx, dword [esi + 0xaa0]
mov eax, dword [esi + 0x1f0]
and edx, dword [esp + 0x20]
shl eax, 4
cmp ebx, 0xffffffff
jne 0x5cbb4c
mov ebx, dword [esp + 0x14]
add edx, 0x3556
add eax, edx
push ebp
lea ecx, [esi + eax*2]
mov eax, dword [esi + 0x18]
mov dword [esi + eax*4 + 0x20], 0
mov eax, dword [esi + 0x18]
mov dword [esi + eax*4 + 0x108], ecx
mov ebp, dword [esi + 0x18]
inc ebp
mov dword [esi + 0x18], ebp
mov edi, dword [ebx]
mov eax, edi
mov edx, dword [ebx + 0x18]
sub eax, edx
mov ecx, dword [ebx + 0x14]
mov dword [esp + 0x14], edx
movzx edx, byte [eax + ecx - 1]
mov ecx, 8
sub cl, byte [esi + 0xaa4]
mov eax, dword [esi + 0xaa8]
and eax, dword [esp + 0x24]
shr edx, cl
mov ecx, dword [esi + 0xaa4]
shl eax, cl
add edx, eax
mov eax, edi
sub eax, dword [ebx + 0x18]
imul ecx, edx, 0x600
mov edx, dword [ebx + 0x14]
movzx edx, byte [eax + edx]
add ecx, 0xaac
add ecx, esi
cmp dword [esi + 0x1f0], 7
mov dword [esp + 0x24], ecx
jge 0x5cba9f
push edx
push 8
push ecx
push esi
call fcn.005cca40
add esp, 0x10
jmp 0x5cbb00
sub edi, dword [esi + 0x1f4]
sub edi, dword [esp + 0x14]
mov eax, dword [ebx + 0x14]
mov ebx, 0x100
add edx, ebx
movzx edi, byte [edi + eax - 1]
mov eax, edx
add edi, edi
shr eax, 7
mov ecx, ebx
and eax, 1
and ecx, edi
mov dword [esi + ebp*4 + 0x20], eax
add ecx, ebx
mov eax, edx
add edx, edx
shr eax, 8
add eax, ecx
mov ecx, dword [esp + 0x24]
lea ecx, [ecx + eax*2]
mov eax, dword [esi + 0x18]
mov dword [esi + eax*4 + 0x108], ecx
mov eax, edi
inc dword [esi + 0x18]
xor eax, edx
mov ebp, dword [esi + 0x18]
not eax
and ebx, eax
cmp edx, 0x10000
jb 0x5cbab8
mov ebx, dword [esp + 0x18]
mov eax, dword [esi + 0x1f0]
pop ebp
cmp eax, 3
jg 0x5cbb1f
xor eax, eax
mov dword [esi + 0x1f0], eax
mov eax, dword [esp + 0x1c]
sub dword [ebx + 0x18], eax
pop edi
pop esi
pop ebx
ret
cmp eax, 9
jg 0x5cbb38
add eax, 0xfffffffd
mov dword [esi + 0x1f0], eax
mov eax, dword [esp + 0x1c]
sub dword [ebx + 0x18], eax
pop edi
pop esi
pop ebx
ret
add eax, 0xfffffffa
mov dword [esi + 0x1f0], eax
mov eax, dword [esp + 0x1c]
sub dword [ebx + 0x18], eax
pop edi
pop esi
pop ebx
ret
add eax, 0x3556
mov edi, dword [esp + 0x1c]
add eax, edx
push edi
lea ecx, [esi + eax*2]
mov eax, dword [esi + 0x18]
mov dword [esi + eax*4 + 0x20], 1
mov eax, dword [esi + 0x18]
mov dword [esi + eax*4 + 0x108], ecx
mov eax, dword [esi + 0x18]
inc eax
mov dword [esi + 0x18], eax
mov ecx, dword [esi + 0x1f0]
add ecx, 0x3616
lea eax, [esi + eax*4]
lea ecx, [esi + ecx*2]
cmp ebx, 4
jae 0x5cbbb8
mov dword [eax + 0x20], 1
mov eax, dword [esi + 0x18]
push ebx
push edx
push esi
mov dword [esi + eax*4 + 0x108], ecx
inc dword [esi + 0x18]
call fcn.005ccd20
mov eax, dword [esp + 0x24]
add esp, 0x10
sub dword [eax + 0x18], edi
pop edi
pop esi
pop ebx
ret
mov dword [eax + 0x20], 0
mov eax, dword [esi + 0x18]
mov dword [esi + eax*4 + 0x108], ecx
lea eax, [ebx - 4]
inc dword [esi + 0x18]
push eax
push edx
push esi
call fcn.005cc910
mov eax, dword [esp + 0x24]
add esp, 0x10
sub dword [eax + 0x18], edi
pop edi
pop esi
pop ebx
ret
Function at 0x5cbcd0
Capabilities:
Encode data using xor

Disassembly:
mov edx, dword [esp + 8]
sub esp, 0x1c
push ebx
mov ebx, dword [esp + 0x24]
push edi
mov dword [ebx], 0x4000400
test edx, edx
je 0x5cbd11
lea eax, [ebx + 0x104]
mov ecx, edx
nop
movaps xmm0, xmmword [0x663050]
lea eax, [eax + 0x10]
movups xmmword [eax - 0x110], xmm0
movaps xmm0, xmmword [0x663050]
movups xmmword [eax - 0x10], xmm0
sub ecx, 1
jne 0x5cbcf0
cmp byte [esp + 0x30], 0
lea edi, [ebx + 0x204]
mov ecx, 0x80
mov eax, 0x4000400
rep stosd dword es:[edi], eax
jne 0x5cbf15
mov dword [esp + 8], 0
test edx, edx
je 0x5cbf15
push ebp
lea ebp, [ebx + 0x404]
lea ecx, [ebx + 0x4808]
mov dword [esp + 0x10], ebp
push esi
mov dword [esp + 0x1c], ecx
mov edi, dword [ebx + 0x4804]
xor esi, esi
mov dword [ecx], edi
movzx ecx, word [ebx]
mov eax, ecx
mov dword [esp + 0x30], edi
shr eax, 4
xor ecx, 0x7f0
shr ecx, 4
mov dword [esp + 0x38], esi
movzx eax, byte [eax + 0x6632d8]
movzx edx, byte [ecx + 0x6632d8]
movzx ecx, word [ebx + 2]
mov dword [esp + 0x20], eax
mov eax, ecx
shr eax, 4
xor ecx, 0x7f0
shr ecx, 4
movzx eax, byte [eax + 0x6632d8]
add eax, edx
mov dword [esp + 0x24], eax
movzx eax, byte [ecx + 0x6632d8]
add eax, edx
mov dword [esp + 0x28], eax
test edi, edi
je 0x5cbeeb
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x30]
shl edi, 3
mov dword [esp + 0x18], edi
nop dword [eax]
cmp esi, 8
jae 0x5cbe35
lea edx, [esi + 8]
xor ebp, ebp
mov esi, dword [esp + 0x10]
nop
mov ecx, edx
lea edi, [esi*8]
shr edx, 1
and ecx, 1
neg ecx
shr ecx, 4
and ecx, 0x7f
lea eax, [edi + edx]
movzx eax, word [ebx + eax*2 + 4]
shr eax, 4
xor eax, ecx
movzx eax, byte [eax + 0x6632d8]
add ebp, eax
cmp edx, 1
jne 0x5cbde0
mov eax, dword [esp + 0x20]
mov esi, dword [esp + 0x38]
add eax, ebp
mov ebp, dword [esp + 0x14]
mov dword [ebp + esi*4], eax
inc esi
mov eax, dword [esp + 0x30]
mov dword [esp + 0x38], esi
cmp esi, eax
jb 0x5cbdd0
jmp 0x5cbeeb
cmp esi, eax
jae 0x5cbeeb
nop dword [eax]
cmp esi, 0x10
jae 0x5cbea2
mov edx, esi
xor ebp, ebp
mov esi, dword [esp + 0x18]
nop dword [eax]
mov ecx, edx
shr edx, 1
and ecx, 1
neg ecx
shr ecx, 4
lea eax, [edi + edx]
and ecx, 0x7f
movzx eax, word [ebx + eax*2 + 0x104]
mov edi, esi
shr eax, 4
xor eax, ecx
movzx eax, byte [eax + 0x6632d8]
add ebp, eax
cmp edx, 1
jne 0x5cbe50
mov eax, dword [esp + 0x24]
mov esi, dword [esp + 0x38]
add eax, ebp
mov ebp, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
mov dword [ebp + esi*4], eax
inc esi
mov dword [esp + 0x38], esi
cmp esi, dword [esp + 0x30]
jb 0x5cbe40
jmp 0x5cbeeb
xor edi, edi
lea eax, [esi + 0xf0]
nop word [eax + eax]
mov edx, eax
shr eax, 1
and edx, 1
neg edx
shr edx, 4
movzx ecx, word [ebx + eax*2 + 0x204]
and edx, 0x7f
shr ecx, 4
xor ecx, edx
movzx ecx, byte [ecx + 0x6632d8]
add edi, ecx
cmp eax, 1
jne 0x5cbeb0
mov eax, dword [esp + 0x28]
add eax, edi
mov dword [ebp + esi*4], eax
inc esi
cmp esi, dword [esp + 0x30]
jb 0x5cbea2
mov eax, dword [esp + 0x10]
add ebp, 0x440
mov ecx, dword [esp + 0x1c]
inc eax
add ecx, 4
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], ebp
cmp eax, dword [esp + 0x34]
jb 0x5cbd54
pop esi
pop ebp
pop edi
pop ebx
add esp, 0x1c
ret