joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4323bc
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x4831b0]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x4323ed
xor eax, eax
jmp 0x432576
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x484a00]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x432429
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.004351e3
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x432504
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x432542
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x43248d
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x43247e
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x43245e
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4324cd
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x4324d6
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x43244f
jmp 0x4324d8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x432571
cmp dword [ebp - 0x6c], edi
je 0x432542
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x432537
call fcn.004326f1
mov dword [eax], 9
call fcn.004326fa
mov dword [eax], esi
jmp 0x43256c
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x43252c
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x4324d8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x4324d8
push dword [ebp - 0x6c]
call fcn.00432703
pop ecx
jmp 0x43256c
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x43255a
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x43255a
xor eax, eax
jmp 0x432574
call fcn.004326f1
mov dword [eax], 0x1c
call fcn.004326fa
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x432574
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.00431172
add ebp, 0x3a0
leave
ret
Function at 0x43388b
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x484508], ebx
push esi
push edi
jne 0x43390b
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x433946
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x484508], eax
je 0x433946
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x48450c], eax
call esi
cmp dword [0x4840c4], 2
mov dword [0x484510], eax
jne 0x43390b
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x484518], eax
je 0x43390b
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x484514], eax
mov eax, dword [0x484514]
test eax, eax
je 0x433950
call eax
test eax, eax
je 0x433937
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x484518]
test eax, eax
je 0x433937
test byte [ebp - 8], 1
jne 0x433950
cmp dword [0x4840d0], 4
jb 0x43394a
or byte [ebp + 0x12], 0x20
jmp 0x43396f
xor eax, eax
jmp 0x43397f
or byte [ebp + 0x12], 4
jmp 0x43396f
mov eax, dword [0x48450c]
test eax, eax
je 0x43396f
call eax
mov ebx, eax
test ebx, ebx
je 0x43396f
mov eax, dword [0x484510]
test eax, eax
je 0x43396f
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x484508]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x438e33
Capabilities:
Get geographical location

Disassembly:
push 0x18
push 0x444498
call fcn.0042cac0
xor edi, edi
xor ebx, ebx
inc ebx
cmp dword [0x484670], edi
jne 0x438e77
push edi
push edi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x438e62
mov dword [0x484670], ebx
jmp 0x438e77
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x438e77
mov dword [0x484670], 2
mov eax, dword [0x484670]
cmp eax, ebx
jne 0x438e97
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
jmp 0x438f5a
cmp eax, 2
je 0x438ea0
cmp eax, edi
jne 0x438ec8
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x24], edi
cmp dword [ebp + 0x18], edi
jne 0x438eb3
mov eax, dword [0x484580]
mov dword [ebp + 0x18], eax
push edi
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
mov dword [ebp - 0x20], eax
cmp eax, edi
jne 0x438ecf
xor eax, eax
jmp 0x438f5a
mov dword [ebp - 4], edi
add eax, 3
and eax, 0xfffffffc
call fcn.0042ac60
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [ebp - 0x28], esi
or dword [ebp - 4], 0xffffffff
jmp 0x438f02
cmp esi, edi
jne 0x438f18
push dword [ebp - 0x20]
call fcn.0042b0f3
pop ecx
mov esi, eax
cmp esi, edi
je 0x438ec8
mov dword [ebp - 0x24], ebx
push dword [ebp - 0x20]
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
je 0x438f4b
cmp dword [ebp + 0x14], edi
jne 0x438f35
push edi
push edi
jmp 0x438f3b
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push 0xffffffffffffffff
push esi
push ebx
push dword [ebp + 0x18]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x24], edi
je 0x438f57
push esi
call fcn.0042b16b
pop ecx
mov eax, dword [ebp - 0x1c]
lea esp, [ebp - 0x34]
call fcn.0042cafb
ret
Function at 0x438f63
Capabilities:
Get geographical location

