joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10051920
Capabilities:
Read file on windows

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
push esi
mov esi, ecx
push edi
mov edi, eax
mov eax, dword [esi + 0x38c]
sub eax, dword [esi + 0x388]
sar eax, 4
cmp ebx, eax
jae 0x10051a41
mov ecx, dword [esi + 0x38c]
sub ecx, dword [esi + 0x388]
sar ecx, 4
cmp ebx, ecx
jb 0x1005195b
call fcn.10062881
mov edx, dword [esi + 0x388]
shl ebx, 4
mov eax, dword [ebx + edx + 8]
lea ebx, [ebx + edx + 8]
test eax, eax
je 0x10051a41
cmp eax, 0xffffffff
je 0x10051a41
mov ecx, dword [esp + 0x18]
xor edx, edx
push edx
push edx
push edx
add ecx, 0x2c
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x100519a1
call fcn.10002d30
pop edi
pop esi
pop ebp
pop ebx
ret 0x10
mov ecx, dword [esp + 0x1c]
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea eax, [esp + 0x18]
push eax
push edi
mov dword [esp + 0x20], 0
mov edx, dword [ebx]
push ecx
push edx
call ebp
test eax, eax
jne 0x10051a2a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6f8
je 0x100519ee
cmp eax, 0x3e6
je 0x100519ee
test eax, eax
jle 0x10051a46
and eax, 0xffff
or eax, 0x80070000
pop edi
pop esi
pop ebp
pop ebx
ret 0x10
call fcn.10051a50
mov esi, eax
test esi, esi
jne 0x10051a05
mov eax, 0x8007000e
pop edi
pop esi
pop ebp
pop ebx
ret 0x10
mov ecx, dword [ebx]
push 0
lea eax, [esp + 0x18]
push eax
push edi
push esi
push ecx
call ebp
test eax, eax
je 0x10051995
mov edx, dword [esp + 0x1c]
push edi
push esi
push edx
call fcn.10064ea0
add esp, 0xc
mov eax, dword [esp + 0x20]
test eax, eax
je 0x10051a38
mov ecx, dword [esp + 0x14]
mov dword [eax], ecx
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret 0x10
mov eax, 0x80004005
pop edi
pop esi
pop ebp
pop ebx
ret 0x10
Function at 0x10053bc0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
sub esp, 0x214
mov eax, dword [0x100de040]
xor eax, esp
mov dword [esp + 0x210], eax
mov eax, dword [esp + 0x218]
push ebx
mov ebx, dword [esp + 0x220]
push ebp
push esi
push edi
mov dword [esp + 0x14], ecx
lea ebx, [ebx]
movzx ecx, word [eax]
cmp cx, 0x20
je 0x10053bff
cmp cx, 9
jne 0x10053c04
add eax, 2
jmp 0x10053bf0
cmp word [eax], 0x22
mov ebp, dword [sym.imp.SHLWAPI.dll_StrChrW]
mov dword [esp + 0x10], eax
jne 0x10053c21
lea edi, [eax + 2]
push 0x22
lea edx, [edi + 2]
push edx
call ebp
jmp 0x10053c42
lea esi, [eax + 2]
push 0x20
push esi
call ebp
push 9
push esi
mov edi, eax
call ebp
test edi, edi
je 0x10053c3e
test eax, eax
je 0x10053c3c
cmp edi, eax
jae 0x10053c3e
mov eax, edi
mov edi, dword [esp + 0x10]
test eax, eax
jne 0x10053c50
mov eax, 0xe0032002
jmp 0x10053d32
sub eax, edi
sar eax, 1
mov esi, eax
cmp esi, 0x104
mov dword [esp + 0x10], esi
jge 0x10053c46
push 0x5c
push edi
call ebp
test eax, eax
je 0x10053c80
add esi, esi
push esi
push edi
push ebx
call fcn.10064ea0
add esp, 0xc
xor eax, eax
mov word [esi + ebx], ax
jmp 0x10053cc1
mov ecx, dword [esp + 0x14]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x5c
push 0
push ebx
call dword [sym.imp.SHLWAPI.dll_StrRChrW]
mov esi, eax
test esi, esi
jne 0x10053ca7
mov eax, 0x80004005
jmp 0x10053d32
mov ebp, dword [esp + 0x10]
add ebp, ebp
push ebp
add esi, 2
push edi
push esi
call fcn.10064ea0
add esp, 0xc
xor edx, edx
mov word [esi + ebp], dx
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push ebx
call ebp
cmp eax, 0xffffffff
jne 0x10053d30
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x22]
push ecx
mov word [esp + 0x24], ax
call fcn.10064e10
mov edi, dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
add esp, 0xc
push ebx
call edi
cmp word [eax], 0
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
je 0x10053d06
push eax
lea edx, [esp + 0x1c]
push edx
call esi
mov eax, dword [esp + 0x14]
push eax
push ebx
call esi
push ebx
call edi
cmp word [esp + 0x18], 0
je 0x10053d21
lea ecx, [esp + 0x18]
push ecx
push eax
call esi
push ebx
call ebp
cmp eax, 0xffffffff
jne 0x10053d30
mov eax, 0xe0032001
jmp 0x10053d32
xor eax, eax
mov ecx, dword [esp + 0x220]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.10062448
add esp, 0x214
ret 8
Function at 0x10054ab0
Capabilities:
Get disk information via ioctl
Get disk size

Disassembly:
sub esp, 0x5c
mov eax, dword [0x100de040]
xor eax, esp
mov dword [esp + 0x58], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push ebp
mov ebp, dword [esp + 0x68]
xor eax, eax
push esi
xor esi, esi
push esi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
lea eax, [esp + 0x10]
push eax
push 0x28
lea ecx, [esp + 0x44]
push ecx
push esi
push esi
push 0x24050
push edi
mov dword [esp + 0x2c], esi
call ebx
test eax, eax
je 0x10054b4e
cmp dword [esp + 0xc], esi
je 0x10054b4e
cmp dword [esp + 0x4c], 0x800
jne 0x10054be3
mov eax, dword [esp + 0x54]
mov edx, dword [esp + 0x50]
mov dword [ebp + 4], eax
mov dword [ebp], edx
xor eax, eax
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.10062448
add esp, 0x5c
ret 4
push esi
lea ecx, [esp + 0x10]
push ecx
push 0x18
lea edx, [esp + 0x44]
push edx
push esi
push esi
push 0x2404c
push edi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], esi
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], esi
call ebx
test eax, eax
je 0x10054be3
cmp dword [esp + 0xc], esi
je 0x10054be3
cmp esi, 0x800
jne 0x10054be3
push esi
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
lea eax, [esp + 0x10]
push eax
push 8
lea ecx, [esp + 0x1c]
push ecx
push esi
push esi
push 0x7405c
push edi
mov dword [esp + 0x2c], esi
call ebx
test eax, eax
je 0x10054be3
cmp dword [esp + 0xc], esi
je 0x10054be3
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov eax, ebp
mov dword [eax], edx
mov dword [eax + 4], ecx
xor eax, eax
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.10062448
add esp, 0x5c
ret 4
mov ecx, dword [esp + 0x64]
pop esi
pop ebp
pop ebx
xor ecx, esp
mov eax, 0xe003200c
call fcn.10062448
add esp, 0x5c
ret 4
Function at 0x10054ce0
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x100ac388
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x100de040]
xor eax, esp
mov dword [esp + 0x38], eax
push ebx
push esi
push edi
mov eax, dword [0x100de040]
xor eax, esp
push eax
lea eax, [esp + 0x50]
mov dword fs:[0], eax
mov si, cx
mov ebx, dword [ebp + 0xc]
xor eax, eax
mov dword [esp + 0x22], eax
mov dword [esp + 0x26], eax
mov dword [esp + 0x2a], eax
mov dword [esp + 0x2e], eax
mov word [esp + 0x32], ax
push 0x100d50ec
lea eax, [esp + 0x24]
push eax
xor edi, edi
mov word [esp + 0x28], si
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 5
je 0x10054d65
mov eax, 0xe003200c
jmp 0x10054e3b
xor eax, eax
mov dword [esp + 0x36], eax
mov dword [esp + 0x3a], eax
mov dword [esp + 0x3e], eax
mov dword [esp + 0x42], eax
mov word [esp + 0x46], ax
movzx eax, si
push eax
lea ecx, [esp + 0x38]
xor edx, edx
push str.._c:
push ecx
mov word [esp + 0x40], dx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push edi
push edi
push 3
push edi
push 1
push connect
lea edx, [esp + 0x4c]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [esp + 0x10], esi
mov dword [esp + 0x58], edi
cmp esi, 0xffffffff
jne 0x10054dc7
call fcn.10002d30
jmp 0x10054e3b
lea eax, [esp + 0x14]
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], edi
push eax
mov edi, esi
call fcn.10054ab0
mov edi, eax
test edi, edi
jl 0x10054e32
cmp edi, 1
je 0x10054e32
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
mov ecx, dword [ebx]
mov ecx, dword [ecx + 0x38]
push edx
push eax
push ebx
call ecx
mov edi, eax
test edi, edi
jl 0x10054e32
cmp edi, 1
je 0x10054e32
mov eax, dword [ebp + 8]
test ax, ax
je 0x10054e1c
push eax
call fcn.10054c00
mov edi, eax
test edi, edi
jl 0x10054e27
cmp edi, 1
je 0x10054e27
mov edi, ebx
mov ecx, esi
call fcn.10054e60
mov edi, eax
lea esi, [esp + 0x10]
call fcn.1000fee0
jmp 0x10054e39
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov ecx, dword [esp + 0x50]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x38]
xor ecx, esp
call fcn.10062448
mov esp, ebp
pop ebp
ret 8
Function at 0x1005a5c0
Capabilities:
Write file on windows

