joyce8/EMBER2024-capa huggingface dataset:
Function at 0x504050
Capabilities:
Terminate process

Disassembly:
mov eax, dword [esp + 8]
push ebx
push esi
push edi
test eax, eax
je 0x5040a9
mov edi, 0x6bbad4
mov eax, dword [edi]
test eax, eax
je 0x50408f
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov esi, eax
test esi, esi
je 0x504089
push 0x219
push str.C:_backupSpideyPCSpideyPCD3dDXsound.cpp
push esi
call fcn.004fc630
add esp, 0xc
test esi, esi
jl 0x50409e
mov dword [edi], 0
add edi, 4
cmp edi, 0x6bbcd4
jl 0x504060
pop edi
pop esi
pop ebx
ret
call fcn.005001b0
push esi
call fcn.0052a101
mov edx, dword [esp + 0x10]
push edx
call fcn.004fbdc0
add esp, 4
dec eax
neg eax
sbb eax, eax
and eax, 0x40
xor ebx, ebx
lea edi, [eax*4 + 0x6bbad4]
mov eax, dword [edi]
test eax, eax
je 0x5040f6
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov esi, eax
test esi, esi
je 0x5040f0
push 0x22f
push str.C:_backupSpideyPCSpideyPCD3dDXsound.cpp
push esi
call fcn.004fc630
add esp, 0xc
test esi, esi
jl 0x504103
mov dword [edi], 0
add edi, 4
inc ebx
cmp ebx, 0x40
jl 0x5040c7
pop edi
pop esi
pop ebx
ret
call fcn.005001b0
push esi
call fcn.0052a101
nop
nop

Function at 0x504110
Capabilities:
Terminate process

Disassembly:
mov ecx, dword [0x6b7920]
push ebx
push esi
push edi
test ecx, ecx
je 0x5041bc
mov eax, dword [esp + 0x18]
test eax, eax
je 0x50412e
add dword [esp + 0x14], 0x40
mov eax, dword [esp + 0x14]
mov edx, dword [eax*4 + 0x6bbad4]
test edx, edx
je 0x5041bc
mov eax, dword [esp + 0x10]
lea esi, [eax + eax*2]
mov eax, dword [ecx]
shl esi, 2
lea ebx, [esi + 0x6bbd50]
push ebx
push edx
push ecx
call dword [eax + 0x14]
mov edi, eax
test edi, edi
je 0x50417d
push 0x251
push str.C:_backupSpideyPCSpideyPCD3dDXsound.cpp
push edi
call fcn.004fc630
add esp, 0xc
test edi, edi
jge 0x50417d
call fcn.005001b0
push edi
call fcn.0052a101
mov ebx, dword [ebx]
lea edx, [esp + 0x14]
push edx
push ebx
mov ecx, dword [ebx]
call dword [ecx + 0x20]
mov edi, eax
test edi, edi
je 0x5041b2
push 0x255
push str.C:_backupSpideyPCSpideyPCD3dDXsound.cpp
push edi
call fcn.004fc630
add esp, 0xc
test edi, edi
jge 0x5041b2
call fcn.005001b0
push edi
call fcn.0052a101
mov eax, dword [esp + 0x14]
mov dword [esi + 0x6bbd54], eax
pop edi
pop esi
pop ebx
ret

Function at 0x5041c0
Capabilities:
Terminate process

Disassembly:
mov eax, dword [esp + 4]
push ebx
push esi
xor ebx, ebx
lea esi, [eax + eax*2]
push edi
shl esi, 2
mov eax, dword [esi + 0x6bbd50]
cmp eax, ebx
je 0x50421f
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov edi, eax
cmp edi, ebx
je 0x504207
push 0x269
push str.C:_backupSpideyPCSpideyPCD3dDXsound.cpp
push edi
call fcn.004fc630
add esp, 0xc
cmp edi, ebx
jge 0x504207
call fcn.005001b0
push edi
call fcn.0052a101
mov dword [esi + 0x6bbd50], ebx
mov dword [esi + 0x6bbd54], ebx
mov byte [esi + 0x6bbd58], bl
mov byte [esi + 0x6bbd59], bl
pop edi
pop esi
pop ebx
ret
Function at 0x504230
Capabilities:
Terminate process

Disassembly:
mov eax, dword [esp + 4]
push esi
lea eax, [eax + eax*2]
shl eax, 2
mov ecx, dword [eax + 0x6bbd50]
test ecx, ecx
je 0x50429d
mov ecx, dword [esp + 0xc]
push ebx
test ecx, ecx
setne dl
xor ebx, ebx
mov byte [eax + 0x6bbd58], 0
test ecx, ecx
mov byte [eax + 0x6bbd59], dl
mov eax, dword [eax + 0x6bbd50]
setne bl
mov edx, dword [eax]
push ebx
push 0
push 0
push eax
call dword [edx + 0x30]
mov esi, eax
pop ebx
test esi, esi
je 0x50429d
push 0x283
push str.C:_backupSpideyPCSpideyPCD3dDXsound.cpp
push esi
call fcn.004fc630
add esp, 0xc
test esi, esi
jge 0x50429d
call fcn.005001b0
push esi
call fcn.0052a101
pop esi
ret

Function at 0x5042a0
Capabilities:
Terminate process

Disassembly:
mov eax, dword [esp + 4]
push esi
lea eax, [eax + eax*2]
mov eax, dword [eax*4 + 0x6bbd50]
test eax, eax
je 0x5042e1
mov ecx, dword [eax]
push eax
call dword [ecx + 0x48]
mov esi, eax
test esi, esi
je 0x5042e1
push 0x295
push str.C:_backupSpideyPCSpideyPCD3dDXsound.cpp
push esi
call fcn.004fc630
add esp, 0xc
test esi, esi
jge 0x5042e1
call fcn.005001b0
push esi
call fcn.0052a101
pop esi
ret

Function at 0x5042f0
Capabilities:
Terminate process

Disassembly:
mov eax, dword [esp + 4]
push esi
lea eax, [eax + eax*2]
mov ecx, dword [eax*4 + 0x6bbd50]
test ecx, ecx
je 0x504343
mov eax, dword [esp + 0xc]
mov edx, dword [ecx]
add eax, 0xffffff01
lea esi, [eax + eax*4]
shl esi, 3
sub esi, eax
push esi
push ecx
call dword [edx + 0x3c]
mov esi, eax
test esi, esi
je 0x504343
push 0x2aa
push str.C:_backupSpideyPCSpideyPCD3dDXsound.cpp
push esi
call fcn.004fc630
add esp, 0xc
test esi, esi
jge 0x504343
call fcn.005001b0
push esi
call fcn.0052a101
pop esi
ret

Function at 0x504350
Capabilities:
Terminate process

Disassembly:
mov eax, dword [esp + 4]
push esi
lea eax, [eax + eax*2]
mov ecx, dword [eax*4 + 0x6bbd50]
test ecx, ecx
je 0x5043a4
mov edx, dword [esp + 0xc]
mov esi, dword [ecx]
mov eax, edx
shl eax, 7
add eax, edx
lea edx, [eax + eax*4 - 0x2710]
push edx
push ecx
call dword [esi + 0x40]
mov esi, eax
test esi, esi
je 0x5043a4
push 0x2bf
push str.C:_backupSpideyPCSpideyPCD3dDXsound.cpp
push esi
call fcn.004fc630
add esp, 0xc
test esi, esi
jge 0x5043a4
call fcn.005001b0
push esi
call fcn.0052a101
pop esi
ret

Function at 0x5043b0
Capabilities:
Terminate process

Disassembly:
push ecx
mov eax, dword [esp + 8]
push esi
lea eax, [eax + eax*2]
shl eax, 2
mov esi, dword [eax + 0x6bbd50]
test esi, esi
je 0x50441a
fild dword [eax + 0x6bbd54]
fstp dword [esp + 4]
fild dword [esp + 0x10]
fstp dword [esp + 0xc]
fld dword [esp + 0xc]
fdiv dword [0x53bd68]
fmul dword [esp + 4]
call fcn.00529c7c
mov ecx, dword [esi]
push eax
push esi
call dword [ecx + 0x44]
mov esi, eax
test esi, esi
je 0x50441a
push 0x2d5
push str.C:_backupSpideyPCSpideyPCD3dDXsound.cpp
push esi
call fcn.004fc630
add esp, 0xc
test esi, esi
jge 0x50441a
call fcn.005001b0
push esi
call fcn.0052a101
pop esi
pop ecx
ret
Function at 0x504420
Capabilities:
Terminate process

Disassembly:
push ecx
mov eax, dword [esp + 8]
push esi
mov dword [esp + 4], 0
lea eax, [eax + eax*2]
shl eax, 2
mov ecx, dword [eax + 0x6bbd50]
test ecx, ecx
jne 0x504443
xor eax, eax
pop esi
pop ecx
ret
mov dl, byte [eax + 0x6bbd58]
test dl, dl
je 0x504455
mov eax, 1
pop esi
pop ecx
ret
mov eax, dword [ecx]
lea edx, [esp + 4]
push edx
push ecx
call dword [eax + 0x24]
mov esi, eax
test esi, esi
je 0x504488
push 0x300
push str.C:_backupSpideyPCSpideyPCD3dDXsound.cpp
push esi
call fcn.004fc630
add esp, 0xc
test esi, esi
jge 0x504488
call fcn.005001b0
push esi
call fcn.0052a101
mov eax, dword [esp + 4]
pop esi
and eax, 4
pop ecx
ret

Function at 0x504660
Capabilities:
Create directory
Get common file path

Disassembly:
push esi
push edi
push 0x6bbf44
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov edi, str._save_
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov esi, edi
mov edx, ecx
mov edi, 0x6bbf44
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
push 0x6bbf44
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
call dword [esp + 0x18]
pop edi
xor eax, eax
pop esi
ret

Function at 0x504b60
Capabilities:
Get common file path

Disassembly:
sub esp, 0x200
push esi
push edi
push 0x6bc1f4
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov edi, str.data_
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, 0x6bc334
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [0x6bc43c]
and ecx, 3
test eax, eax
rep movsb byte es:[edi], byte [esi]
jne 0x504c16
push 1
push str.data.pkr
push 0x6bc43c
call fcn.00517fe9
add esp, 0xc
test al, al
jne 0x504bdb
lea ecx, [esp + 8]
push ecx
call fcn.0051a2ad
add esp, 4
test al, al
je 0x504c27
lea edx, [esp + 8]
push edx
push str.PKR_t:__s_r_n
jmp 0x504c1f
mov esi, dword [0x6bc43c]
lea eax, [esi + 4]
push eax
push str.PKR_t:_Name_______:__s_r_n
call fcn.004015b0
mov ecx, dword [esi + 0x118]
push ecx
push str.PKR_t:_N.O._Dir___:__i_r_n
call fcn.004015b0
mov edx, dword [esi + 0x11c]
push edx
push str.PKR_t:_N.O._Files_:__i_r_n
call fcn.004015b0
add esp, 0x18
jmp 0x504c27
add eax, 4
push eax
push str.PKR_t:_PKR__s_already_open_r_n
call fcn.004015b0
add esp, 8
call fcn.0050ac90
call fcn.0050af30
pop edi
xor eax, eax
pop esi
add esp, 0x200
ret
Function at 0x509c10
Capabilities:
Access peb ldr_data
Enumerate pe sections

