joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40a42c
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40a46b
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40a46b
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40a46b
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x40a46b
cmp dword [ecx + 0x74], 0xe
jbe 0x40a46b
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x40dde9
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00414c70
mov eax, dword [0x4225d0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.00413716
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x40de2b
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x40df87
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00414bc0
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x423e00]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.004149eb
mov ecx, dword [esi*4 + 0x423e00]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [ecx + edi + 0x20]
jne 0x40df80
cmp eax, dword [ecx + edi + 0x24]
jne 0x40df80
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [ecx + edi + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40df80
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004149eb
add esp, 0x14
test edx, edx
jl 0x40df80
jg 0x40def6
test eax, eax
jb 0x40df80
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x40df80
jl 0x40df10
cmp dword [ebp - 0x1008], eax
ja 0x40df80
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x40df2e
test ebx, ebx
je 0x40df67
cmp ecx, edi
jae 0x40df67
mov al, byte [ecx]
cmp al, 0xd
jne 0x40df48
lea eax, [edi - 1]
cmp ecx, eax
jae 0x40df54
cmp byte [ecx + 1], 0xa
jne 0x40df54
inc ecx
jmp 0x40df54
movzx eax, al
movsx eax, byte [eax + 0x422d60]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x40df2e
cmp edx, ebx
jne 0x40df2e
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x40df85
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00409263
leave
ret

Function at 0x40f430
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40f45d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40f45d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x40f7c2
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41adcc
push 0x41adc4
push str.FlsAlloc
push 0x1f
call fcn.0040fb4e
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40f7f6
push dword [ebp + 8]
mov ecx, esi
call dword [section..00cfg]
call esi
jmp 0x40f7fc
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x40f840
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41addc
push 0x41add4
push str.FlsGetValue
push 0x21
call fcn.0040fb4e
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40f877
push dword [ebp + 8]
mov ecx, esi
call dword [section..00cfg]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x40f87f
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41ade4
push 0x41addc
push str.FlsSetValue
push 0x22
call fcn.0040fb4e
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40f8b9
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [section..00cfg]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x412e5d
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x412efa
push ebx
push esi
call fcn.00412efd
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.00412d61
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x412ea7
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x412ef9
push edi
push eax
call fcn.00411875
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x412ec7
call fcn.00410cfb
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x412ef8
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.00412d61
add esp, 0x20
test eax, eax
jne 0x412ee6
push edi
call fcn.00410cfb
jmp 0x412eee
push ebx
call fcn.00410cfb
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret
Function at 0x4144ec
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x423e00]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x41452c
cmp byte [ebx], 0xa
jne 0x41452c
or byte [edi + eax + 0x28], 4
jmp 0x414531
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x414630
mov dl, byte [eax]
cmp dl, 0x1a
je 0x414613
inc eax
cmp dl, 0xd
je 0x41455d
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x414583
cmp eax, ecx
jae 0x414591
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x414545
jmp 0x414630
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41460e
cmp dword [ebp - 0x10], 0
je 0x41460e
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x423e00]
test byte [eax + edi + 0x28], 0x48
je 0x4145e8
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4145d3
mov byte [esi], dl
jmp 0x4145e4
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x423e00]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x414630
cmp byte [ebp - 1], 0xa
jne 0x4145f7
cmp esi, ebx
jne 0x4145f7
mov byte [esi], 0xa
jmp 0x41462f
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0041498d
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x414630
mov byte [esi], 0xd
jmp 0x41462f
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x423e00]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x41462d
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x414630
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x414639
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x423e00]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x41467f
cmp word [ebx], dx
jne 0x41467f
or byte [eax + edi + 0x28], 4
jmp 0x414684
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x4147e7
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x4147c7
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x4146c5
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x4146fb
cmp eax, edx
jae 0x414709
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x4146a0
jmp 0x4147e7
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4147c2
cmp dword [ebp - 0x18], 0
je 0x4147c2
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x423e00]
test byte [eax + edi + 0x28], 0x48
je 0x414798
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x41475c
mov word [esi], cx
jmp 0x414793
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x423e00]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x423e00]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x423e00]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x4147e7
pop eax
cmp word [ebp - 4], ax
jne 0x4147a8
cmp esi, ebx
jne 0x4147a8
mov word [esi], ax
jmp 0x4147e4
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0041498d
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x4147e7
push 0xd
pop eax
jmp 0x4147a3
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x423e00]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x4147e1
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x4147e7
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x417d78
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.00417f0f
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x417ee7
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x417ee7
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x417e9c
jg 0x417dd4
test eax, eax
je 0x417e92
push 1
push 0x1000
call fcn.00411437
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x417df7
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x417e89
push 0x8000
push ebx
call fcn.0040d394
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x417e20
jg 0x417e1b
cmp ecx, 0x1000
jb 0x417e20
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.00415505
add esp, 0x10
cmp eax, 0xffffffff
je 0x417e65
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x417e1b
jl 0x417e4c
test ecx, ecx
jne 0x417e0d
push dword [ebp - 0xc]
push ebx
call fcn.0040d394
push esi
call fcn.00410cfb
add esp, 0xc
xor ebx, ebx
jmp 0x417ef5
cmp byte [edi + 0x24], 0
je 0x417e7c
cmp dword [edi + 0x20], 5
jne 0x417e7c
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x417e87
mov ebx, dword [edi + 0x18]
jmp 0x417e89
xor ebx, ebx
push esi
call fcn.00410cfb
pop ecx
jmp 0x417ef5
test ecx, ecx
jg 0x417e5e
jl 0x417e9c
test eax, eax
jae 0x417e5e
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0041498d
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x417ebc
cmp byte [edi + 0x1c], 0
je 0x417e5e
jmp 0x417eed
push ebx
call fcn.004132be
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x417e5e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x417ef5
cmp byte [edi + 0x1c], 0
je 0x417ef2
mov ebx, dword [edi + 0x18]
jmp 0x417ef5
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.0041498d
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4017c0
Capabilities:
Hash data using djb2

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0xc
xor eax, eax
cmp dword [esp + 0x20], 0
je 0x4018a0
mov ebx, dword [esp + 0x24]
test ebx, ebx
je 0x4018a0
mov ebp, dword [esp + 0x28]
test ebp, ebp
je 0x401814
mov ecx, 0x1505
xor edi, edi
nop
movzx edx, byte [ebx + edi]
test edx, edx
je 0x40181b
mov esi, ecx
shl esi, 5
add esi, ecx
add esi, edx
mov ecx, edi
and ecx, 1
xor edi, 1
lea edi, [edi + ecx*2]
mov ecx, esi
cmp edi, ebp
jb 0x4017f0
jmp 0x40181d
mov esi, 0x1505
jmp 0x40181d
mov esi, ecx
mov ecx, dword [esp + 0x20]
mov ebx, dword [ecx + 0x20]
lea edi, [ebx - 1]
mov edx, ebx
sub edx, 1
mov dword [esp + 8], edx
jb 0x4018a0
and edi, esi
mov eax, dword [ecx + 4]
mov dword [esp + 4], eax
jmp 0x401844
inc edi
dec ebx
je 0x40189e
mov eax, edi
and eax, dword [esp + 8]
mov edx, dword [esp + 4]
mov ebp, dword [edx + eax*4]
cmp ebp, 0xffffffff
je 0x40189e
mov eax, dword [ecx + 8]
cmp dword [eax + ebp*4], esi
jne 0x401840
mov eax, dword [ecx + 0xc]
mov eax, dword [eax + ebp*4]
mov dword [esp], eax
push eax
call fcn.004084f0
mov ecx, dword [esp + 0x24]
add esp, 4
cmp eax, dword [esp + 0x28]
jne 0x401840
push dword [esp + 0x28]
push dword [esp + 4]
push dword [esp + 0x2c]
call fcn.00408510
mov ecx, dword [esp + 0x2c]
add esp, 0xc
test eax, eax
jne 0x401840
mov eax, dword [ecx + 0x10]
mov eax, dword [eax + ebp*4]
jmp 0x4018a0
xor eax, eax
add esp, 0xc
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x401d10
Capabilities:
Hash data using djb2

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x10
mov eax, 0xffffffff
cmp dword [esp + 0x24], 0
je 0x401e2c
mov esi, dword [esp + 0x28]
test esi, esi
je 0x401e2c
cmp dword [esp + 0x2c], 0
je 0x401e2c
push esi
call fcn.004084f0
add esp, 4
test eax, eax
je 0x401d84
mov ecx, 0x1505
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, byte [esi + edi]
test edx, edx
je 0x401d8b
mov ebx, ecx
shl ebx, 5
add ebx, ecx
add ebx, edx
mov ecx, edi
and ecx, 1
xor edi, 1
lea edi, [edi + ecx*2]
mov ecx, ebx
cmp edi, eax
jb 0x401d60
jmp 0x401d8d
mov ebx, 0x1505
jmp 0x401d8d
mov ebx, ecx
mov ecx, dword [esp + 0x24]
mov esi, dword [ecx + 0x20]
lea edi, [esi - 1]
mov edx, esi
sub edx, 1
mov dword [esp + 8], edx
jae 0x401e34
mov ebp, 0xffffffff
mov eax, dword [ecx + 0x18]
cmp eax, dword [ecx + 0x1c]
jb 0x401df1
call fcn.00401f30
mov ecx, eax
mov eax, 0xffffffff
test ecx, ecx
mov ecx, dword [esp + 0x28]
jne 0x401e2c
push ecx
call fcn.004084f0
add esp, 4
mov dword [esp], eax
mov ecx, dword [esp + 0x24]
mov esi, dword [ecx + 0x20]
lea edi, [esi - 1]
mov eax, esi
sub eax, 1
mov dword [esp + 8], eax
jae 0x401eb0
mov ebp, 0xffffffff
mov eax, dword [ecx + 0xc]
mov edx, dword [ecx + 0x18]
mov esi, dword [esp + 0x28]
mov dword [eax + edx*4], esi
mov eax, dword [ecx + 4]
mov edx, dword [ecx + 0x18]
mov dword [eax + ebp*4], edx
mov eax, dword [ecx + 0x10]
mov esi, dword [esp + 0x2c]
mov dword [eax + edx*4], esi
mov eax, dword [ecx + 0x14]
mov edx, dword [ecx + 0x18]
mov dword [eax + edx*4], ebp
mov eax, dword [ecx + 8]
mov edx, dword [ecx + 0x18]
mov dword [eax + edx*4], ebx
inc dword [ecx + 0x18]
mov eax, dword [ecx]
mov dword [esi], eax
xor eax, eax
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [esp], eax
and edi, ebx
mov eax, dword [ecx + 4]
mov dword [esp + 4], eax
jmp 0x401e58
inc edi
dec esi
je 0x401da6
mov ebp, edi
and ebp, dword [esp + 8]
mov eax, dword [esp + 4]
mov eax, dword [eax + ebp*4]
cmp eax, 0xffffffff
je 0x401dab
mov edx, dword [ecx + 8]
cmp dword [edx + eax*4], ebx
jne 0x401e50
mov ecx, dword [ecx + 0xc]
mov ebp, dword [ecx + eax*4]
push ebp
call fcn.004084f0
mov ecx, dword [esp + 0x28]
add esp, 4
cmp eax, dword [esp]
jne 0x401e50
push dword [esp]
push ebp
push dword [esp + 0x30]
call fcn.00408510
mov ecx, dword [esp + 0x30]
add esp, 0xc
test eax, eax
jne 0x401e50
mov eax, 0xffffffff
jmp 0x401e2c
and edi, ebx
mov eax, dword [ecx + 4]
mov dword [esp + 4], eax
jmp 0x401ec8
inc edi
dec esi
je 0x401dec
mov ebp, edi
and ebp, dword [esp + 8]
mov eax, dword [esp + 4]
mov eax, dword [eax + ebp*4]
cmp eax, 0xffffffff
je 0x401df1
mov edx, dword [ecx + 8]
cmp dword [edx + eax*4], ebx
jne 0x401ec0
mov ecx, dword [ecx + 0xc]
mov eax, dword [ecx + eax*4]
mov dword [esp + 0xc], eax
push eax
call fcn.004084f0
mov ecx, dword [esp + 0x28]
add esp, 4
cmp eax, dword [esp]
jne 0x401ec0
push dword [esp]
push dword [esp + 0x10]
push dword [esp + 0x30]
call fcn.00408510
mov ecx, dword [esp + 0x30]
add esp, 0xc
test eax, eax
jne 0x401ec0
jmp 0x401df1
Function at 0x402640
Capabilities:
Compute adler32 checksum
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x14
mov esi, dword [esp + 0x2c]
test esi, esi
je 0x402806
mov ebp, dword [esp + 0x30]
mov ebx, dword [esp + 0x28]
mov ecx, ebx
shr ecx, 0x10
mov eax, ebx
or eax, 0xffff
xor ebx, 0xffff0000
and ebx, eax
test ebp, ebp
je 0x4027ff
mov edx, 0x5e6ea9af
mov eax, ebp
mul edx
shr edx, 0xb
imul eax, edx, 0x15b0
mov edx, ebp
sub edx, eax
jmp 0x4026d1
add esi, dword [esp + 0x10]
mov ebp, dword [esp + 8]
mov eax, ecx
mov edx, 0x80078071
mul edx
mov edi, edx
shr edi, 0xf
mov eax, ebx
mov edx, 0x80078071
mul edx
imul eax, edi, 0xfff1
sub ecx, eax
shr edx, 0xf
imul eax, edx, 0xfff1
sub ebx, eax
sub ebp, dword [esp + 4]
mov edx, 0x15b0
je 0x4027ff
xor eax, eax
cmp edx, 8
mov dword [esp + 4], edx
mov dword [esp + 8], ebp
jb 0x402761
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edx, eax
xor eax, 8
and edx, 8
lea edi, [eax + edx*2]
add edi, 7
mov dword [esp], edi
lea eax, [eax + edx*2]
movzx edx, byte [esi]
add edx, ebx
add ecx, edx
movzx edi, byte [esi + 1]
add edi, edx
add ecx, edi
movzx edx, byte [esi + 2]
add edx, edi
add ecx, edx
movzx edi, byte [esi + 3]
add edi, edx
mov edx, ecx
xor edx, edi
and ecx, edi
movzx ebp, byte [esi + 4]
add ebp, edi
add edx, ebp
lea ecx, [edx + ecx*2]
movzx edx, byte [esi + 5]
add edx, ebp
mov ebp, ecx
xor ebp, edx
and ecx, edx
movzx edi, byte [esi + 6]
add edi, edx
mov edx, dword [esp + 4]
movzx ebx, byte [esi + 7]
add ebx, edi
add edi, ebx
add edi, ebp
lea ecx, [edi + ecx*2]
add esi, 8
cmp dword [esp], edx
jb 0x4026f0
mov ebp, dword [esp + 8]
mov edi, eax
sub edi, edx
jae 0x402698
mov dword [esp + 0xc], edi
sub edx, eax
mov dword [esp + 0x10], edx
and edx, 3
mov dword [esp], edx
je 0x4027ad
neg dword [esp]
xor ebp, ebp
mov edi, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, byte [edi]
inc edi
add ebx, edx
add ecx, ebx
dec ebp
cmp dword [esp], ebp
jne 0x402790
sub eax, ebp
cmp dword [esp + 0xc], 0xfffffffc
ja 0x402690
jmp 0x4027ba
mov edi, esi
cmp dword [esp + 0xc], 0xfffffffc
ja 0x402690
mov edx, dword [esp + 4]
sub edx, eax
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebp, byte [edi + eax]
add ebp, ebx
add ecx, ebp
movzx ebx, byte [edi + eax + 1]
add ebx, ebp
add ecx, ebx
movzx ebp, byte [edi + eax + 2]
add ebp, ebx
add ecx, ebp
movzx ebx, byte [edi + eax + 3]
add ebx, ebp
add ecx, ebx
add eax, 4
cmp edx, eax
jne 0x4027d0
jmp 0x402690
shl ecx, 0x10
add ecx, ebx
jmp 0x40280b
mov ecx, 1
mov eax, ecx
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x408240
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, dword [esp + 0x14]
mov ebx, dword [edx + 8]
mov esi, 1
cmp ebx, eax
jae 0x4082ac
mov edi, edx
cmp dword [esp + 0x18], 0
je 0x40828e
cmp ebx, 1
adc ebx, 0
cmp ebx, eax
jae 0x408290
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edx, ebx
and edx, 2
mov ebp, ebx
or ebx, 2
imul ebx, edx
xor edx, 2
and ebp, 0xfffffffd
imul ebp, edx
add ebx, ebp
cmp ebx, eax
jb 0x408270
jmp 0x408290
mov ebx, eax
push ebx
push dword [edi + 0xc]
push dword [edi]
push dword [ecx + 0x34]
call dword [ecx + 0x30]
add esp, 0x10
test eax, eax
je 0x4082aa
mov dword [edi], eax
mov dword [edi + 8], ebx
jmp 0x4082ac
xor esi, esi
mov eax, esi
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x408a10
Capabilities:
Generate random numbers using a mersenne twister

Disassembly:
mov ecx, dword [esp + 4]
mov dword [0x44a6ac], ecx
mov eax, 0xfffffd92
nop
mov edx, ecx
shr edx, 0x1e
xor edx, ecx
imul ecx, edx, 0x6c078965
add ecx, eax
add ecx, 0x26f
mov dword [eax*4 + 0x44b068], ecx
test eax, eax
je 0x408a61
mov edx, ecx
shr edx, 0x1e
xor edx, ecx
imul ecx, edx, 0x6c078965
add ecx, eax
add ecx, 0x270
mov dword [eax*4 + 0x44b06c], ecx
add eax, 2
jmp 0x408a20
mov dword [0x44a6a8], 0x270
ret

Function at 0x408a70
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
push esi
mov eax, dword [0x44a6a8]
cmp eax, 0x270
jne 0x408acf
mov eax, 0xfffff640
mov edx, dword [0x44a6ac]
nop
nop
nop
nop
nop
nop
nop
nop
and edx, 0x80000000
mov esi, dword [eax + 0x44b070]
mov ecx, esi
and ecx, 0x7ffffffe
or ecx, edx
mov edx, esi
and esi, 1
neg esi
and esi, 0x9908b0df
xor esi, dword [eax + 0x44b6a0]
shr ecx, 1
xor esi, ecx
mov dword [eax + 0x44ba2c], esi
add eax, 4
jne 0x408a90
mov eax, 0x270
jmp 0x408ae5
cmp eax, 0x4e0
jb 0x408ae5
mov ecx, 0x44a6a8
call fcn.00408e80
mov eax, dword [0x44a6a8]
lea ecx, [eax + 1]
mov dword [0x44a6a8], ecx
mov eax, dword [eax*4 + 0x44a6ac]
mov ecx, eax
shr ecx, 0xb
and ecx, dword [0x44ba2c]
xor ecx, eax
mov eax, ecx
shl eax, 7
and eax, 0x9d2c5680
xor eax, ecx
mov ecx, eax
shl ecx, 0xf
and ecx, 0xefc40000
xor ecx, eax
shr ecx, 0x12
and eax, 0x7fff
xor eax, ecx
pop esi
ret
Function at 0x408e80
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
push ebx
push edi
push esi
mov edi, dword [ecx + 0x9c4]
mov eax, 0x3fe
nop
nop
and edi, 0x80000000
mov edx, dword [ecx + eax*4 - 0x630]
mov ebx, edx
and ebx, 0x7ffffffe
or ebx, edi
shr ebx, 1
mov esi, edx
and esi, 1
neg esi
and esi, 0x9908b0df
mov edi, esi
and edi, ebx
add esi, ebx
add edi, edi
sub esi, edi
xor esi, dword [ecx + eax*4]
mov edi, edx
mov dword [ecx + eax*4 - 0xff4], esi
inc eax
cmp eax, 0x4e1
jne 0x408e90
mov esi, dword [ecx + 0xd50]
mov eax, 0x355
nop
and esi, 0x80000000
mov edi, dword [ecx + eax*4]
lea ebx, [edi - 0x80000000]
mov edx, edi
or edx, 0x7ffffffe
and edx, ebx
or edx, esi
shr edx, 1
mov esi, edi
and edi, 1
neg edi
and edi, 0x9908b0df
xor edi, dword [ecx + eax*4 - 0xd50]
xor edi, edx
mov dword [ecx + eax*4 - 0x9c4], edi
inc eax
cmp eax, 0x4e1
jne 0x408ee0
mov esi, SysReAllocString
and esi, dword [ecx + 0x1380]
mov eax, dword [ecx + 4]
mov edx, eax
and edx, 0x7ffffffe
or edx, esi
shr edx, 1
and eax, 1
neg eax
and eax, 0x9908b0df
mov esi, edx
and esi, eax
add eax, edx
add esi, esi
sub eax, esi
xor eax, dword [ecx + 0x634]
mov dword [ecx + 0x9c0], eax
mov dword [ecx], 0
pop esi
pop edi
pop ebx
ret