Disassembly:
push 0x18
push 0x4444a8
call fcn.0042cac0
xor esi, esi
cmp dword [0x484674], esi
jne 0x438fa7
push esi
push esi
xor edi, edi
inc edi
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x438f92
mov dword [0x484674], edi
jmp 0x438fa7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x438fa7
mov dword [0x484674], 2
mov eax, dword [0x484674]
cmp eax, 2
je 0x439088
cmp eax, esi
je 0x439088
cmp eax, 1
jne 0x438fec
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], esi
cmp dword [ebp + 0x18], esi
jne 0x438fd5
mov eax, dword [0x484580]
mov dword [ebp + 0x18], eax
push esi
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
mov ebx, eax
mov dword [ebp - 0x24], ebx
cmp ebx, esi
jne 0x438ff3
xor eax, eax
jmp 0x43909a
mov dword [ebp - 4], esi
lea eax, [ebx + ebx]
add eax, 3
and eax, 0xfffffffc
call fcn.0042ac60
mov dword [ebp - 0x18], esp
mov edi, esp
mov dword [ebp - 0x28], edi
or dword [ebp - 4], 0xffffffff
jmp 0x439029
cmp edi, esi
jne 0x439044
lea eax, [ebx + ebx]
push eax
call fcn.0042b0f3
pop ecx
mov edi, eax
cmp edi, esi
je 0x438fec
mov dword [ebp - 0x20], 1
push ebx
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x439077
push esi
push esi
cmp dword [ebp + 0x14], esi
jne 0x439061
push esi
push esi
jmp 0x439067
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push 0xffffffffffffffff
push edi
push esi
push dword [ebp + 0x18]
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x20], esi
je 0x439083
push edi
call fcn.0042b16b
pop ecx
mov eax, dword [ebp - 0x1c]
jmp 0x43909a
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
lea esp, [ebp - 0x34]
call fcn.0042cafb
ret
Function at 0x43967d
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
cmp eax, ebx
push edi
mov dword [ebp - 0x10], ebx
jne 0x439696
or eax, 0xffffffff
jmp 0x4396f7
push esi
mov esi, dword [eax]
cmp esi, ebx
mov dword [ebp - 4], esi
je 0x4396f3
push 0x3d
push esi
call fcn.0043987d
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0xc], eax
je 0x4396f3
cmp esi, eax
je 0x4396f3
xor ecx, ecx
cmp byte [eax + 1], bl
mov eax, dword [0x4840e4]
sete cl
cmp eax, dword [0x4840e8]
mov dword [ebp - 8], ecx
jne 0x4396d9
mov edi, eax
call fcn.0043961c
mov dword [0x4840e4], eax
cmp eax, ebx
jne 0x439732
cmp dword [ebp + 0xc], ebx
je 0x4396fb
cmp dword [0x4840ec], ebx
je 0x4396fb
call fcn.0043919f
test eax, eax
je 0x439732
or eax, 0xffffffff
pop esi
pop edi
pop ebx
leave
ret
cmp dword [ebp - 8], ebx
je 0x439704
xor eax, eax
jmp 0x4396f6
push 4
call fcn.0042b0f3
cmp eax, ebx
pop ecx
mov dword [0x4840e4], eax
je 0x4396f3
mov dword [eax], ebx
cmp dword [0x4840ec], ebx
jne 0x439732
push 4
call fcn.0042b0f3
cmp eax, ebx
pop ecx
mov dword [0x4840ec], eax
je 0x4396f3
mov dword [eax], ebx
mov edi, dword [ebp - 0xc]
sub edi, dword [ebp - 4]
push dword [ebp - 4]
mov esi, dword [0x4840e4]
call fcn.004395cf
mov edi, eax
cmp edi, ebx
pop ecx
jl 0x439793
cmp dword [esi], ebx
je 0x439793
lea esi, [esi + edi*4]
push dword [esi]
call fcn.0042b16b
cmp dword [ebp - 8], ebx
pop ecx
jne 0x439776
mov eax, dword [ebp - 4]
mov dword [esi], eax
mov eax, dword [ebp + 8]
mov dword [eax], ebx
jmp 0x4397d4
mov eax, dword [esi + 4]
mov dword [esi], eax
inc edi
add esi, 4
cmp dword [esi], ebx
jne 0x43976d
mov eax, edi
shl eax, 2
push eax
push dword [0x4840e4]
call fcn.00430d48
cmp eax, ebx
pop ecx
pop ecx
je 0x4397d4
jmp 0x4397cf
cmp dword [ebp - 8], ebx
jne 0x43983f
cmp edi, ebx
jge 0x4397a2
neg edi
lea eax, [edi*4 + 8]
push eax
push dword [0x4840e4]
call fcn.00430d48
cmp eax, ebx
pop ecx
pop ecx
je 0x4396f3
mov edx, dword [ebp - 4]
lea ecx, [eax + edi*4]
mov dword [ecx], edx
mov dword [ecx + 4], ebx
mov ecx, dword [ebp + 8]
mov dword [ecx], ebx
mov dword [0x4840e4], eax
cmp dword [ebp + 0xc], ebx
je 0x439829
push dword [ebp - 4]
call fcn.0042a480
inc eax
inc eax
push eax
call fcn.0042b0f3
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
je 0x439829
push dword [ebp - 4]
push esi
call fcn.00430c50
mov eax, esi
sub eax, dword [ebp - 4]
pop ecx
add eax, dword [ebp - 0xc]
pop ecx
mov ecx, dword [ebp - 8]
mov byte [eax], bl
inc eax
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x439822
or dword [ebp - 0x10], 0xffffffff
push esi
call fcn.0042b16b
pop ecx
cmp dword [ebp - 8], ebx
je 0x439837
push dword [ebp - 4]
call fcn.0042b16b
pop ecx
mov eax, dword [ebp - 0x10]
jmp 0x4396f6
push dword [ebp - 4]
call fcn.0042b16b
mov eax, dword [ebp + 8]
pop ecx
mov dword [eax], ebx
jmp 0x439700
Function at 0x4011a0
Capabilities:
Delete directory
Terminate process