Disassembly:
push 0xffffffffffffffff
push 0x53ac5b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push 0x1a4
call fcn.00455390
add esp, 4
mov dword [esp], eax
test eax, eax
mov dword [esp + 0xc], 0
je 0x509c4c
mov ecx, eax
call fcn.00460720
jmp 0x509c4e
xor eax, eax
mov ecx, dword [esp + 0x14]
push ebx
push esi
mov dx, word [ecx + 4]
or word [eax + 4], dx
mov dx, word [ecx + 6]
mov word [eax + 6], dx
mov edx, dword [ecx + 0x10]
mov esi, dword [ecx + 0xc]
mov ebx, dword [ecx + 8]
mov dword [eax + 8], ebx
mov dword [eax + 0xc], esi
mov dword [eax + 0x10], edx
mov dx, word [ecx + 0x18]
mov si, word [ecx + 0x16]
mov bx, word [ecx + 0x14]
mov word [eax + 0x14], bx
mov word [eax + 0x16], si
mov word [eax + 0x18], dx
mov dx, word [ecx + 0x1a]
mov word [eax + 0x1a], dx
mov dl, byte [ecx + 0x1c]
mov byte [eax + 0x1c], dl
mov dl, byte [ecx + 0x1d]
mov byte [eax + 0x1d], dl
mov dl, byte [ecx + 0x1e]
mov byte [eax + 0x1e], dl
mov dl, byte [ecx + 0x1f]
mov byte [eax + 0x1f], dl
mov edx, dword [ecx + 0x20]
mov dword [eax + 0x20], edx
mov edx, dword [ecx + 0x24]
mov dword [eax + 0x24], edx
mov dx, word [ecx + 0x2c]
mov si, word [ecx + 0x2a]
mov bx, word [ecx + 0x28]
mov word [eax + 0x28], bx
mov word [eax + 0x2a], si
mov word [eax + 0x2c], dx
mov edx, dword [ecx + 0x30]
mov dword [eax + 0x30], edx
mov edx, dword [ecx + 0x34]
mov dword [eax + 0x34], edx
mov dx, word [ecx + 0x38]
mov word [eax + 0x38], dx
mov ecx, dword [ecx + 0x3c]
mov dword [eax + 0x3c], ecx
mov ecx, dword [esp + 0xc]
mov word [eax + 0x128], 0
mov word [eax + 0x12a], 0
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret
Function at 0x50b5a0
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0xac0ba4]
sub esp, 0xe0
test eax, eax
push esi
push edi
jne 0x50b5bc
pop edi
xor al, al
pop esi
add esp, 0xe0
ret
push eax
call dword [sym.imp.binkw32.dll__BinkWait_4]
test eax, eax
jne 0x50b735
mov eax, dword [0xac0ba4]
test eax, eax
je 0x50b77d
push eax
call dword [sym.imp.binkw32.dll__BinkDoFrame_4]
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 8]
push 0
rep stosd dword es:[edi], eax
mov eax, dword [0xac0a3c]
lea edx, [esp + 0xc]
push 0x821
mov dword [esp + 0x10], 0x7c
mov ecx, dword [eax]
push edx
push 0
push eax
call dword [ecx + 0x64]
mov esi, eax
cmp esi, 0x887601c2
jne 0x50b624
mov eax, dword [0xac0a3c]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x6c]
mov esi, eax
test esi, esi
je 0x50b64a
push 0x319
push str.C:_backupSpideyPCSpideyPCD3dPCMovie.cpp
push esi
call fcn.004fc820
add esp, 0xc
test esi, esi
jge 0x50b64a
call fcn.005001b0
push esi
call fcn.0052a101
mov edx, dword [0xac0b68]
mov eax, dword [0xac0b94]
mov ecx, dword [0xac0b90]
push edx
mov edx, dword [0xac0abc]
push eax
mov eax, dword [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x38]
push edx
mov edx, dword [0xac0ba4]
push eax
push ecx
push edx
call dword [sym.imp.binkw32.dll__BinkCopyToBuffer_28]
mov eax, dword [0xac0a3c]
push 0
push eax
mov ecx, dword [eax]
call dword [ecx + 0x80]
mov esi, eax
test esi, esi
je 0x50b6b4
push 0x378
push str.C:_backupSpideyPCSpideyPCD3dPCMovie.cpp
push esi
call fcn.004fc820
add esp, 0xc
test esi, esi
jge 0x50b6b4
call fcn.005001b0
push esi
call fcn.0052a101
mov ecx, 0x19
xor eax, eax
lea edi, [esp + 0x84]
rep stosd dword es:[edi], eax
mov eax, dword [0x6b7908]
lea ecx, [esp + 0x84]
push ecx
mov ecx, dword [0xac0a3c]
push 0x1000000
push 0
mov dword [esp + 0x90], 0x64
mov edx, dword [eax]
push ecx
push 0
push eax
call dword [edx + 0x14]
mov esi, eax
test esi, esi
je 0x50b71a
push 0x381
push str.C:_backupSpideyPCSpideyPCD3dPCMovie.cpp
push esi
call fcn.004fc820
add esp, 0xc
test esi, esi
jge 0x50b71a
call fcn.005001b0
push esi
call fcn.0052a101
call fcn.00502990
mov eax, dword [0xac0ba4]
mov edx, dword [eax + 0xc]
mov ecx, dword [eax + 8]
cmp edx, ecx
je 0x50b740
push eax
call dword [sym.imp.binkw32.dll__BinkNextFrame_4]
pop edi
mov al, 1
pop esi
add esp, 0xe0
ret
test eax, eax
je 0x50b77d
push eax
call dword [sym.imp.binkw32.dll__BinkClose_4]
mov eax, dword [0xac0bac]
test eax, eax
je 0x50b773
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0xac0ba8]
mov dword [0xac0bac], 0
push eax
call fcn.00518883
add esp, 4
mov dword [0xac0ba4], 0
pop edi
xor al, al
pop esi
add esp, 0xe0
ret
Function at 0x50ba40
Capabilities:
Create thread

Disassembly:
mov eax, dword [0x6b7920]
sub esp, 0x100
push ebx
xor ebx, ebx
push ebp
cmp eax, ebx
push esi
je 0x50bb45
cmp byte [0xac1024], bl
jne 0x50ba84
push eax
mov eax, dword [sym.imp.binkw32.dll__BinkOpenDirectSound_4]
push eax
call dword [sym.imp.binkw32.dll__BinkSetSoundSystem_8]
push 0x100
call dword [sym.imp.binkw32.dll__BinkSetIOSize_4]
mov eax, dword [0x6b7920]
mov byte [0xac1024], 1
cmp eax, ebx
je 0x50bb45
cmp byte [0xac101c], bl
je 0x50baf4
cmp byte [0xac101d], bl
je 0x50badb
mov byte [0xac101d], bl
mov byte [0xac101c], bl
mov byte [0x568628], bl
mov eax, dword [0xac1020]
cmp eax, ebx
je 0x50baf4
mov ecx, dword [0xac1020]
push ecx
call dword [sym.imp.binkw32.dll__BinkClose_4]
mov edx, dword [0xac0f4c]
push edx
call fcn.00505100
add esp, 4
mov dword [0xac1020], ebx
jmp 0x50baf4
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
mov byte [0x568628], 1
push 0xa
call esi
cmp byte [0xac101c], bl
jne 0x50bae8
mov eax, dword [esp + 0x110]
push eax
call fcn.00504650
add esp, 4
mov ebp, eax
mov esi, str.blank.bik
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x50bb2f
cmp cl, bl
je 0x50bb2b
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x50bb2f
add eax, 2
add esi, 2
cmp cl, bl
jne 0x50bb0b
xor eax, eax
jmp 0x50bb34
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x50bb51
push str._t_tMUSIC_ATTEMPT_TO_PLAY_BLANK_TRACK__r_n
call fcn.004015b0
add esp, 4
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x100
ret
push edi
mov edi, str.Voice_
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x10]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
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 ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push str._t_tMUSIC_PLAYING__s_r_n
call fcn.004015b0
lea ecx, [esp + 0x18]
push ebx
push ecx
call fcn.00504cb0
add esp, 0x10
mov dword [0xac0f4c], eax
push 0x1800000
push eax
call dword [sym.imp.binkw32.dll__BinkOpen_8]
mov dword [0xac1020], eax
mov eax, dword [0xac1020]
cmp eax, ebx
pop edi
je 0x50bb45
push ebx
mov edx, dword [0xac1020]
push edx
call dword [sym.imp.binkw32.dll__BinkSetVideoOnOff_8]
push ebx
push ebx
push 0x50bc20
mov byte [0x568628], bl
call fcn.0052ad49
add esp, 0xc
mov byte [0xac101c], 1
call fcn.00515480
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x100
ret
Function at 0x50bdd0
Capabilities:
Create thread

Disassembly:
push esi
mov eax, dword [0xac1020]
test eax, eax
je 0x50be53
mov esi, dword [esp + 8]
push esi
mov eax, dword [0xac1020]
push eax
call dword [sym.imp.binkw32.dll__BinkPause_8]
mov al, byte [0xac101c]
test al, al
je 0x50be53
mov al, byte [0xac101d]
test esi, esi
je 0x50be2b
test al, al
jne 0x50be53
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
mov byte [0xac101d], 1
mov byte [0x568628], 1
push 0xa
call esi
mov al, byte [0xac101c]
test al, al
jne 0x50be15
mov byte [0xac101c], 1
pop esi
ret
test al, al
je 0x50be53
push 0
push 0
push 0x50bc20
mov byte [0xac101d], 0
mov byte [0x568628], 0
call fcn.0052ad49
add esp, 0xc
call fcn.00515480
pop esi
ret
Function at 0x50e680
Capabilities:
Encode data using xor

Disassembly:
mov al, byte [esp + 0x10]
push ebx
push ebp
push esi
test al, 0x10
push edi
je 0x50e777
mov ebp, dword [esp + 0x1c]
mov edi, dword [esp + 0x14]
xor bl, bl
test ebp, ebp
jbe 0x50e71d
mov ecx, edi
mov edx, ebp
mov ax, word [ecx]
test ax, ax
je 0x50e6b2
cmp ax, 0x8000
jne 0x50e6b2
mov bl, 1
add ecx, 2
dec edx
jne 0x50e6a2
test bl, bl
je 0x50e71d
mov ecx, dword [esp + 0x18]
mov esi, edi
sub esi, ecx
mov edi, ebp
mov ax, word [esi + ecx]
mov dx, ax
mov bl, al
neg dx
sbb edx, edx
add ecx, 2
and edx, 0xff
shl bl, 3
and edx, 0xff80
movzx bx, bl
shl edx, 1
or edx, ebx
mov ebx, eax
shr ebx, 2
and bl, 0xf8
movzx bx, bl
shr ax, 7
shl edx, 5
shr al, 3
or edx, ebx
movzx ax, al
shl edx, 2
or edx, eax
dec edi
mov word [ecx - 2], dx
jne 0x50e6c6
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
ret
test ebp, ebp
jbe 0x50e86d
mov esi, dword [esp + 0x18]
sub edi, esi
mov ax, word [esi + edi]
add esi, 2
mov cx, ax
mov dx, ax
shr cx, 7
shr dx, 2
mov bl, cl
xor bl, dl
and bl, 4
shl al, 3
xor bl, dl
xor dx, dx
movzx ax, al
and bl, 0xfc
mov dl, bl
shl eax, 5
shr cl, 3
or edx, eax
movzx cx, cl
shl edx, 3
or edx, ecx
dec ebp
mov word [esi - 2], dx
jne 0x50e72b
pop edi
pop esi
pop ebp
xor al, al
pop ebx
ret
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x14]
xor dl, dl
dec eax
test eax, eax
mov bl, 1
jl 0x50e7a0
lea ecx, [edi + eax*2]
lea esi, [eax + 1]
test byte [ecx + 1], 0x80
je 0x50e798
mov dl, 1
jmp 0x50e79a
xor bl, bl
sub ecx, 2
dec esi
jne 0x50e78e
test dl, dl
je 0x50e818
test bl, bl
jne 0x50e818
test byte [esp + 0x20], 1
je 0x50e818
test eax, eax
jl 0x50e811
mov edx, dword [esp + 0x18]
mov esi, edi
sub esi, edx
lea edi, [eax + 1]
lea ecx, [edx + eax*2]
mov ax, word [ecx + esi]
mov dx, ax
mov bl, al
neg dx
sbb edx, edx
sub ecx, 2
and edx, 0xff
shl bl, 3
and edx, 0xff80
movzx bx, bl
shl edx, 1
or edx, ebx
mov ebx, eax
shr ebx, 2
and bl, 0xf8
movzx bx, bl
shr ax, 7
shl edx, 5
shr al, 3
or edx, ebx
movzx ax, al
shl edx, 2
or edx, eax
dec edi
mov word [ecx + 2], dx
jne 0x50e7c1
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
ret
test eax, eax
jl 0x50e86d
mov ecx, dword [esp + 0x18]
lea ebp, [eax + 1]
sub edi, ecx
lea esi, [ecx + eax*2]
mov ax, word [edi + esi]
sub esi, 2
mov cx, ax
mov dx, ax
shr cx, 7
shr dx, 2
mov bl, cl
xor bl, dl
and bl, 4
shl al, 3
xor bl, dl
xor dx, dx
movzx ax, al
and bl, 0xfc
mov dl, bl
shl eax, 5
shr cl, 3
or edx, eax
movzx cx, cl
shl edx, 3
or edx, ecx
dec ebp
mov word [esi + 2], dx
jne 0x50e828
pop edi
pop esi
pop ebp
xor al, al
pop ebx
ret
Function at 0x50f230
Capabilities:
Terminate process