Disassembly:
push ecx
push 0
lea eax, [esp + 4]
push eax
mov eax, dword [esp + 0x10]
push ecx
push edx
push eax
mov dword [esp + 0x14], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1005a5f0
call fcn.10002d30
mov ecx, dword [esp + 0xc]
mov dword [ecx], eax
xor eax, eax
pop ecx
ret
mov eax, dword [esp]
pop ecx
ret
Function at 0x1005d820
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x108
mov eax, dword [0x100de040]
xor eax, esp
mov dword [esp + 0x104], eax
push 0x100
lea eax, [esp + 8]
push 0
push eax
call fcn.10064e10
mov ecx, dword [esi]
mov ecx, dword [ecx + 0xc]
mov eax, dword [esi + 4]
add esp, 0xc
push 0
lea edx, [esp + 4]
push edx
push ecx
lea ecx, [esp + 0x10]
push ecx
push eax
mov dword [esp + 0x14], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1005d878
call fcn.10002d30
mov dword [esi + 0x18], eax
mov ecx, dword [esp + 0x104]
xor ecx, esp
mov eax, 1
call fcn.10062448
add esp, 0x108
ret

Function at 0x1005d8a0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0xa08
mov eax, dword [0x100de040]
xor eax, esp
mov dword [esp + 0xa04], eax
push 0xa00
lea eax, [esp + 8]
push 0
push eax
call fcn.10064e10
mov ecx, dword [esi]
mov ecx, dword [ecx + 0x10]
mov eax, dword [esi + 4]
add esp, 0xc
push 0
lea edx, [esp + 4]
push edx
push ecx
lea ecx, [esp + 0x10]
push ecx
push eax
mov dword [esp + 0x14], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1005d8f8
call fcn.10002d30
mov dword [esi + 0x18], eax
mov ecx, dword [esp + 0xa04]
xor ecx, esp
mov eax, 1
call fcn.10062448
add esp, 0xa08
ret
Function at 0x1005f310
Capabilities:
Get disk size