Disassembly:
sub esp, 0x1c
mov eax, dword [esp + 0x20]
mov dword [esp], 0x404060
mov dword [esp + 4], eax
call sub.cygwin1.dll_warn
mov dword [esp], 0x407040
call sub.cygwin1.dll_unlink
mov dword [esp], 0x4070c0
call sub.cygwin1.dll_rmdir
mov dword [esp], 1
call sub.cygwin1.dll_exit
nop
lea esi, [esi]
push ebx
xor ebx, ebx
sub esp, 0x28
cmp dword [esp + 0x30], 0x14
mov dword [esp + 0x1c], 0
je 0x401215
mov dword [esp], 0x407040
call sub.cygwin1.dll_unlink
mov dword [esp], 0x4070c0
call sub.cygwin1.dll_rmdir
mov dword [esp], ebx
call sub.cygwin1.dll_exit
lea eax, [esp + 0x1c]
mov dword [esp], eax
call sub.cygwin1.dll_wait
test eax, eax
mov ebx, dword [esp + 0x1c]
jle 0x4011f5
test bl, bl
jne 0x401236
movzx ebx, bh
mov dword [esp + 0x1c], ebx
jmp 0x4011f5
mov eax, ebx
and eax, 0x7f
je 0x4011f5
cmp eax, 0x7f
je 0x4011f5
lea ebx, [eax + 0x80]
mov dword [esp + 0x1c], ebx
jmp 0x4011f5
Function at 0x4059f0
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x426d76
mov eax, dword fs:[0]
push eax
push ebx
push esi
push edi
mov eax, dword [0x45190c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
xor edx, edx
mov eax, dword [ebp + 0x10]
mov dword [ebx], 0x428da8
mov dword [ebx + 4], edx
mov dword [ebx + 8], edx
mov dword [ebx + 0xc], edx
mov dword [ebx + 0x10], edx
mov dword [ebx + 0x14], edx
mov dword [ebx + 0x18], edx
mov dword [ebx + 0x1c], edx
mov dword [ebx + 0x20], edx
mov dword [ebx + 0x24], edx
mov dword [ebx + 0x28], edx
or dword [ebx + 0x2c], 0xffffffff
mov dword [ebx + 0x30], edx
mov dword [ebx + 0x34], edx
mov dword [ebx + 0x38], edx
mov dword [ebx + 0x3c], edx
mov dword [ebx + 0x40], edx
mov dword [ebx + 0x44], edx
mov dword [ebx + 0x48], edx
mov dword [ebx + 0x4c], edx
mov dword [ebx + 0x50], eax
mov eax, dword [ebp + 8]
mov dword [ebx + 0x5c], eax
mov dword [ebx + 0x60], ecx
mov eax, dword [ecx + 4]
and dword [ebx + 0x8c], 0xffffffc0
and byte [ebx + 0x91], 0x80
or dword [ebx + 0x94], 0xffffffff
or dword [ebx + 0x98], 0xffffffff
mov dword [ebx + 0x64], eax
xor eax, eax
inc eax
mov dword [ebx + 0x68], edx
mov dword [ebx + 0x6c], edx
mov dword [ebx + 0x70], edx
mov dword [ebx + 0x74], edx
mov byte [ebx + 0x90], 0x4f
mov dword [ebx + 0x9c], eax
mov dword [ebx + 0xa0], eax
mov dword [ebx + 0xa4], edx
mov dword [ebx + 0xa8], edx
mov ecx, dword [ecx + 4]
test ecx, ecx
je 0x405acb
mov eax, dword [ecx + 0x24]
mov dword [ebx + 0x78], eax
mov dword [ecx + 0x24], ebx
mov eax, dword [ebx + 0x5c]
lea edi, [ebx + 0x58]
push 1
push edx
push edi
mov dword [eax + 4], ebx
lea esi, [ebx + 0x54]
mov ecx, dword [ebx + 0x60]
push esi
push ecx
mov eax, dword [ecx]
call dword [eax + 0x18]
push 4
push dword [esi]
mov esi, dword [0x4280f8]
push 6
call esi
push 8
push dword [edi]
mov dword [ebx + 0x7c], eax
push 2
call esi
mov ecx, dword [ebx + 0x7c]
mov dword [ebx + 0x80], eax
mov dword [ebx + 0x88], eax
mov eax, ebx
mov dword [ebx + 0x84], ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc

Function at 0x413886
Capabilities:
Encrypt data using rc4 prga
Hash data using djb2

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
test edx, edx
jne 0x413895
or eax, 0xffffffff
jmp 0x4138e6
movzx eax, word [edx]
mov ecx, 0x1505
push esi
xor esi, esi
jmp 0x4138c3
cmp ax, 0x41
jb 0x4138b6
cmp ax, 0x5a
ja 0x4138b6
movzx eax, ax
add eax, 0x20
jmp 0x4138b9
movzx eax, ax
imul ecx, ecx, 0x21
xor ecx, eax
inc esi
movzx eax, word [edx + esi*2]
test ax, ax
jne 0x4138a2
imul eax, ecx, 0x41c64e6d
imul ecx, ecx, 0x10dcd
pop esi
add eax, 0x3039
shr eax, 0x10
inc ecx
and ecx, 0xffff0000
or eax, ecx
pop ebp
ret 4
Function at 0x423136
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
xor edx, edx
mov ecx, 0x811c9dc5
cmp dword [ebp + 0xc], edx
jbe 0x42315c
push esi
mov esi, dword [ebp + 8]
movzx eax, byte [edx + esi]
xor eax, ecx
imul ecx, eax, 0x1000193
inc edx
cmp edx, dword [ebp + 0xc]
jb 0x423149
pop esi
mov eax, ecx
pop ebp
ret 8

Function at 0x4264c9
Capabilities:
Hash data using djb2

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
test edx, edx
jne 0x4264d8
or eax, 0xffffffff
jmp 0x426515
movzx eax, word [edx]
mov ecx, 0x1505
push esi
xor esi, esi
jmp 0x4264f2
imul ecx, ecx, 0x21
movzx eax, ax
xor ecx, eax
inc esi
movzx eax, word [edx + esi*2]
test ax, ax
jne 0x4264e5
imul eax, ecx, 0x41c64e6d
imul ecx, ecx, 0x10dcd
pop esi
add eax, 0x3039
shr eax, 0x10
inc ecx
and ecx, 0xffff0000
or eax, ecx
pop ebp
ret 4
Function at 0x401070
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push edi
mov edi, 0x34567890
mov dword [ecx], 0x12345678
mov dword [ecx + 4], 0x23456789
mov dword [ecx + 8], edi
mov dl, byte [eax]
test dl, dl
je 0x4010ea
push esi
mov esi, dword [ecx + 4]
lea ebx, [ebx]
mov eax, dword [ecx]
movsx edx, dl
xor edx, eax
and edx, 0xff
mov edx, dword [ebx + edx*4]
shr eax, 8
xor edx, eax
movzx eax, dl
add esi, eax
mov eax, dword [ebp + 8]
imul esi, esi, 0x8088405
mov dword [ecx], edx
inc esi
mov edx, esi
shr edx, 0x18
xor edx, edi
and edx, 0xff
shr edi, 8
mov dword [ecx + 4], esi
xor edi, dword [ebx + edx*4]
inc eax
mov dword [ecx + 8], edi
mov dl, byte [eax]
mov dword [ebp + 8], eax
test dl, dl
jne 0x4010a0
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x403590
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
xor ebx, ebx
push edi
mov dword [ebp - 8], ebx
cmp dword [esi + 0x100ac], ebx
je 0x403650
cmp dword [esi + 0x7c], ebx
jbe 0x403650
mov eax, 0xffffff5c
sub eax, esi
lea edi, [esi + 0xa4]
mov dword [ebp - 4], eax
jmp 0x4035d0
movzx ecx, byte [edi]
mov eax, dword [esi + 0x100d0]
mov ebx, dword [esi + 0x100dc]
xor ecx, eax
mov edx, dword [esi + 0x100d8]
shr eax, 8
and ecx, 0xff
mov ecx, dword [ebx + ecx*4]
xor ecx, eax
movzx eax, cl
add eax, dword [esi + 0x100d4]
mov dword [esi + 0x100d0], ecx
mov ecx, dword [esi + 0x100d8]
imul eax, eax, 0x8088405
inc eax
mov dword [esi + 0x100d4], eax
shr eax, 0x18
xor eax, ecx
and eax, 0xff
shr ecx, 8
xor ecx, dword [ebx + eax*4]
and edx, 0xfffd
or edx, 2
mov eax, edx
xor eax, 1
imul eax, edx
mov dword [esi + 0x100d8], ecx
mov ecx, dword [ebp - 4]
shr eax, 8
xor byte [edi], al
inc edi
add ecx, edi
cmp ecx, dword [esi + 0x7c]
jb 0x4035d0
xor ebx, ebx
mov edi, dword [esi + 0x7c]
mov ecx, dword [esi + 0x2c]
mov edx, dword [esi + 0x1c]
push edi
lea eax, [esi + 0xa4]
push eax
mov eax, dword [esi + 8]
push ecx
push edx
call eax
add esp, 0x10
cmp eax, edi
je 0x403674
or eax, 0xffffffff
jmp 0x403677
mov eax, dword [ebp - 8]
add dword [esi + 0x100c0], edi
mov ecx, dword [esi + 0x48]
pop edi
adc dword [esi + 0x100c4], ebx
add dword [esi + 0x100c8], ecx
mov dword [esi + 0x48], ebx
mov dword [esi + 0x7c], ebx
adc dword [esi + 0x100cc], ebx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x405410
Capabilities:
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
mov eax, dword [0x602c60]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x10]
test ebx, ebx
jle 0x4055a0
mov edx, 1
mov dword [ebp - 0x84], 0xedb88320
mov ecx, edx
mov dword [ebp + ecx*4 - 0x84], edx
inc ecx
add edx, edx
cmp ecx, 0x20
jl 0x405443
push esi
push edi
xor edi, edi
jmp 0x405460
mov ecx, dword [ebp + edi - 0x84]
xor esi, esi
lea edx, [ebp - 0x84]
test ecx, ecx
je 0x405481
test cl, 1
je 0x40547a
xor esi, dword [edx]
add edx, 4
shr ecx, 1
jne 0x405473
mov dword [ebp + edi - 0x104], esi
add edi, 4
cmp edi, 0x80
jl 0x405460
xor edi, edi
jmp 0x4054a0
mov ecx, dword [ebp + edi - 0x104]
xor esi, esi
lea edx, [ebp - 0x104]
test ecx, ecx
je 0x4054c1
test cl, 1
je 0x4054ba
xor esi, dword [edx]
add edx, 4
shr ecx, 1
jne 0x4054b3
mov dword [ebp + edi - 0x84], esi
add edi, 4
cmp edi, 0x80
jl 0x4054a0
xor edi, edi
jmp 0x4054e0
mov ecx, dword [ebp + edi - 0x84]
xor esi, esi
lea edx, [ebp - 0x84]
test ecx, ecx
je 0x405501
test cl, 1
je 0x4054fa
xor esi, dword [edx]
add edx, 4
shr ecx, 1
jne 0x4054f3
mov dword [ebp + edi - 0x104], esi
add edi, 4
cmp edi, 0x80
jl 0x4054e0
test bl, 1
je 0x405533
xor edx, edx
lea ecx, [ebp - 0x104]
test eax, eax
je 0x405531
test al, 1
je 0x40552a
xor edx, dword [ecx]
add ecx, 4
shr eax, 1
jne 0x405524
mov eax, edx
sar ebx, 1
je 0x40559b
xor edi, edi
lea esp, [esp]
mov ecx, dword [ebp + edi - 0x104]
xor esi, esi
lea edx, [ebp - 0x104]
test ecx, ecx
je 0x405561
test cl, 1
je 0x40555a
xor esi, dword [edx]
add edx, 4
shr ecx, 1
jne 0x405553
mov dword [ebp + edi - 0x84], esi
add edi, 4
cmp edi, 0x80
jl 0x405540
test bl, 1
je 0x405593
xor edx, edx
lea ecx, [ebp - 0x84]
test eax, eax
je 0x405591
test al, 1
je 0x40558a
xor edx, dword [ecx]
add ecx, 4
shr eax, 1
jne 0x405584
mov eax, edx
sar ebx, 1
jne 0x4054d3
xor eax, dword [ebp + 0xc]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004fb958
mov esp, ebp
pop ebp
ret
Function at 0x406940
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push edi
mov edi, dword [esi + 0x2c]
mov dword [ebp - 0xc], edi
jmp 0x406953
mov edi, dword [ebp - 0xc]
mov ebx, dword [esi + 0x3c]
sub ebx, dword [esi + 0x74]
mov eax, dword [esi + 0x6c]
mov ecx, dword [esi + 0x2c]
sub ebx, eax
lea edx, [edi + ecx - 0x106]
mov dword [ebp - 4], ebx
cmp eax, edx
jb 0x4069cd
mov eax, dword [esi + 0x38]
push edi
lea ecx, [eax + edi]
push ecx
push eax
call fcn.004fbb10
mov edx, dword [esi + 0x4c]
mov eax, dword [esi + 0x44]
sub dword [esi + 0x70], edi
sub dword [esi + 0x6c], edi
add esp, 0xc
sub dword [esi + 0x5c], edi
lea ecx, [eax + edx*2]
movzx eax, word [ecx - 2]
sub ecx, 2
cmp eax, edi
jb 0x4069a1
sub eax, edi
jmp 0x4069a3
xor eax, eax
dec edx
mov word [ecx], ax
jne 0x406992
mov ecx, dword [esi + 0x40]
mov edx, edi
lea ecx, [ecx + edi*2]
movzx eax, word [ecx - 2]
sub ecx, 2
cmp eax, edi
jb 0x4069c0
sub eax, edi
jmp 0x4069c2
xor eax, eax
dec edx
mov word [ecx], ax
jne 0x4069b1
add ebx, edi
mov dword [ebp - 4], ebx
mov edi, dword [esi]
cmp dword [edi + 4], 0
je 0x406afa
mov edx, dword [esi + 0x74]
add edx, dword [esi + 0x6c]
mov eax, dword [edi + 4]
add edx, dword [esi + 0x38]
mov ecx, dword [ebp - 4]
mov ebx, eax
mov dword [ebp - 8], edx
cmp ebx, ecx
jbe 0x4069f3
mov ebx, ecx
test ebx, ebx
je 0x406a47
sub eax, ebx
mov dword [edi + 4], eax
mov eax, dword [edi + 0x1c]
mov eax, dword [eax + 0x18]
cmp eax, 1
jne 0x406a14
mov eax, dword [edi]
mov ecx, dword [edi + 0x30]
push ebx
call fcn.00409460
jmp 0x406a2c
cmp eax, 2
jne 0x406a35
mov ecx, dword [edi]
mov eax, dword [edi + 0x30]
test ecx, ecx
jne 0x406a26
xor eax, eax
jmp 0x406a32
push ebx
call fcn.00404dd0
mov edx, dword [ebp - 8]
add esp, 4
mov dword [edi + 0x30], eax
mov ecx, dword [edi]
push ebx
push ecx
push edx
call fcn.004fbb10
add dword [edi], ebx
add esp, 0xc
add dword [edi + 8], ebx
add dword [esi + 0x74], ebx
mov ebx, dword [esi + 0x74]
cmp ebx, 3
jb 0x406a6f
mov edx, dword [esi + 0x6c]
add edx, dword [esi + 0x38]
mov ecx, dword [esi + 0x58]
movzx eax, byte [edx]
mov dword [esi + 0x48], eax
shl eax, cl
movzx ecx, byte [edx + 1]
xor eax, ecx
and eax, dword [esi + 0x54]
mov dword [esi + 0x48], eax
cmp ebx, 0x106
jae 0x406a83
mov edx, dword [esi]
cmp dword [edx + 4], 0
jne 0x406950
mov eax, dword [esi + 0x16c0]
mov ecx, dword [esi + 0x3c]
cmp eax, ecx
jae 0x406afa
mov edi, dword [esi + 0x6c]
add edi, ebx
cmp eax, edi
jae 0x406ac9
sub ecx, edi
mov ebx, ecx
cmp ebx, 0x102
jbe 0x406aaa
mov ebx, 0x102
mov eax, dword [esi + 0x38]
push ebx
add eax, edi
push 0
push eax
call fcn.004fc1f0
add esp, 0xc
add ebx, edi
pop edi
mov dword [esi + 0x16c0], ebx
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [edi + 0x102]
cmp eax, edx
jae 0x406afa
sub edi, eax
add edi, 0x102
sub ecx, eax
cmp edi, ecx
jbe 0x406ae3
mov edi, ecx
mov ecx, dword [esi + 0x38]
push edi
add ecx, eax
push 0
push ecx
call fcn.004fc1f0
add esp, 0xc
add dword [esi + 0x16c0], edi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret