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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x40
mov eax, dword [ebp + 8]
mov ecx, dword [0x1020c218]
add ecx, 0xffffd373
mov dword [0x1020c214], ecx
mov dword [ebp - 0x10], eax
call fcn.10121fb2
xor ecx, ecx
mov edx, eax
mov esi, dword [eax + 0x3c]
mov dword [0x1020c214], 0x9dc
mov edi, dword [0x1020c218]
add edi, 0x21bf
mov dword [0x1020c218], edi
mov esi, dword [eax + esi + 0x78]
mov edi, edx
add edi, dword [eax + esi + 0x20]
mov dword [0x1020c214], 0xffffeeb0
mov dword [0x1020c218], 0x15d7
mov eax, dword [eax + esi + 0x18]
cmp eax, 0
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x24], ecx
je 0x10120e05
mov eax, 0x15d7
xor ecx, ecx
mov edx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x20]
add edx, dword [edx + esi + 0x24]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x30], ecx
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x28]
xor esi, esi
mov edi, dword [ebp - 0x14]
mov ebx, dword [edi + eax*4]
mov edi, edx
add edi, 0xffffecbf
mov dword [0x1020c214], edi
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x44], esi
mov eax, dword [ebp - 0x44]
mov ecx, eax
mov edx, dword [ebp - 0x40]
add ecx, edx
mov esi, dword [ebp - 0x1c]
mov bl, byte [esi + ecx]
mov ecx, dword [ebp - 0x10]
mov bh, byte [ecx + eax]
cmp bl, bh
sete cl
cmp bl, 0
mov dword [ebp - 0x48], eax
mov byte [ebp - 0x49], bh
mov byte [ebp - 0x4a], cl
je 0x10120d9b
mov eax, dword [ebp - 0x48]
add eax, 1
mov cl, byte [ebp - 0x49]
cmp cl, 0
setne dl
mov ch, byte [ebp - 0x4a]
and ch, dl
cmp eax, 0x20
setb dl
and ch, dl
test ch, 1
mov dword [ebp - 0x44], eax
jne 0x10120d4a
mov al, byte [ebp - 0x4a]
test al, 1
jne 0x10120de0
jmp 0x10120da4
xor eax, eax
mov ecx, dword [ebp - 0x3c]
add ecx, 0xffffec71
mov dword [0x1020c218], ecx
mov edx, dword [ebp - 0x38]
add edx, 2
mov esi, dword [ebp - 0x34]
add esi, 1
mov edi, dword [ebp - 0x18]
cmp esi, edi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x24], eax
jb 0x10120d1c
jmp 0x10120e05
mov eax, dword [ebp - 0x38]
movzx ecx, word [eax]
mov edx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x20]
add edx, dword [edx + esi + 0x1c]
mov ecx, dword [edx + ecx*4]
mov dword [0x1020c214], 0x651
mov edx, dword [ebp - 0x1c]
add edx, ecx
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x24]
add esp, 0x40
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x10120eb1
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
xor edx, edx
mov dword [0x1020c214], 0x3eb
mov dword [0x1020c218], 0x840
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x2c]
mov cl, byte [eax + 0x101fc7c4]
mov dl, byte [eax + 0x101fc795]
sub dl, cl
mov byte [ebp + eax - 0x20], dl
add eax, 1
cmp eax, 0xe
mov dword [ebp - 0x2c], eax
jne 0x10120edc
lea eax, [ebp - 0x20]
mov dword [0x1020c218], 0x16248
mov dword [0x1020c214], 0x4b4
mov dword [ebp - 0x30], eax
call fcn.101215e4
mov dword [esp], eax
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], eax
call fcn.10121262
xor ecx, ecx
cmp eax, 0
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x38], ecx
je 0x10120fed
mov eax, dword [ebp - 0x34]
mov ecx, esp
mov dword [ecx + 0xc], 0x40
mov dword [ecx + 8], 0x1000
mov dword [ecx + 4], 0x6000
mov dword [ecx], 0
call eax
sub esp, 0x10
mov ecx, dword [0x1020c214]
add ecx, 0x2253
mov dword [0x1020c214], ecx
mov dword [esp], eax
mov ecx, dword [ebp - 0x24]
mov dword [esp + 4], ecx
mov dword [ebp - 0x3c], eax
call fcn.10120ff5
xor eax, eax
mov ecx, dword [ebp - 0x3c]
mov word [ecx], 0x5a4d
mov dword [ecx + 0x3c], 0xc0
mov dword [0x1020c218], 0x13bc
mov dword [ecx + 0xc0], 0x4550
add ecx, 0xffc00000
mov edx, dword [ebp - 0x28]
mov dword [edx + 0x10], ecx
mov ecx, dword [ebp - 0x3c]
mov dword [edx + 0x44], ecx
mov dword [0x1020c214], 0xf7e
cmp ecx, 0
mov dword [ebp - 0x38], eax
je 0x10120fed
mov eax, dword [ebp - 0x3c]
add eax, 0x24c2
mov dword [0x1020c218], 0x414
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
add esp, 0x4c
pop ebp
ret
Function at 0x10121105
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x18
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
xor esi, esi
mov dword [0x1020c220], 0
mov byte [0x1020c224], 0
mov dword [0x1020c21c], 0
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x1c], esi
mov eax, dword [ebp - 0x1c]
mov ecx, eax
mov dl, cl
mov ecx, dword [ebp - 0x18]
mov byte [ecx + eax], dl
mov dword [0x1020c214], 0x7ed
mov eax, dword [0x1020c21c]
add eax, 1
mov dword [0x1020c21c], eax
cmp eax, 0x100
mov dword [ebp - 0x1c], eax
jl 0x10121140
mov dword [0x1020c218], 0x441
mov dword [0x1020c21c], 0
xor eax, eax
mov dword [ebp - 0x20], eax
jmp 0x1012118b
mov eax, dword [ebp - 0x20]
mov ecx, 0x100
mov dword [0x1020c228], 0
mov dword [0x1020c218], 0x2651
mov edx, dword [0x1020c220]
mov esi, dword [ebp - 0x18]
movzx edi, byte [esi + eax]
add edi, edx
mov dword [ebp - 0x24], eax
xor edx, edx
mov ebx, dword [ebp - 0x10]
div ebx
mov esi, dword [ebp - 0x14]
movzx edx, byte [esi + edx]
add edi, edx
mov dword [0x1020c228], edi
mov dword [0x1020c214], 0x103
mov eax, edi
cdq
idiv ecx
mov dword [0x1020c220], edx
mov dword [0x1020c218], 0xfffff8df
mov ecx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x24]
mov cl, byte [ecx + edi]
mov byte [0x1020c224], cl
mov dword [0x1020c218], 0x23a8
mov ecx, dword [ebp - 0x18]
mov cl, byte [ecx + edx]
mov edx, dword [ebp - 0x18]
mov byte [edx + edi], cl
mov cl, byte [0x1020c224]
mov edx, dword [0x1020c220]
mov esi, dword [ebp - 0x18]
mov byte [esi + edx], cl
mov dword [0x1020c214], 0x11a4
mov edx, dword [0x1020c21c]
add edx, 1
mov dword [0x1020c21c], edx
cmp edx, 0x100
mov dword [ebp - 0x20], edx
jl 0x1012118b
mov dword [0x1020c214], 0x12fc
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x10121c80
Capabilities:
Get number of processors

Disassembly:
push ebp
mov ebp, esp
push esi
sub esp, 0x2c
mov dword [ebp - 8], 0
mov eax, dword fs:[0x30]
mov dword [ebp - 8], eax
xor ecx, ecx
mov dword [0x1020c218], 0x1ec2
mov edx, dword [ebp - 8]
mov edx, dword [edx + 0x10]
mov edx, dword [edx + 0x3c]
mov esi, dword [0x1020c214]
add esi, 0xffffd90d
mov dword [0x1020c214], esi
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x14], ecx
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x10]
cmp word [ecx + eax*2], 0
mov edx, eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], edx
je 0x10121d08
mov eax, dword [ebp - 0x18]
add eax, 1
cmp eax, 0x104
setl cl
mov dword [ebp - 0x20], eax
mov byte [ebp - 0x21], cl
mov al, byte [ebp - 0x21]
test al, 1
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x1c], edx
jne 0x10121cc7
jmp 0x10121d08
mov eax, dword [ebp - 0x1c]
mov dword [0x1020c218], 0x1559
mov dword [0x1020c214], 0xff6
mov ecx, dword [ebp - 0x10]
cmp word [ecx + eax*2 - 0x1a], 0x6c
mov dword [ebp - 0x28], eax
jne 0x10121d9d
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x28]
cmp word [eax + ecx*2 - 0x18], 0x6f
jne 0x10121d9d
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x28]
cmp word [eax + ecx*2 - 0x16], 0x61
jne 0x10121d9d
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x28]
cmp word [eax + ecx*2 - 0x14], 0x64
jne 0x10121d9d
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x28]
cmp word [eax + ecx*2 - 0x12], 0x64
jne 0x10121d9d
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x28]
cmp word [eax + ecx*2 - 0x10], 0x6c
sete dl
mov byte [ebp - 0x29], dl
mov al, byte [ebp - 0x29]
test al, 1
jne 0x10121d86
jmp 0x10121d9d
mov eax, 1
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x28]
cmp word [ecx + edx*2 - 0xe], 0x6c
mov dword [ebp - 0x30], eax
je 0x10121da4
xor eax, eax
mov dword [ebp - 0x30], eax
jmp 0x10121da4
mov eax, dword [ebp - 0x30]
add esp, 0x2c
pop esi
pop ebp
ret
Function at 0x10122127
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x34
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov edi, 0xfffff521
xor ebx, ebx
mov dword [0x1020c214], 0x56f
mov dword [0x1020c21c], 0
mov dword [0x1020c220], 0
mov dword [0x1020c22c], 0
cmp eax, 0
mov dword [ebp - 0x10], eax
mov eax, ebx
mov dword [ebp - 0x14], eax
mov eax, ebx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x2c], edi
je 0x101222c7
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
mov esi, 0x100
mov dword [0x1020c218], 0x1770
add ecx, 1
mov dword [ebp - 0x30], eax
mov eax, ecx
mov dword [ebp - 0x34], edx
cdq
idiv esi
mov dword [0x1020c21c], edx
mov ecx, dword [ebp - 0x24]
movzx edi, byte [ecx + edx]
mov ebx, dword [ebp - 0x34]
add edi, ebx
mov eax, edi
mov dword [ebp - 0x38], edx
cdq
idiv esi
mov dword [0x1020c220], edx
mov esi, dword [ebp - 0x38]
mov cl, byte [ecx + esi]
mov byte [0x1020c224], cl
mov edi, dword [ebp - 0x24]
mov cl, byte [edi + edx]
mov byte [edi + esi], cl
mov edx, dword [0x1020c214]
add edx, 0xffffdfde
mov dword [0x1020c218], edx
mov cl, byte [0x1020c224]
mov edx, dword [0x1020c220]
mov byte [edi + edx], cl
mov edx, dword [0x1020c214]
add edx, 0x264e
mov dword [0x1020c214], edx
mov edx, dword [0x1020c21c]
movzx edx, byte [edi + edx]
mov ebx, dword [0x1020c220]
movzx ebx, byte [edi + ebx]
add ebx, edx
and ebx, 0xff
mov dword [0x1020c22c], ebx
mov dword [0x1020c214], 0x2274
mov cl, byte [edi + ebx]
mov edx, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x30]
mov ch, byte [edx + ebx]
mov byte [0x1020c231], ch
mov byte [0x1020c232], cl
xor ch, cl
mov byte [0x1020c230], ch
mov dword [0x1020c218], 0x2bc2
mov dword [0x1020c214], 0x422
mov edx, dword [ebp - 0x20]
mov byte [edx + ebx], ch
add ebx, 1
mov edx, dword [ebp - 0x10]
cmp ebx, edx
mov dword [ebp - 0x3c], ebx
je 0x101222ba
mov eax, dword [0x1020c21c]
mov dword [ebp - 0x40], eax
mov eax, dword [0x1020c220]
mov ecx, dword [ebp - 0x40]
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x28], edx
jmp 0x10122192
mov eax, dword [0x1020c214]
add eax, 0xffffefb2
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
mov dword [0x1020c214], eax
add esp, 0x34
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x101222d7
Capabilities:
Parse pe header
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x98
mov eax, dword [0x1020c214]
add eax, 0xfffff5ce
mov dword [0x1020c218], eax
call fcn.10001087
xor ecx, ecx
cmp eax, 0
mov dword [esp + 0x24], ecx
je 0x10122353
jmp 0x10122461
mov eax, dword [esp + 0x20]
mov dword [esp + 0x40], eax
mov dword [0x1020c214], 0x9dc
mov dword [0x1020c218], 0x3990
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov edx, dword [eax + ecx + 0x50]
mov dword [esp + 0x84], edx
call fcn.10121c80
xor ecx, ecx
cmp eax, 0
mov dword [esp + 0x18], ecx
je 0x1012241b
jmp 0x10122459
lea eax, [esp + 0x28]
lea ecx, [esp + 0x38]
mov dword [0x1020c214], 0x1bb6
mov dword [esp], eax
mov dword [esp + 0x14], ecx
call fcn.1012198e
lea ecx, [0x10121593]
mov edx, dword [esp + 0x28]
mov dword [esp + 0x64], edx
mov dword [esp + 0x78], 0x141600
mov edx, dword [0x1020c200]
mov dword [esp + 0x70], edx
mov edx, dword [0x1020c204]
mov dword [esp + 0x68], edx
mov edx, dword [0x1020c208]
mov dword [esp + 0x4c], edx
mov edx, dword [0x1020c20c]
mov dword [esp + 0x3c], edx
mov dword [0x1020c218], 0x17d1
mov edx, dword [0x1020c210]
mov dword [esp + 0x88], edx
mov dword [0x1020c214], 0x4b6
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], ecx
mov eax, dword [esp + 0xc]
cmp word [eax], 0x5a4d
mov dword [esp + 0x20], eax
jne 0x101223ff
mov eax, dword [esp + 0x20]
mov ecx, dword [eax + 0x3c]
cmp dword [eax + ecx], 0x4550
mov dword [esp + 0x1c], ecx
je 0x10122309
mov eax, dword [esp + 0x20]
add eax, 0xfffff000
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
and eax, 0xfffff000
mov dword [esp + 0xc], eax
jmp 0x101223d8
lea eax, [esp + 0x38]
mov dword [0x1020c214], 0x1644
mov ecx, dword [esp + 0x30]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.10120eb1
mov ecx, esp
lea edx, [esp + 0x38]
mov dword [ecx], edx
call eax
sub esp, 4
mov eax, 1
mov dword [0x1020c218], 0xe1d
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x24]
mov esp, ebp
pop ebp
ret
Function at 0x10001400
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x80
push esi
mov esi, dword [sym.imp.MSVCRT.dll__errno]
push edi
call esi
mov edi, dword [eax]
mov eax, dword [0x1007d404]
test eax, eax
jne 0x10001516
mov eax, dword [esp + 0x8c]
mov ecx, dword [esp + 0x90]
push eax
push ecx
lea edx, [esp + 0x10]
push str.Assert_failed_at_line__d_of__s
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
mov eax, dword [0x1007d3f0]
add esp, 0x10
test eax, eax
je 0x1000145d
lea ecx, [esp + 8]
push ecx
call eax
add esp, 4
test eax, eax
jne 0x10001516
mov eax, dword [0x10075840]
test eax, eax
je 0x100014b8
push str.ALLEGRO_ASSERT
call dword [sym.imp.MSVCRT.dll_getenv]
add esp, 4
test eax, eax
je 0x1000148e
push 0x10075968
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [0x1007d3e8], eax
jmp 0x10001498
mov dword [0x1007d3e8], 0
mov eax, dword [0x10075844]
test eax, eax
je 0x100014ae
push 0x10001550
call sym.alleg40.dll__add_exit_func
add esp, 4
mov dword [0x10075840], 0
mov eax, dword [0x1007d3e8]
test eax, eax
je 0x100014ee
lea edx, [esp + 8]
push edx
push 0x1007596c
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
mov eax, dword [0x1007d3e8]
push eax
call dword [sym.imp.MSVCRT.dll_fflush]
add esp, 0x10
call esi
mov dword [eax], edi
pop edi
pop esi
add esp, 0x80
ret
mov eax, dword [sym.alleg40.dll_system_driver]
mov dword [0x1007d404], 0xffffffff
test eax, eax
je 0x1000151f
mov eax, dword [eax + 0x30]
test eax, eax
je 0x1000151f
lea ecx, [esp + 8]
push ecx
call eax
add esp, 4
call esi
mov dword [eax], edi
pop edi
pop esi
add esp, 0x80
ret
call sym.alleg40.dll_allegro_exit
mov eax, dword [sym.imp.MSVCRT.dll__iob]
lea edx, [esp + 8]
push edx
add eax, 0x40
push 0x10075970
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0xc
jmp dword [sym.imp.MSVCRT.dll_abort]
Function at 0x100015b0
Capabilities:
Query environment variable
Write file on windows

Disassembly:
sub esp, 0x200
push ebx
push esi
mov esi, dword [sym.imp.MSVCRT.dll__errno]
call esi
mov ebx, dword [eax]
mov ecx, dword [esp + 0x20c]
lea eax, [esp + 0x210]
lea edx, [esp + 8]
push eax
push ecx
push edx
call dword [sym.imp.MSVCRT.dll_vsprintf]
mov eax, dword [0x1007d3f4]
add esp, 0xc
test eax, eax
je 0x100015fb
lea ecx, [esp + 8]
push ecx
call eax
add esp, 4
test eax, eax
jne 0x10001691
mov eax, dword [0x10075844]
test eax, eax
je 0x10001656
push str.ALLEGRO_TRACE
call dword [sym.imp.MSVCRT.dll_getenv]
add esp, 4
test eax, eax
je 0x1000161e
push 0x10075984
push eax
jmp 0x10001628
push 0x10075988
push str.allegro.log
call dword [sym.imp.MSVCRT.dll_fopen]
mov dword [0x1007d3ec], eax
mov eax, dword [0x10075840]
add esp, 8
test eax, eax
je 0x1000164c
push 0x10001550
call sym.alleg40.dll__add_exit_func
add esp, 4
mov dword [0x10075844], 0
mov eax, dword [0x1007d3ec]
test eax, eax
je 0x1000168d
push edi
push eax
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fwrite]
mov eax, dword [0x1007d3ec]
push eax
call dword [sym.imp.MSVCRT.dll_fflush]
add esp, 0x14
pop edi
call esi
mov dword [eax], ebx
pop esi
pop ebx
add esp, 0x200
ret
Function at 0x10016300
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov bl, byte [0x1007e5a0]
xor eax, eax
test bl, bl
je 0x1001635d
push esi
xor edx, edx
mov ecx, edx
and ecx, 3
movsx esi, bl
shl ecx, 3
shl esi, cl
mov bl, byte [edx + 0x1007e5a1]
xor eax, esi
inc edx
test bl, bl
jne 0x10016310
xor edx, edx
mov ecx, 0x18
movsx esi, byte [edx + 0x1007e5a0]
shl esi, cl
mov bl, byte [edx + 0x1007e5a1]
xor eax, esi
inc edx
test bl, bl
jne 0x10016349
xor edx, edx
sub ecx, 8
cmp ecx, 0xfffffff8
jg 0x10016331
mov ecx, dword [esp + 0x10]
pop esi
test ecx, ecx
je 0x1001635d
xor eax, 0x2a
mov ecx, dword [esp + 8]
pop ebx
xor eax, ecx
ret
Function at 0x1001a140
Capabilities:
Get disk information

Disassembly:
push esi
push edi
xor edi, edi
xor esi, esi
push esi
call sym.alleg40.dll__al_drive_exists
add esp, 4
test eax, eax
je 0x1001a154
inc edi
inc esi
cmp esi, 0x1a
jl 0x1001a146
mov eax, edi
pop edi
pop esi
ret

Function at 0x1001a160
Capabilities:
Get disk information

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push esi
push edi
xor edi, edi
xor esi, esi
push esi
call sym.alleg40.dll__al_drive_exists
add esp, 4
test eax, eax
je 0x1001a17d
inc edi
cmp edi, ebx
je 0x1001a18a
inc esi
cmp esi, 0x1a
jl 0x1001a16b
pop edi
pop esi
or eax, 0xffffffff
pop ebx
ret
mov eax, esi
pop edi
pop esi
pop ebx
ret
Function at 0x1003c9e0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x28
mov eax, dword [esp + 0x2c]
push ebx
push esi
push 0x1007afbc
push eax
mov dword [esp + 0x18], 0x5622
mov dword [esp + 0x10], 8
mov dword [esp + 0x14], 1
xor ebx, ebx
call sym.alleg40.dll_pack_fopen
mov esi, eax
add esp, 8
test esi, esi
jne 0x1003ca1d
pop esi
pop ebx
add esp, 0x28
ret
push ebp
push edi
push esi
lea ecx, [esp + 0x20]
push 0xc
push ecx
call sym.alleg40.dll_pack_fread
lea eax, [esp + 0x28]
mov edx, str.RIFF
add esp, 0xc
mov ecx, dword [eax]
mov eax, dword [edx]
cmp ecx, eax
jne 0x1003cbe9
lea eax, [esp + 0x24]
mov edx, str.WAVE
mov ecx, dword [eax]
mov eax, dword [edx]
cmp ecx, eax
jne 0x1003cbe9
test byte [esi + 4], 8
jne 0x1003cbe9
push esi
lea edx, [esp + 0x20]
push 4
push edx
call sym.alleg40.dll_pack_fread
add esp, 0xc
cmp eax, 4
jne 0x1003cbe9
push esi
call sym.alleg40.dll_pack_igetl
mov edi, eax
lea ecx, [esp + 0x20]
mov eax, str.fmt
add esp, 4
mov edx, dword [ecx]
cmp edx, dword [eax]
jne 0x1003cb27
push esi
call sym.alleg40.dll_pack_igetw
add esp, 4
cmp eax, 1
jne 0x1003cbe9
push esi
call sym.alleg40.dll_pack_igetw
add esp, 4
sub edi, 4
cmp eax, 1
mov dword [esp + 0x14], eax
je 0x1003caca
cmp eax, 2
jne 0x1003cbe9
push esi
call sym.alleg40.dll_pack_igetl
push esi
mov dword [esp + 0x20], eax
call sym.alleg40.dll_pack_igetl
push esi
call sym.alleg40.dll_pack_igetw
push esi
call sym.alleg40.dll_pack_igetw
add esp, 0x10
sub edi, 0xc
cmp eax, 8
mov dword [esp + 0x10], eax
je 0x1003cafe
cmp eax, 0x10
jne 0x1003cbe9
test edi, edi
jle 0x1003cbdf
mov ecx, dword [esi + 0xc]
dec ecx
mov eax, ecx
mov dword [esi + 0xc], ecx
test eax, eax
jle 0x1003cbc8
mov ecx, dword [esi + 8]
xor eax, eax
mov al, byte [ecx]
inc ecx
mov dword [esi + 8], ecx
jmp 0x1003cbd1
lea ecx, [esp + 0x1c]
mov eax, str.data
mov edx, dword [ecx]
mov ecx, dword [eax]
cmp edx, ecx
jne 0x1003cafe
mov eax, edi
mov ecx, dword [esp + 0x10]
cdq
idiv dword [esp + 0x14]
cmp ecx, 0x10
mov ebp, eax
jne 0x1003cb51
cdq
sub eax, edx
sar eax, 1
mov ebp, eax
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
xor edx, edx
cmp ebx, 2
setne dl
push ebp
dec edx
push eax
push edx
push ecx
call sym.alleg40.dll_create_sample
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x1003cafe
cmp dword [esp + 0x10], 8
jne 0x1003cb8b
mov eax, dword [ebx + 0x20]
push esi
push edi
push eax
call sym.alleg40.dll_pack_fread
add esp, 0xc
jmp 0x1003cbb0
imul ebp, dword [esp + 0x14]
xor edi, edi
test ebp, ebp
jle 0x1003cbb0
push esi
call sym.alleg40.dll_pack_igetw
mov ecx, dword [ebx + 0x20]
xor eax, 0xffff8000
add esp, 4
mov word [ecx + edi*2], ax
inc edi
cmp edi, ebp
jl 0x1003cb96
mov edx, dword [sym.alleg40.dll_allegro_errno]
cmp dword [edx], 0
je 0x1003cbdf
push ebx
call sym.alleg40.dll_destroy_sample
add esp, 4
xor ebx, ebx
jmp 0x1003cbdf
push esi
call sym.alleg40.dll__sort_out_getc
add esp, 4
cmp eax, 0xffffffff
je 0x1003cbdf
dec edi
test edi, edi
jg 0x1003cb06
test byte [esi + 4], 8
je 0x1003ca63
push esi
call sym.alleg40.dll_pack_fclose
add esp, 4
mov eax, ebx
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x28
ret
Function at 0x10045860
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
push es
mov edx, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
cmp ecx, ebx
jge 0x1004587a
xchg ebx, ecx
cmp dword [edx + 8], 0
je 0x100458b5
cmp eax, dword [edx + 0x14]
jl 0x10045a0e
cmp eax, dword [edx + 0x18]
jge 0x10045a0e
cmp ebx, dword [edx + 0xc]
jge 0x100458a3
cmp ecx, dword [edx + 0xc]
jl 0x10045a0e
mov ebx, dword [edx + 0xc]
cmp ecx, dword [edx + 0x10]
jl 0x100458b5
cmp ebx, dword [edx + 0x10]
jge 0x10045a0e
mov ecx, dword [edx + 0x10]
dec ecx
sub ecx, ebx
inc ecx
mov es, word [edx + 0x3c]
call dword [edx + 0x20]
lea edi, [eax + ebx*2]
cmp dword [sym.alleg40.dll__drawing_mode], 0
je 0x100459ec
cmp dword [sym.alleg40.dll__drawing_mode], 1
jne 0x10045900
mov eax, dword [ebp + 0x10]
call dword [edx + 0x24]
lea esi, [eax + ebx*2]
mov bx, word [ebp + 0x18]
mov ax, word es:[esi]
xor ax, bx
mov word es:[edi], ax
add esi, 2
add edi, 2
dec ecx
jg 0x100458e4
jmp 0x10045a0e
cmp dword [sym.alleg40.dll__drawing_mode], 5
jne 0x10045944
mov eax, dword [ebp + 0x10]
call dword [edx + 0x24]
lea esi, [eax + ebx*2]
mov dword [ebp + 0x14], ecx
lea esi, [esi]
mov ax, word es:[esi]
push dword [sym.alleg40.dll__blender_alpha]
push eax
push dword [ebp + 0x18]
call dword [sym.alleg40.dll__blender_func15]
add esp, 0xc
mov word es:[edi], ax
add esi, 2
add edi, 2
dec dword [ebp + 0x14]
jg 0x10045918
jmp 0x10045a0e
mov eax, dword [ebp + 0x10]
sub ebx, dword [sym.alleg40.dll__drawing_x_anchor]
and ebx, dword [sym.alleg40.dll__drawing_x_mask]
sub eax, dword [sym.alleg40.dll__drawing_y_anchor]
and eax, dword [sym.alleg40.dll__drawing_y_mask]
mov edx, dword [sym.alleg40.dll__drawing_pattern]
mov eax, dword [edx + eax*4 + 0x40]
mov esi, eax
mov edx, dword [sym.alleg40.dll__drawing_x_mask]
cmp dword [sym.alleg40.dll__drawing_mode], 2
je 0x100459a4
cmp dword [sym.alleg40.dll__drawing_mode], 3
je 0x100459b8
nop
mov ax, word [esi + ebx*2]
cmp ax, 0x7c1f
je 0x10045996
mov ax, word [ebp + 0x18]
mov word es:[edi], ax
inc ebx
and ebx, edx
add edi, 2
dec ecx
jg 0x10045984
jmp 0x10045a0e
mov ax, word [esi + ebx*2]
mov word es:[edi], ax
inc ebx
and ebx, edx
add edi, 2
dec ecx
jg 0x100459a4
jmp 0x10045a0e
mov ax, word [esi + ebx*2]
cmp ax, 0x7c1f
je 0x100459d8
mov ax, word [ebp + 0x18]
mov word es:[edi], ax
inc ebx
and ebx, edx
add edi, 2
dec ecx
jg 0x100459b8
jmp 0x10045a0e
mov word es:[edi], 0
inc ebx
and ebx, edx
add edi, 2
dec ecx
jg 0x100459b8
jmp 0x10045a0e
mov ax, word [ebp + 0x18]
shl eax, 0x10
mov ax, word [ebp + 0x18]
cld
test edi, 2
je 0x10045a03
stosw word es:[edi], ax
dec ecx
shr ecx, 1
je 0x10045a0a
rep stosd dword es:[edi], eax
jae 0x10045a0e
stosw word es:[edi], ax
pop es
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x1c]
call dword [eax + 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret