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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
movsx eax, word [ebp + 0xe]
push ebx
xor ebx, ebx
cmp eax, ebx
mov dword [ebp - 0xc], ebx
jle 0x10063b7
push esi
push edi
xor ecx, ecx
movsx eax, word [ebp + 0xc]
cmp eax, ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
jle 0x100634f
imul eax, ecx
mov dword [ebp - 0x14], eax
jmp 0x10062d9
mov eax, dword [ebp - 0x14]
movzx ecx, word [ebp - 4]
push ebx
push ebx
push ebx
add ecx, eax
mov eax, dword [ebp + 8]
push ebx
push 1
lea edi, [eax + ecx*4]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetConsoleCP]
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
movzx esi, word [ebp - 8]
push ebx
push ebx
push eax
mov dword [ebp - 0x18], eax
mov eax, dword [0x10107dc]
add eax, esi
push eax
push 1
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetConsoleCP]
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x1006331
mov al, byte [edi]
mov ecx, dword [0x10107dc]
inc dword [ebp - 8]
mov byte [esi + ecx], al
jmp 0x1006340
mov eax, dword [ebp - 0x18]
add dword [ebp - 8], eax
test byte [edi + 3], 1
je 0x1006340
inc dword [ebp - 4]
inc dword [ebp - 4]
movzx ecx, word [ebp - 4]
movsx eax, word [ebp + 0xc]
cmp ecx, eax
jl 0x10062d6
movsx ecx, word [ebp + 0xc]
mov eax, dword [0x10107dc]
lea ecx, [ecx + eax - 1]
jmp 0x1006364
cmp byte [ecx], 0x20
jne 0x1006368
dec ecx
cmp ecx, eax
jne 0x100635e
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
lea edx, [ebp - 0x10]
push edx
sub ecx, eax
inc ecx
push ecx
push eax
push dword [0x1010748]
call esi
mov edi, 0x10106e8
mov eax, edi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x100638a
push ebx
sub eax, ecx
lea ecx, [ebp - 0x10]
push ecx
push eax
push edi
push dword [0x1010748]
call esi
inc dword [ebp - 0xc]
movzx ecx, word [ebp - 0xc]
movsx eax, word [ebp + 0xe]
cmp ecx, eax
jl 0x10062b9
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x1006b6c
Capabilities:
Manipulate console buffer

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [esi + 0x1b4]
test eax, eax
je 0x1006cbb
cmp dword [0x101074c], 0
je 0x1006b95
mov dword [0x1025cb4], 1
mov cx, word [esi + 0x1b8]
sub cx, word [0x1010724]
push ebx
mov bx, word [esi + 0x1bc]
sub bx, word [0x1010720]
test byte [0x102aa64], 1
mov word [ebp - 4], cx
mov word [ebp - 2], bx
je 0x1006bf7
movsx ecx, word [0x1025caa]
movzx edx, word [esi + 0x10]
dec ecx
cmp ecx, edx
jne 0x1006bf7
mov ecx, dword [esi + 0x1b8]
add ecx, eax
cmp ecx, dword [0x1010714]
jbe 0x1006bf7
mov edx, dword [esi + 0x70]
push esi
mov eax, edi
call fcn.010067d6
dec bx
dec dword [esi + 0x10]
mov word [ebp - 2], bx
push dword [ebp - 4]
push dword [edi + 0x7b8]
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
movzx eax, word [esi + 0x10]
movsx ecx, word [0x1025caa]
cmp ecx, eax
lea eax, [ebp - 8]
jne 0x1006c37
push eax
push dword [ebp - 4]
lea eax, [esi + 0xb4]
push dword [esi + 0x1b4]
push eax
push dword [edi + 0x7b8]
call dword [sym.imp.KERNEL32.dll_WriteConsoleOutputCharacterA]
jmp 0x1006c53
push 0
push eax
push dword [esi + 0x1b4]
lea eax, [esi + 0xb4]
push eax
push dword [edi + 0x7b8]
call dword [sym.imp.KERNEL32.dll_WriteConsoleA]
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
xor eax, eax
mov ax, word [edi + 0x7c8]
push dword [esi + 0x1b4]
push eax
push dword [edi + 0x7b8]
call dword [sym.imp.KERNEL32.dll_FillConsoleOutputAttribute]
test byte [0x102aa64], 1
je 0x1006ca0
lea eax, [ebp - 0x20]
push eax
push dword [0x102b458]
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x1006ca0
cmp word [ebp - 0x1a], bx
jle 0x1006ca0
movsx eax, word [ebp - 0x1c]
mov dword [esi + 0x14], eax
xor eax, eax
mov dword [esi + 0x1b4], eax
mov dword [esi + 0x1b8], eax
mov dword [esi + 0x1bc], eax
mov dword [esi + 0x1c0], eax
pop ebx
leave
ret
Function at 0x1009ff4
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push dword [ebp + 8]
call fcn.01009fd1
test eax, eax
je 0x100a01c
push 0
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
jmp 0x100a06a
mov eax, dword [ebp + 0x10]
push esi
push edi
add eax, eax
push eax
xor esi, esi
push esi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
cmp edi, esi
je 0x100a068
mov eax, dword [ebp + 0x10]
push esi
push esi
lea ecx, [eax + eax]
push ecx
push edi
push eax
push dword [ebp + 0xc]
push esi
push 1
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp eax, esi
mov dword [ebp + 0x10], eax
je 0x100a061
push esi
lea ecx, [ebp + 0x10]
push ecx
push eax
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop esi
pop ebp
ret 0xc

Function at 0x100a1c3
Capabilities:
Log keystrokes
Log keystrokes via polling

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push dword [ebp + 0x10]
mov dword [ebp - 4], 0x1ff
call dword [sym.imp.USER32.dll_VkKeyScanW]
mov esi, dword [ebp + 8]
mov word [esi], ax
movzx eax, al
push 2
push eax
call dword [sym.imp.USER32.dll_MapVirtualKeyW]
test eax, eax
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
je 0x100a202
movzx ax, byte [esi + 1]
mov word [0x100f02c], ax
mov esi, dword [ebp + 0x14]
push 0x10018e4
push esi
call dword [sym.imp.msvcrt.dll_wcscpy]
test byte [0x100f02c], 1
mov ebx, dword [sym.imp.msvcrt.dll__snwprintf]
mov edi, dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
pop ecx
je 0x100a250
push 0x1001de0
push 0x1001dd8
push 0x1ff
push esi
call ebx
push esi
call edi
lea esi, [esi + eax*2]
push esi
call edi
mov ecx, 0x1ff
add esp, 0x18
sub ecx, eax
mov dword [ebp - 4], ecx
test byte [0x100f02c], 4
je 0x100a278
push 0x1001dcc
push 0x1001dd8
push dword [ebp - 4]
push esi
call ebx
push esi
call edi
lea esi, [esi + eax*2]
push esi
call edi
add esp, 0x18
sub dword [ebp - 4], eax
test byte [0x100f02c], 2
je 0x100a294
push 0x1001dc0
push 0x1001dd8
push dword [ebp - 4]
push esi
call ebx
add esp, 0x10
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x100afea
Capabilities:
Query environment variable
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xf4
mov eax, dword [0x10106f0]
or dword [ebp - 0xf4], 0xffffffff
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
mov dword [ebp - 4], eax
mov dword [ebp - 0xf0], ebx
mov dword [ebp - 0xec], esi
call dword [sym.imp.KERNEL32.dll_GetThreadLocale]
lea eax, [ebp - 0xec]
push eax
push 2
push esi
push 0x1001e24
push bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x100b222
push edi
push 4
pop edi
push edi
push 0x102b1d4
push edi
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push 0x1001e10
push dword [ebp - 0xec]
call esi
push edi
push 0x10107c4
push edi
push 0
push 0x1001694
push dword [ebp - 0xec]
call esi
lea eax, [ebx + 0x30]
and dword [eax], 0xffffffef
mov ebx, dword [sym.imp.USER32.dll_LoadStringW]
push 0x30
lea eax, [ebp - 0x64]
push eax
push 0x79
push dword [0x102a9d0]
call ebx
mov eax, dword [ebp - 0xf0]
push edi
add eax, 0x30
push eax
push edi
push 0
lea eax, [ebp - 0x64]
push eax
push dword [ebp - 0xec]
call esi
push 0x30
lea eax, [ebp - 0x64]
push eax
push 0x7a
push dword [0x102a9d0]
call ebx
mov eax, dword [ebp - 0xf0]
push edi
add eax, 0x2c
push eax
push edi
push 0
lea eax, [ebp - 0x64]
push eax
push dword [ebp - 0xec]
call esi
push edi
push 0x102bb80
push edi
push 0
push 0x1001834
push dword [ebp - 0xec]
call esi
push edi
push 0x102bb84
push edi
push 0
push 0x1001818
push dword [ebp - 0xec]
call esi
push edi
push 0x101075c
push edi
push 0
push 0x1001828
push dword [ebp - 0xec]
call esi
push 0x41
lea eax, [ebp - 0xe8]
push eax
push 0x100138c
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
ja 0x100b142
lea eax, [ebp - 0xe8]
push 0x1001df0
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
lea eax, [ebp - 0xe8]
push eax
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
shl eax, 1
push eax
lea eax, [ebp - 0xe8]
push eax
push 1
push 0
push 0x100180c
push dword [ebp - 0xec]
call esi
call dword [sym.imp.KERNEL32.dll_GetACP]
cmp eax, 0x3a4
jne 0x100b215
mov al, byte [0x102aa64]
test al, 1
je 0x100b215
test al, 2
je 0x100b215
push 0x30
lea eax, [ebp - 0x64]
push eax
push 0xc1
push dword [0x102a9d0]
call ebx
mov eax, dword [ebp - 0xf0]
push edi
add eax, 0x50
push eax
push edi
push 0
lea eax, [ebp - 0x64]
push eax
push dword [ebp - 0xec]
call esi
push 0x30
lea eax, [ebp - 0x64]
push eax
push 0xc2
push dword [0x102a9d0]
call ebx
mov eax, dword [ebp - 0xf0]
push edi
add eax, 0x54
push eax
push edi
push 0
lea eax, [ebp - 0x64]
push eax
push dword [ebp - 0xec]
call esi
mov eax, dword [0x1010740]
and eax, 0xff00
je 0x100b1fd
mov dword [ebp - 0xf4], eax
push edi
lea eax, [ebp - 0xf4]
push eax
push edi
push 0
push 0x1001634
push dword [ebp - 0xec]
call esi
push dword [ebp - 0xec]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov ecx, dword [ebp - 4]
pop esi
pop ebx
call fcn.0100cdd8
leave
ret 4
Function at 0x100c961
Capabilities:
Create thread
Terminate process

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
push 0x1001f72
xor esi, esi
push esi
call dword [sym.imp.msvcrt.dll_setlocale]
mov edi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
pop ecx
pop ecx
push 0xfffffffffffffff6
mov dword [0x102b3fc], esi
call edi
or ebx, 0xffffffff
cmp eax, ebx
je 0x100ca8c
push 0xfffffffffffffff5
mov dword [0x102b45c], eax
call edi
cmp eax, ebx
je 0x100ca8c
push 0x102b460
push eax
mov dword [0x102b458], eax
mov dword [0x1025d18], eax
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x100ca8c
mov ebx, 0x102aca0
push ebx
push dword [ebp + 0xc]
mov word [0x102b468], 7
push dword [ebp + 8]
mov word [0x102b478], 7
mov byte [0x102b476], 0x20
call fcn.0100bd27
cmp eax, esi
je 0x100c9fa
push eax
jmp 0x100ca8d
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventW]
push esi
push esi
push esi
push esi
call edi
push esi
push esi
push 1
push esi
mov dword [0x1025d10], eax
call edi
push esi
push 1
push 1
push esi
mov dword [0x1025d0c], eax
call edi
mov dword [0x1025d08], eax
lea eax, [ebp - 4]
push eax
push esi
push ebx
push 0x100b4a2
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, dword [sym.imp.USER32.dll_GetMessageW]
mov dword [0x102b454], eax
jmp 0x100ca58
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
push esi
push esi
push dword [0x102b450]
lea eax, [ebp - 0x20]
push eax
call edi
test eax, eax
jne 0x100ca44
push esi
push 0x100a865
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
call fcn.0100a94f
push 0x1010710
call fcn.0100afea
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push ebx
call dword [sym.imp.msvcrt.dll_exit]
int3
Function at 0x100d129
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x638
mov eax, dword [0x10106f0]
mov ecx, dword [ebp + 0x14]
push ebx
xor ebx, ebx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
cmp eax, ebx
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x638], ecx
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x630], eax
mov dword [ebp - 0x624], ebx
mov dword [ebp - 0x620], ebx
mov dword [edi], ecx
jne 0x100d179
mov dword [ebp - 0x620], 0x8000ffff
jmp 0x100d306
lea eax, [ebp - 0x624]
push eax
push 1
push ebx
push 0x1001fe8
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x100d1a6
mov dword [ebp - 0x620], 0x8000ffff
jmp 0x100d2f1
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x62c]
push eax
lea eax, [ebp - 0x61c]
push eax
lea eax, [ebp - 0x628]
push eax
push ebx
push 0x1001fc8
push dword [ebp - 0x624]
mov dword [ebp - 0x62c], 0x208
call esi
test eax, eax
je 0x100d1ed
mov dword [ebp - 0x620], 0x8000ffff
jmp 0x100d2f0
cmp dword [ebp - 0x628], 1
jne 0x100d1de
lea eax, [ebp - 0x634]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x628]
push eax
push 0
push 0x1001fb0
push dword [ebp - 0x624]
mov dword [ebp - 0x634], 0x208
call esi
test eax, eax
jne 0x100d1de
cmp dword [ebp - 0x628], 1
jne 0x100d1de
push dword [ebp - 0x630]
call sub.msvcrt.dll_wcslen
add eax, dword [ebp - 0x634]
pop ecx
mov ecx, dword [ebp - 0x62c]
lea eax, [eax + ecx + 2]
cmp eax, 0x104
jb 0x100d263
mov dword [ebp - 0x620], 0x8007000e
jmp 0x100d2f0
mov ecx, dword [ebp - 0x20c]
test cx, cx
je 0x100d28e
lea eax, [ebp - 0x20c]
inc eax
lea edx, [ebx + ebx*4]
lea ebx, [ecx + edx*2 - 0x30]
inc eax
xor ecx, ecx
mov cx, word [eax]
test cx, cx
jne 0x100d274
cmp bx, 0x409
je 0x100d2f0
push dword [ebp - 0x630]
lea eax, [ebp - 0x61c]
push eax
lea eax, [ebp - 0x414]
push 0x1001f94
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push 1
push 0
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
test eax, eax
jne 0x100d2d1
mov dword [ebp - 0x620], 0x80070006
jmp 0x100d2f0
cmp dword [ebp - 0x638], 0
mov dword [edi], eax
je 0x100d2f0
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0x638]
call sub.msvcrt.dll_wcscpy
pop ecx
pop ecx
pop esi
cmp dword [ebp - 0x624], 0
je 0x100d306
push dword [ebp - 0x624]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x620]
pop edi
pop ebx
call fcn.0100cdd8
leave
ret 0x10
Function at 0x4042f0
Capabilities:
Hash data using djb2

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x10
xor eax, eax
cmp dword [esp + 0x24], 0
je 0x4043dc
mov ebx, dword [esp + 0x28]
test ebx, ebx
je 0x4043dc
mov ebp, dword [esp + 0x2c]
test ebp, ebp
je 0x40433a
mov ecx, 0x1505
xor edi, edi
nop
movzx edx, byte [ebx + edi]
test edx, edx
je 0x404341
mov esi, ecx
shl esi, 5
add esi, ecx
add esi, edx
inc edi
mov ecx, esi
cmp ebp, edi
jne 0x404320
jmp 0x404343
mov esi, 0x1505
jmp 0x404343
mov esi, ecx
mov edx, dword [esp + 0x24]
mov ecx, dword [edx + 0x20]
lea edi, [ecx - 1]
mov dword [esp + 8], ecx
sub ecx, 1
mov dword [esp + 0xc], ecx
jb 0x4043dc
and edi, esi
mov eax, dword [edx + 4]
mov dword [esp + 4], eax
xor ebp, ebp
jmp 0x404377
inc ebp
cmp dword [esp + 8], ebp
je 0x4043da
mov eax, ebp
and eax, edi
mov ecx, ebp
xor ecx, edi
lea eax, [ecx + eax*2]
and eax, dword [esp + 0xc]
mov ecx, dword [esp + 4]
mov ebx, dword [ecx + eax*4]
cmp ebx, 0xffffffff
je 0x4043da
mov eax, dword [edx + 8]
cmp dword [eax + ebx*4], esi
jne 0x404370
mov eax, dword [edx + 0xc]
mov eax, dword [eax + ebx*4]
mov dword [esp], eax
push eax
call fcn.0040c8e0
mov edx, dword [esp + 0x28]
add esp, 4
cmp eax, dword [esp + 0x2c]
jne 0x404370
push dword [esp + 0x2c]
push dword [esp + 4]
push dword [esp + 0x30]
call fcn.0040c900
mov edx, dword [esp + 0x30]
add esp, 0xc
test eax, eax
jne 0x404370
mov eax, dword [edx + 0x10]
mov eax, dword [eax + ebx*4]
jmp 0x4043dc
xor eax, eax
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x405680
Capabilities:
Hash data using djb2

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x18
mov eax, 0xffffffff
cmp dword [esp + 0x2c], 0
je 0x40586e
mov esi, dword [esp + 0x30]
test esi, esi
je 0x40586e
mov ecx, dword [esp + 0x34]
test ecx, ecx
je 0x40586e
cmp dword [ecx], 0
jne 0x40586e
push esi
call fcn.0040c8e0
add esp, 4
test eax, eax
je 0x4056ea
mov ecx, 0x1505
xor ebx, ebx
nop
nop
nop
nop
movzx edx, byte [esi + ebx]
test edx, edx
je 0x4056f1
mov edi, ecx
shl edi, 5
add edi, ecx
add edi, edx
inc ebx
mov ecx, edi
cmp eax, ebx
jne 0x4056d0
jmp 0x4056f3
mov edi, 0x1505
jmp 0x4056f3
mov edi, ecx
mov ecx, dword [esp + 0x2c]
mov edx, dword [ecx + 0x20]
lea esi, [edx - 1]
mov dword [esp + 0xc], edx
sub edx, 1
mov dword [esp + 0x10], edx
jae 0x4057c6
mov ebp, 0xffffffff
mov eax, dword [ecx + 0x18]
cmp eax, dword [ecx + 0x1c]
jb 0x405753
call fcn.00405950
mov ecx, eax
mov eax, 0xffffffff
test ecx, ecx
mov esi, dword [esp + 0x30]
jne 0x40586e
push esi
call fcn.0040c8e0
add esp, 4
mov edx, esi
lea esi, [esp + 0x14]
mov ecx, dword [esp + 0x2c]
push esi
push edi
push eax
call fcn.00405880
add esp, 0xc
mov ebp, eax
mov esi, dword [esp + 0x30]
push esi
call fcn.0040c8e0
add esp, 4
mov ebx, eax
inc eax
push eax
call dword [0x44e008]
add esp, 4
test eax, eax
je 0x405869
mov byte [eax + ebx], 0
push ebx
push esi
push eax
mov esi, eax
call fcn.0040c7e0
add esp, 0xc
mov edx, dword [esp + 0x2c]
mov eax, dword [edx + 0xc]
mov ecx, dword [edx + 0x18]
mov dword [eax + ecx*4], esi
mov eax, dword [edx + 4]
mov ecx, dword [edx + 0x18]
mov dword [eax + ebp*4], ecx
mov eax, dword [edx + 0x10]
mov esi, dword [esp + 0x34]
mov dword [eax + ecx*4], esi
mov eax, dword [edx + 0x14]
mov ecx, dword [edx + 0x18]
mov dword [eax + ecx*4], ebp
mov eax, dword [edx + 8]
mov ecx, dword [edx + 0x18]
mov dword [eax + ecx*4], edi
inc dword [edx + 0x18]
mov eax, dword [edx]
mov dword [esi], eax
xor eax, eax
jmp 0x40586e
mov dword [esp], eax
and esi, edi
mov eax, dword [ecx + 4]
mov dword [esp + 8], eax
xor ebx, ebx
mov dword [esp + 4], esi
jmp 0x4057ef
inc ebx
cmp dword [esp + 0xc], ebx
mov esi, dword [esp + 4]
je 0x40570e
mov eax, ebx
and eax, esi
mov edx, ebx
xor edx, esi
lea ebp, [edx + eax*2]
and ebp, dword [esp + 0x10]
mov eax, dword [esp + 8]
mov esi, dword [eax + ebp*4]
cmp esi, 0xffffffff
je 0x405713
mov eax, dword [ecx + 8]
cmp dword [eax + esi*4], edi
jne 0x4057e0
mov eax, dword [ecx + 0xc]
mov ebp, dword [eax + esi*4]
push ebp
call fcn.0040c8e0
mov ecx, dword [esp + 0x30]
add esp, 4
cmp eax, dword [esp]
jne 0x4057e0
push dword [esp]
push ebp
push dword [esp + 0x38]
call fcn.0040c900
mov ecx, dword [esp + 0x38]
add esp, 0xc
test eax, eax
jne 0x4057e0
mov eax, dword [ecx + 0x10]
push dword [eax + esi*4]
call fcn.00404710
mov edx, dword [esp + 0x30]
add esp, 4
mov eax, dword [edx + 0x10]
mov ecx, dword [esp + 0x34]
mov dword [eax + esi*4], ecx
mov esi, ecx
jmp 0x4057bb
mov eax, 0xffffffff
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x406970
Capabilities:
Compute adler32 checksum
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x10
mov ebp, dword [esp + 0x28]
test ebp, ebp
je 0x406b46
mov esi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x24]
movzx edi, cx
shr ecx, 0x10
test esi, esi
je 0x406b3f
mov edx, 0x5e6ea9af
mov eax, esi
mul edx
shr edx, 0xb
imul eax, edx, 0x15b0
mov ebx, esi
sub ebx, eax
jmp 0x406a06
mov eax, dword [esp + 4]
sub eax, dword [esp]
add ebp, eax
mov esi, dword [esp + 0xc]
mov eax, edi
mov edx, 0x80078071
mul edx
mov ebx, edx
shr ebx, 0xf
mov eax, ecx
mov edx, 0x80078071
mul edx
imul eax, ebx, 0xfff1
sub edi, eax
shr edx, 0xf
imul eax, edx, 0xfff1
sub ecx, eax
sub esi, dword [esp + 4]
mov ebx, 0x15b0
je 0x406b3f
xor edx, edx
cmp ebx, 8
mov dword [esp + 4], ebx
mov dword [esp + 0xc], esi
jb 0x406aa9
and ebx, 0x1ff8
mov dword [esp], ebx
mov edx, 7
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, byte [ebp + edx - 6]
movzx esi, byte [ebp + edx - 7]
add esi, edi
add ecx, esi
add esi, eax
mov eax, ecx
and eax, esi
mov dword [esp + 8], eax
xor ecx, esi
movzx edi, byte [ebp + edx - 5]
add edi, esi
mov eax, ebp
movzx ebp, byte [ebp + edx - 4]
add ebp, edi
movzx esi, byte [eax + edx - 3]
mov ebx, ebp
and ebx, esi
xor esi, ebp
lea esi, [esi + ebx*2]
mov ebx, dword [esp + 4]
add edi, ecx
mov ecx, dword [esp + 8]
lea ecx, [edi + ecx*2]
add ecx, ebp
mov ebp, eax
movzx eax, byte [eax + edx - 2]
add eax, esi
add ecx, esi
movzx esi, byte [ebp + edx - 1]
add esi, eax
add ecx, eax
movzx edi, byte [ebp + edx]
add edi, esi
add ecx, esi
add ecx, edi
add edx, 8
cmp edx, ebx
jb 0x406a30
add ebp, edx
add ebp, 0xfffffff9
mov esi, dword [esp + 0xc]
mov edx, dword [esp]
mov eax, edx
sub eax, ebx
jae 0x4069cd
mov dword [esp + 8], eax
mov eax, ebx
and eax, 3
mov dword [esp], edx
je 0x406aef
neg eax
xor ebx, ebx
mov edx, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, byte [edx]
inc edx
add edi, esi
add ecx, edi
dec ebx
cmp eax, ebx
jne 0x406ad0
mov eax, dword [esp]
sub eax, ebx
cmp dword [esp + 8], 0xfffffffc
ja 0x4069c0
jmp 0x406afe
mov eax, edx
mov edx, ebp
cmp dword [esp + 8], 0xfffffffc
ja 0x4069c0
mov ebx, dword [esp + 4]
sub ebx, eax
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, byte [edx + eax]
add esi, edi
add ecx, esi
movzx edi, byte [edx + eax + 1]
add edi, esi
add ecx, edi
movzx esi, byte [edx + eax + 2]
add esi, edi
add ecx, esi
movzx edi, byte [edx + eax + 3]
add edi, esi
add ecx, edi
add eax, 4
cmp ebx, eax
jne 0x406b10
jmp 0x4069c0
shl ecx, 0x10
or ecx, edi
jmp 0x406b4b
mov ecx, 1
mov eax, ecx
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x406b60
Capabilities:
Encode data using xor