Disassembly:
mov eax, dword [esp + 4]
push ebx
push esi
push edi
lea ecx, [eax + eax*2]
xor ebx, ebx
lea edi, [eax + ecx*4]
shl edi, 3
mov eax, dword [edi + 0xac12f4]
cmp eax, ebx
je 0x50f368
mov ecx, dword [edi + 0xac12f8]
test ch, 4
je 0x50f2a0
push eax
call fcn.0052a3c0
add esp, 4
mov ecx, dword [edi + 0xac12f8]
mov dword [edi + 0xac12f4], ebx
and ecx, 0x9ff
mov dword [edi + 0xac12f8], ecx
mov esi, dword [0xadb39c]
cmp esi, ebx
je 0x50f368
mov eax, dword [edi + 0xac1338]
cmp dword [esi + 8], eax
je 0x50f2ce
mov esi, dword [esi]
cmp esi, ebx
jne 0x50f290
jmp 0x50f368
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov esi, eax
cmp esi, ebx
je 0x50f264
push 0x6cc
push str.C:_backupSpideyPCSpideyPCD3dPCTex.cpp
push esi
call fcn.004fc820
add esp, 0xc
cmp esi, ebx
jge 0x50f264
call fcn.005001b0
push esi
call fcn.0052a101
cmp esi, ebx
je 0x50f368
dec word [esi + 4]
mov ax, word [esi + 4]
cmp ax, bx
jg 0x50f368
cmp byte [esp + 0x14], bl
je 0x50f39b
cmp ax, bx
push str.Releasing_a_clut_with_pending_references_
sete al
push eax
call fcn.004015b0
mov ecx, dword [0xadb3a4]
push str.Uh_oh__clut_count_is_off_
cmp ecx, ebx
setg cl
push ecx
call fcn.004015b0
mov eax, dword [esi + 8]
add esp, 0x10
cmp eax, ebx
je 0x50f32b
push eax
call fcn.0052a3c0
add esp, 4
mov eax, dword [0xadb39c]
cmp esi, eax
jne 0x50f33e
mov edx, dword [eax]
mov dword [0xadb39c], edx
jmp 0x50f354
cmp eax, ebx
je 0x50f354
mov ecx, dword [eax]
cmp ecx, esi
je 0x50f350
mov eax, ecx
cmp eax, ebx
jne 0x50f342
jmp 0x50f354
mov ecx, dword [esi]
mov dword [eax], ecx
push esi
call fcn.0052a3c0
mov eax, dword [0xadb3a4]
add esp, 4
dec eax
mov dword [0xadb3a4], eax
cmp byte [esp + 0x14], bl
je 0x50f39b
cmp dword [edi + 0xac133c], 0xffffff
jne 0x50f389
mov edx, dword [edi + 0xac1334]
push edx
call fcn.0052a3c0
add esp, 4
mov dword [edi + 0xac1334], ebx
mov dword [edi + 0xac1338], ebx
mov dword [edi + 0xac133c], ebx
mov eax, dword [edi + 0xac1330]
cmp eax, ebx
je 0x50f3b4
push eax
call fcn.0052a3c0
add esp, 4
mov dword [edi + 0xac1330], ebx
pop edi
pop esi
pop ebx
ret
Function at 0x511400
Capabilities:
Encode data using xor