Disassembly:
sub esp, 0x218
mov eax, dword [0x100de040]
xor eax, esp
mov dword [esp + 0x214], eax
push esi
push edi
xor eax, eax
push 0x206
mov esi, ecx
push eax
lea ecx, [esp + 0x1a]
push ecx
mov word [esp + 0x1c], ax
call fcn.10064e10
lea edi, [esi + 0x84]
push 0x5c
push edi
call fcn.10063e38
add esp, 0x14
test eax, eax
jne 0x1005f35b
mov eax, 0x80004005
jmp 0x1005f3b8
sub eax, esi
sub eax, 0x84
sar eax, 1
inc eax
push eax
push edi
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
push 0
push 0
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
test eax, eax
jne 0x1005f391
call fcn.10002d30
jmp 0x1005f3b8
mov esi, dword [esi + 0x4c]
mov edx, dword [esp + 0xc]
add esi, dword [esp + 0x224]
xor eax, eax
cmp edx, eax
jb 0x1005f3b3
ja 0x1005f3af
mov eax, dword [esp + 8]
cmp eax, esi
jbe 0x1005f3b3
xor eax, eax
jmp 0x1005f3b8
mov eax, 0x80070070
mov ecx, dword [esp + 0x21c]
pop edi
pop esi
xor ecx, esp
call fcn.10062448
add esp, 0x218
ret 4
Function at 0x10062448
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x100de040]
jne 0x10062452
repz ret
jmp fcn.10064b6e

Function at 0x1006f8a3
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.1006538d
and dword [ebp - 4], 0
cmp dword [0x100e3d74], 0
mov ebx, eax
jne 0x1006f954
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x1006fa05
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x1006fa05
push eax
call fcn.1006531b
mov dword [esp], 0x100af3e8
push edi
mov dword [0x100e3d74], eax
call esi
push eax
call fcn.1006531b
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x100e3d78], eax
call esi
push eax
call fcn.1006531b
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x100e3d7c], eax
call esi
push eax
call fcn.1006531b
pop ecx
mov dword [0x100e3d84], eax
test eax, eax
je 0x1006f954
push 0x100af3a0
push edi
call esi
push eax
call fcn.1006531b
pop ecx
mov dword [0x100e3d80], eax
mov eax, dword [0x100e3d80]
cmp eax, ebx
je 0x1006f9ac
cmp dword [0x100e3d84], ebx
je 0x1006f9ac
push eax
call fcn.10065396
push dword [0x100e3d84]
mov esi, eax
call fcn.10065396
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x1006f9ac
test edi, edi
je 0x1006f9ac
call esi
test eax, eax
je 0x1006f9a3
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x1006f9a3
test byte [ebp - 0xc], 1
jne 0x1006f9ac
or dword [ebp + 0x10], 0x200000
jmp 0x1006f9e5
mov eax, dword [0x100e3d78]
cmp eax, ebx
je 0x1006f9e5
push eax
call fcn.10065396
pop ecx
test eax, eax
je 0x1006f9e5
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x1006f9e5
mov eax, dword [0x100e3d7c]
cmp eax, ebx
je 0x1006f9e5
push eax
call fcn.10065396
pop ecx
test eax, eax
je 0x1006f9e5
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x100e3d74]
call fcn.10065396
pop ecx
test eax, eax
je 0x1006fa05
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x1006fa07
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x10075e50
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x100ab699
mov eax, dword fs:[0]
push eax
sub esp, 8
mov eax, dword [0x100de040]
xor eax, esp
mov dword [esp + 4], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x100de040]
xor eax, esp
push eax
lea eax, [esp + 0x1c]
mov dword fs:[0], eax
mov ebx, dword [esp + 0x2c]
mov edi, ecx
mov dword [esp + 0x14], edi
xor ebp, ebp
mov dword [edi], vtable.CAPEDecompressOld.0
mov dword [esp + 0x24], ebp
mov dword [edi + 0xc], 1
mov dword [edi + 4], ebp
lea ecx, [edi + 0x2c]
mov byte [esp + 0x24], 1
call fcn.10078ee0
lea esi, [edi + 0x60]
mov dword [esi + 8], 1
mov dword [esi], ebp
mov ecx, esi
mov byte [esp + 0x24], 3
mov dword [ebx], ebp
call fcn.10076310
mov eax, dword [esp + 0x30]
push ebp
push ebp
mov ecx, eax
push 0x3e8
mov dword [esi + 8], 1
mov dword [esi + 4], ebp
mov dword [esi], eax
call fcn.10077510
cmp eax, 0xf50
jle 0x10075ef9
mov dword [ebx], 0xffffffff
jmp 0x10075f9a
mov ecx, dword [esi]
push ebp
push ebp
push 0x3ef
call fcn.10077510
mov ebx, dword [esp + 0x34]
cmp ebx, ebp
mov dword [edi + 0x14], eax
mov dword [edi + 0x10], ebp
mov dword [edi + 0x6c], ebp
mov dword [edi + 0x18], ebp
mov dword [edi + 0x24], ebp
jge 0x10075f22
xor eax, eax
jmp 0x10075f46
mov ecx, dword [esi]
push ebp
push ebp
push 0x3f8
call fcn.10077510
cmp ebx, eax
jge 0x10075f38
mov eax, ebx
jmp 0x10075f46
mov ecx, dword [esi]
push ebp
push ebp
push 0x3f8
call fcn.10077510
mov ecx, dword [esi]
mov ebx, dword [esp + 0x38]
push ebp
push ebp
push 0x3f8
mov dword [edi + 0x1c], eax
call fcn.10077510
cmp ebx, ebp
jl 0x10075f75
cmp ebx, eax
jge 0x10075f67
mov eax, ebx
jmp 0x10075f75
mov ecx, dword [esi]
push ebp
push ebp
push 0x3f8
call fcn.10077510
mov dword [edi + 0x20], eax
cmp dword [edi + 0x1c], ebp
jne 0x10075f92
mov esi, dword [esi]
push ebp
push ebp
push 0x3f8
mov ecx, esi
call fcn.10077510
cmp dword [edi + 0x20], eax
je 0x10075f97
mov ebp, 1
mov dword [edi + 0x28], ebp
mov eax, edi
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 4]
xor ecx, esp
call fcn.10062448
add esp, 0x14
ret 0x10
Function at 0x10079020
Capabilities:
Encode data using xor

Disassembly:
sub esp, 8
mov ecx, dword [esp + 0x14]
push ebx
push ebp
xor eax, eax
push esi
xor ebp, ebp
push edi
mov dword [esp + 0x10], eax
cmp ecx, 2
jne 0x10079111
xor edi, edi
cmp dword [esp + 0x28], ecx
mov dword [esp + 0x24], ebp
jl 0x100790c9
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
sub eax, ecx
lea esi, [ecx + 4]
mov dword [esp + 0x14], eax
lea ecx, [ecx]
mov ebx, dword [esi - 4]
mov ecx, dword [esp + 0x1c]
mov ecx, dword [ecx + edi*4]
mov eax, ebx
cdq
sub eax, edx
sar eax, 1
sub ecx, eax
lea eax, [ebx + ecx]
cdq
mov ebx, eax
xor ebx, edx
sub ebx, edx
mov eax, ecx
cdq
xor eax, edx
sub eax, edx
add eax, ebp
lea ebp, [eax + ebx]
mov ebx, dword [esi]
mov eax, ebx
cdq
sub eax, edx
mov edx, dword [esp + 0x14]
mov ecx, dword [edx + esi]
sar eax, 1
sub ecx, eax
lea eax, [ebx + ecx]
cdq
mov ebx, eax
xor ebx, edx
sub ebx, edx
mov eax, ecx
cdq
xor eax, edx
sub eax, edx
add eax, dword [esp + 0x24]
add edi, 2
add eax, ebx
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x28]
dec eax
add esi, 8
cmp edi, eax
jl 0x10079060
mov eax, dword [esp + 0x10]
cmp edi, dword [esp + 0x28]
jge 0x100790ff
mov eax, dword [esp + 0x20]
mov ecx, dword [eax + edi*4]
mov eax, ecx
cdq
sub eax, edx
mov edx, dword [esp + 0x1c]
mov edi, dword [edx + edi*4]
sar eax, 1
sub edi, eax
lea eax, [ecx + edi]
cdq
mov ecx, eax
xor ecx, edx
sub ecx, edx
mov eax, edi
cdq
xor eax, edx
sub eax, edx
add ecx, eax
mov dword [esp + 0x10], ecx
mov eax, ecx
mov ecx, dword [esp + 0x24]
pop edi
pop esi
add ecx, ebp
pop ebp
add eax, ecx
pop ebx
add esp, 8
ret 0x10
cmp ecx, 1
jne 0x10079160
mov ebx, dword [esp + 0x28]
mov esi, dword [esp + 0x1c]
xor edi, edi
xor ecx, ecx
cmp ebx, 2
jl 0x1007914c
dec ebx
mov eax, dword [esi + ecx*4]
cdq
xor eax, edx
sub eax, edx
add edi, eax
mov eax, dword [esi + ecx*4 + 4]
cdq
xor eax, edx
sub eax, edx
add ecx, 2
add ebp, eax
cmp ecx, ebx
jl 0x10079128
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x28]
cmp ecx, ebx
jge 0x1007915c
mov eax, dword [esi + ecx*4]
cdq
xor eax, edx
sub eax, edx
mov dword [esp + 0x10], eax
add ebp, edi
add eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 0x10
Function at 0x1007b9c0
Capabilities:
Read file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0x10]
push ebp
push esi
push edi
mov edi, dword [esp + 0x20]
mov eax, 1
mov ebp, ecx
mov dword [esp + 0x10], 0
mov esi, ebx
mov dword [edi], eax
test ebx, ebx
jle 0x1007ba15
cmp dword [edi], 0
jbe 0x1007ba15
test eax, eax
je 0x1007ba15
mov eax, dword [esp + 0x18]
mov ecx, dword [ebp + 4]
push 0
push edi
sub eax, esi
push esi
add eax, ebx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, 1
jne 0x1007ba11
mov ecx, dword [edi]
sub esi, ecx
add dword [esp + 0x10], ecx
test esi, esi
jg 0x1007b9e4
mov edx, dword [esp + 0x10]
neg eax
mov dword [edi], edx
pop edi
sbb eax, eax
pop esi
and eax, 0xfffffc18
pop ebp
add eax, 0x3e8
pop ebx
pop ecx
ret 0xc

Function at 0x1007ce30
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x100abe38
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x100de040]
xor eax, esp
push eax
lea eax, [esp + 0x14]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x10], esi
mov eax, dword [esp + 0x2c]
push eax
call fcn.1007ad50
mov ebx, dword [esp + 0x28]
cmp ebx, 0xf28
mov edi, dword [esp + 0x24]
mov dword [esp + 0x1c], 0
mov dword [esi], vtable.CUnBitArrayOld.0
mov ecx, 0x40000
jg 0x1007cec5
mov edx, dword [edi]
mov eax, dword [edx + 0xc]
push 0
push 0
push 0x3f0
mov ecx, edi
call eax
imul eax, eax, 0x32
cdq
and edx, 7
add eax, edx
sar eax, 3
mov ecx, 0x10000
cmp eax, ecx
jle 0x1007cebe
mov edi, edi
add ecx, ecx
cmp ecx, eax
jl 0x1007ceb0
cmp ecx, 0x40000
jg 0x1007ced2
mov ecx, 0x40000
jmp 0x1007ced2
cmp ebx, 0xf32
jg 0x1007ced2
mov ecx, 0x10000
mov edx, dword [edi]
mov eax, dword [edx + 0xc]
push ebx
push ecx
push 0
push 0
push 0x403
mov ecx, edi
call eax
push eax
mov ecx, esi
call fcn.1007af30
cmp dword [esi + 0x14], 0xf28
mov eax, esi
jg 0x1007cf1a
mov ecx, dword [esi + 0xc]
sub ecx, 0x20000
mov dword [esi + 0x30], ecx
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x10
ret 0xc
mov edx, dword [esi + 0xc]
sub edx, 0x200
mov dword [esi + 0x30], edx
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x10
ret 0xc

Function at 0x1007d7a0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov edx, ecx
cmp dword [edx + 0x34], 0x800000
ja 0x1007d801
push esi
push edi
mov edi, dword [edx + 0x24]
mov eax, dword [edx + 0x20]
mov esi, eax
and esi, 0x1f
mov ecx, 0x18
sub ecx, esi
mov esi, eax
shr esi, 5
mov esi, dword [edi + esi*4]
shl dword [edx + 0x34], 8
add eax, 8
mov dword [edx + 0x20], eax
mov eax, dword [edx + 0x38]
shr esi, cl
mov ecx, dword [edx + 0x30]
shl eax, 8
shl ecx, 8
and esi, 0xff
or eax, esi
mov dword [edx + 0x38], eax
shr eax, 1
and eax, 0xff
or eax, ecx
mov dword [edx + 0x30], eax
cmp dword [edx + 0x34], 0x800000
jbe 0x1007d7b0
pop edi
pop esi
mov ecx, dword [esp + 4]
shr dword [edx + 0x34], cl
mov ecx, dword [edx + 0x34]
mov eax, dword [edx + 0x30]
xor edx, edx
div ecx
ret 4
Function at 0x1007d820
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push esi
mov esi, ecx
cmp dword [esi + 0x34], 0x800000
push edi
ja 0x1007d87f
mov edi, dword [esi + 0x24]
mov eax, dword [esi + 0x20]
mov edx, eax
and edx, 0x1f
mov ecx, 0x18
sub ecx, edx
mov edx, eax
shr edx, 5
mov edx, dword [edi + edx*4]
shl dword [esi + 0x34], 8
add eax, 8
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0x38]
shr edx, cl
mov ecx, dword [esi + 0x30]
shl eax, 8
shl ecx, 8
and edx, 0xff
or eax, edx
mov dword [esi + 0x38], eax
shr eax, 1
and eax, 0xff
or eax, ecx
mov dword [esi + 0x30], eax
cmp dword [esi + 0x34], 0x800000
jbe 0x1007d830
mov edi, dword [esi + 0x30]
mov ecx, dword [esp + 0xc]
shr dword [esi + 0x34], cl
mov ecx, dword [esi + 0x34]
mov eax, edi
xor edx, edx
div ecx
imul ecx, eax
sub edi, ecx
mov dword [esi + 0x30], edi
pop edi
pop esi
ret 4
Function at 0x1009d550
Capabilities:
Encode data using xor

Disassembly:
mov ecx, dword [esp + 4]
xor edx, edx
cmp ecx, edx
je 0x1009d5f0
push ebx
push ebp
push esi
mov esi, dword [ecx]
push edi
xor eax, eax
mov byte [esi + 0x16], dl
mov esi, dword [ecx]
mov byte [esi + 0x17], dl
mov esi, dword [ecx]
mov byte [esi + 0x18], dl
mov esi, dword [ecx]
mov byte [esi + 0x19], dl
mov edi, dword [ecx + 4]
xor esi, esi
cmp edi, edx
jle 0x1009d5a2
mov ebp, dword [ecx]
xor edx, edx
mov ebx, eax
mov dl, byte [esi + ebp]
shr ebx, 0x18
xor edx, ebx
shl eax, 8
mov edx, dword [edx*4 + 0x100b7288]
xor eax, edx
inc esi
cmp esi, edi
jl 0x1009d583
xor edx, edx
mov edi, dword [ecx + 0xc]
xor esi, esi
cmp edi, edx
jle 0x1009d5cb
mov ebp, dword [ecx + 8]
xor edx, edx
mov ebx, eax
mov dl, byte [esi + ebp]
shr ebx, 0x18
xor edx, ebx
shl eax, 8
mov edx, dword [edx*4 + 0x100b7288]
xor eax, edx
inc esi
cmp esi, edi
jl 0x1009d5ae
mov edx, dword [ecx]
pop edi
mov byte [edx + 0x16], al
mov esi, dword [ecx]
mov edx, eax
shr edx, 8
mov byte [esi + 0x17], dl
mov esi, dword [ecx]
mov edx, eax
shr edx, 0x10
mov byte [esi + 0x18], dl
mov ecx, dword [ecx]
shr eax, 0x18
pop esi
pop ebp
mov byte [ecx + 0x19], al
pop ebx
ret