Disassembly:
push ebx
push edi
push esi
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x406b8e
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
test ebx, ebx
je 0x406c2c
not eax
test bl, 1
jne 0x406b95
mov edx, ebx
cmp ebx, 1
jne 0x406bc6
jmp 0x406c2a
xor eax, eax
jmp 0x406c2c
lea edx, [ebx - 1]
movzx esi, byte [ecx]
mov edi, eax
shr edi, 4
xor eax, esi
and eax, 0xf
xor edi, dword [eax*4 + 0x44bc50]
inc ecx
mov eax, edi
shr eax, 4
and edi, 0xf
shr esi, 4
xor esi, edi
xor eax, dword [esi*4 + 0x44bc50]
cmp ebx, 1
je 0x406c2a
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
nop
movzx edi, byte [ecx + esi]
mov ebx, eax
shr ebx, 4
xor eax, edi
and eax, 0xf
xor ebx, dword [eax*4 + 0x44bc50]
mov eax, ebx
shr eax, 4
and ebx, 0xf
shr edi, 4
xor edi, ebx
xor eax, dword [edi*4 + 0x44bc50]
movzx edi, byte [ecx + esi + 1]
mov ebx, eax
shr ebx, 4
xor eax, edi
and eax, 0xf
xor ebx, dword [eax*4 + 0x44bc50]
mov eax, ebx
shr eax, 4
and ebx, 0xf
shr edi, 4
xor edi, ebx
xor eax, dword [edi*4 + 0x44bc50]
add esi, 2
cmp edx, esi
jne 0x406bd0
not eax
pop esi
pop edi
pop ebx
ret
Function at 0x40c690
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 0x40c6fc
mov edi, edx
cmp dword [esp + 0x18], 0
je 0x40c6de
cmp ebx, 1
adc ebx, 0
cmp ebx, eax
jae 0x40c6e0
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 0x40c6c0
jmp 0x40c6e0
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 0x40c6fa
mov dword [edi], eax
mov dword [edi + 8], ebx
jmp 0x40c6fc
xor esi, esi
mov eax, esi
pop esi
pop edi
pop ebx
pop ebp
ret