Disassembly:
mov al, byte [0xadc4dc]
sub esp, 0x10
test al, al
push ebx
push ebp
push esi
push edi
jne 0x51149f
xor edi, edi
mov ebp, 0xadb4dc
mov eax, edi
add ebp, 4
shr eax, 1
and eax, 0x55555555
mov edx, eax
lea esi, [eax + eax]
and edx, 0x33333333
xor esi, edi
mov ecx, esi
shr ecx, 2
and ecx, 0x33333333
xor ecx, edx
xor eax, ecx
shl ecx, 2
xor esi, ecx
mov edx, eax
mov ecx, esi
and edx, 0xf0f0f0f
shr ecx, 4
and ecx, 0xf0f0f0f
xor ecx, edx
xor eax, ecx
shl ecx, 4
xor esi, ecx
mov edx, eax
mov ecx, esi
and edx, 0xff00ff
shr ecx, 8
and ecx, 0xff00ff
and esi, 0xffff
xor ecx, edx
xor edx, edx
mov dh, cl
xor ecx, eax
xor edx, esi
shl ecx, 0x10
or edx, ecx
inc edi
mov dword [ebp - 4], edx
cmp ebp, 0xadc4dc
jl 0x51141b
mov byte [0xadc4dc], 1
mov eax, dword [esp + 0x30]
mov ebp, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
test eax, eax
je 0x511510
mov edi, ebp
mov ebx, edx
shr edi, 1
shr ebx, 1
cmp edi, 1
jne 0x5114c7
cmp ebx, edi
jne 0x5114c7
mov esi, 2
jmp 0x51150c
mov eax, ebx
mov ecx, edi
shr eax, 1
push 0x40000000
push eax
shr ecx, 1
push ecx
call fcn.00511390
imul edi, ebx
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], 0
fild qword [esp + 0x24]
add esp, 0xc
mov esi, eax
fstp dword [esp + 0x30]
fld dword [esp + 0x30]
fmul dword [0x53c998]
call fcn.00529c7c
mov edx, dword [esp + 0x28]
sub esi, eax
add dword [esp + 0x2c], esi
cmp ebp, edx
mov ebx, ebp
jb 0x511518
mov ebx, edx
dec ebx
mov eax, 1
xor ecx, ecx
test al, bl
mov dword [esp + 0x30], ecx
je 0x511533
shl eax, 1
inc ecx
test ebx, eax
jne 0x511528
mov dword [esp + 0x30], ecx
mov eax, ebp
imul eax, edx
shl eax, 1
push eax
call fcn.0052a227
mov ecx, dword [esp + 0x2c]
add esp, 4
xor edi, edi
mov dword [esp + 0x18], eax
test ecx, ecx
jbe 0x5115c4
mov esi, eax
mov dword [esp + 0x10], esi
xor edx, edx
test ebp, ebp
jbe 0x5115ad
mov ecx, edi
mov eax, ebx
and ecx, ebx
not eax
lea ecx, [ecx*4 + 0xadb4dc]
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x30]
mov ebp, edx
or ebp, edi
add esi, 2
and ebp, eax
shl ebp, cl
mov ecx, edx
and ecx, ebx
mov ecx, dword [ecx*4 + 0xadb4dc]
shl ecx, 1
or ebp, ecx
mov ecx, dword [esp + 0x14]
or ebp, dword [ecx]
mov ecx, dword [esp + 0x2c]
inc edx
mov cx, word [ecx + ebp*2]
mov ebp, dword [esp + 0x24]
mov word [esi - 2], cx
cmp edx, ebp
jb 0x511570
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x10]
lea ecx, [ebp + ebp]
add esi, ecx
mov ecx, dword [esp + 0x28]
inc edi
mov dword [esp + 0x10], esi
cmp edi, ecx
jb 0x511557
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret