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

Disassembly:
push esi
mov esi, ecx
mov edx, dword [esi + 0x4c]
test edx, edx
jne 0x4d985e
xor al, al
pop esi
ret
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x4d986b
mov ecx, dword [ecx + 4]
add ecx, dword [esi + 0x14]
push dword [esi + 0x18]
mov eax, dword [edx]
push ecx
mov ecx, edx
call dword [eax + 4]
cmp eax, 0xffffffff
je 0x4d985a
mov edx, dword [esi + 0x18]
cmp eax, edx
ja 0x4d985a
mov dword [esi + 0x2c], eax
mov dword [esi + 0x28], 1
cmp eax, 0x40
jb 0x4d985a
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x4d989e
mov ecx, dword [ecx + 4]
add ecx, dword [esi + 0x14]
mov eax, 0x5a4d
cmp ax, word [ecx]
jne 0x4d985a
mov ecx, dword [ecx + 0x3c]
xor eax, eax
mov dword [esi + 0x30], ecx
cmp eax, dword [esi + 0x24]
jb 0x4d98bc
ja 0x4d985a
cmp ecx, dword [esi + 0x20]
ja 0x4d985a
cmp ecx, edx
ja 0x4d985a
lea eax, [ecx + 0x108]
cmp eax, ecx
jbe 0x4d985a
cmp eax, edx
jae 0x4d985a
mov edx, dword [esi + 0xc]
test edx, edx
je 0x4d98db
mov edx, dword [edx + 4]
add edx, dword [esi + 0x14]
cmp dword [ecx + edx], 0x4550
jne 0x4d985a
xor eax, eax
cmp ax, word [ecx + edx + 0x14]
je 0x4d985a
movzx eax, word [ecx + edx + 0x18]
push edi
mov edi, 0x10b
cmp di, ax
jne 0x4d9964
cmp dword [ecx + edx + 0x74], 5
jb 0x4d99ec
mov eax, dword [ecx + edx + 0x98]
mov edi, 1
mov dword [esi + 0x34], eax
mov eax, dword [ecx + edx + 0x9c]
mov dword [esi + 0x38], eax
mov dword [esi + 0x40], 0x58
mov dword [esi + 0x44], 0x98
movzx eax, word [ecx + edx + 0x5c]
cmp di, ax
je 0x4d9956
mov edi, 8
cmp di, ax
je 0x4d9956
xor eax, eax
mov byte [esi + 0x4a], al
mov al, byte [ecx + edx + 0x5e]
jmp 0x4d99d2
mov eax, 1
mov byte [esi + 0x4a], al
mov al, byte [ecx + edx + 0x5e]
jmp 0x4d99d2
mov edi, 0x20b
cmp di, ax
jne 0x4d99e6
mov edi, dword [esi + 0xc]
test edi, edi
je 0x4d997b
mov edi, dword [edi + 4]
add edi, dword [esi + 0x14]
cmp dword [ecx + edi + 0x84], 5
jb 0x4d99ec
mov eax, dword [ecx + edi + 0xa8]
mov dword [esi + 0x34], eax
mov eax, dword [ecx + edi + 0xac]
push ebx
mov dword [esi + 0x38], eax
mov ebx, 1
mov dword [esi + 0x40], 0x58
mov dword [esi + 0x44], 0xa8
movzx eax, word [ecx + edi + 0x5c]
cmp bx, ax
je 0x4d99c5
mov ebx, 8
cmp bx, ax
je 0x4d99c5
xor eax, eax
jmp 0x4d99ca
mov eax, 1
mov byte [esi + 0x4a], al
mov al, byte [ecx + edi + 0x5e]
pop ebx
shr al, 7
and al, 1
mov byte [esi + 0x49], al
mov eax, dword [ecx + edx + 0xc]
mov dword [esi + 0x3c], eax
mov al, 1
pop edi
pop esi
ret
mov word [esi + 0x49], 0
pop edi
xor al, al
pop esi
ret

Function at 0x4da120
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ecx + 4]
test eax, eax
jne 0x4da134
or eax, 0xffffffff
mov esp, ebp
pop ebp
ret 8
cmp byte [0x5c6a90], 0
je 0x4da153
push dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov ecx, eax
call fcn.005029e0
add esp, 4
mov esp, ebp
pop ebp
ret 8
push 0
lea ecx, [ebp - 4]
push ecx
push dword [ebp + 0xc]
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4da12b
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret 8
Function at 0x4da1d0
Capabilities:
Get file size

Disassembly:
mov ecx, dword [ecx + 4]
test ecx, ecx
jne 0x4da1dd
or eax, 0xffffffff
xor edx, edx
ret
jmp fcn.00501bb0

Function at 0x4e0800
Capabilities:
Access peb ldr_data
Check for peb beingdebugged flag
Get kernel32 base address

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56532a
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x5c04b4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x14], esi
mov word [esi], 0x101
mov byte [esi + 2], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [ebp - 4], 0
lea ebx, [esi + 0xc]
mov dword [ebx], 0
mov dword [ebx + 4], 0
mov byte [ebp - 4], 1
mov dword [esi + 0x14], vtable.CArrayNoThrow_class_ByteArray__class_ByteArray_const__.0
mov dword [esi + 0x18], 0
mov dword [esi + 0x24], 0
mov dword [esi + 0x20], 0
mov dword [esi + 0x1c], 0
mov byte [ebp - 4], 2
mov dword [esi + 0x28], 0
mov dword [esi + 0x2c], 0
mov byte [ebp - 4], 3
mov dword [esi + 0x30], 0
mov dword [esi + 0x34], 0
mov byte [ebp - 4], 4
mov dword [esi + 0x38], 0
mov dword [esi + 0x3c], 0
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x1c]
mov byte [esi + 0x40], 0
call fcn.004df2c0
mov ecx, eax
mov dword [ebp - 0x10], ecx
mov byte [ebp - 4], 8
or edx, 0xffffffff
cmp ebx, ecx
je 0x4e0922
mov edi, dword [ebx + 4]
test edi, edi
je 0x4e0908
lea eax, [edi + 4]
lock xadd dword [eax], edx
jne 0x4e0905
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov ecx, dword [ebp - 0x10]
mov dword [ebx], 0
mov dword [ebx + 4], 0
or edx, 0xffffffff
mov eax, dword [ecx]
mov dword [ebx], eax
mov eax, dword [ecx + 4]
mov dword [ebx + 4], eax
test eax, eax
je 0x4e0922
add eax, 4
mov ecx, 1
lock xadd dword [eax], ecx
mov byte [ebp - 4], 7
mov edi, dword [ebp - 0x18]
test edi, edi
je 0x4e0952
lea eax, [edi + 4]
lock xadd dword [eax], edx
dec edx
jne 0x4e0952
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 4], 0xffffffff
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4e26b0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x565827
mov eax, dword fs:[0]
push eax
sub esp, 8
mov eax, dword [0x5c04b4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], ecx
lea eax, [ecx + 4]
mov word [ecx], 0
mov dword [eax], vtable.ByteArray.0
mov dword [ebp - 0x14], eax
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov dword [ebp - 4], 2
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], 0
mov dword [ebp - 4], 3
lea eax, [ecx + 0x18]
mov dword [eax], vtable.ByteArray.0
mov dword [ebp - 0x14], eax
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov byte [ebp - 4], 6
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], 0
mov byte [ebp - 4], 7
mov dword [ecx + 0x2c], vtable.CArrayNoThrow_class_ASN1__class_ASN1_const__.0
mov dword [ecx + 0x30], 0
mov dword [ecx + 0x3c], 0
mov dword [ecx + 0x38], 0
mov dword [ecx + 0x34], 0
mov dword [ebp - 4], 0xffffffff
mov eax, ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret

Function at 0x4e2780
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x565887
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x5c04b4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x10], ebx
lea ecx, [ebx + 4]
mov dword [ecx], vtable.ByteArray.0
mov dword [ebp - 0x14], ecx
mov dword [ecx + 4], 0
mov dword [ecx + 8], 0
mov dword [ebp - 4], 2
mov dword [ecx + 0xc], 0
mov dword [ecx + 0x10], 0
mov dword [ebp - 4], 3
lea esi, [ebx + 0x18]
mov dword [esi], vtable.ByteArray.0
mov dword [ebp - 0x14], esi
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov byte [ebp - 4], 6
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov byte [ebp - 4], 7
mov dword [ebx + 0x2c], vtable.CArrayNoThrow_class_ASN1__class_ASN1_const__.0
mov dword [ebx + 0x30], 0
mov dword [ebx + 0x3c], 0
mov dword [ebx + 0x38], 0
mov dword [ebx + 0x34], 0
mov byte [ebp - 4], 8
mov edi, dword [ebp + 8]
movzx eax, byte [edi + 1]
mov byte [ebx + 1], al
movzx eax, byte [edi]
mov byte [ebx], al
lea eax, [edi + 4]
cmp ecx, eax
je 0x4e2856
push eax
call fcn.004dd640
lea eax, [edi + 0x18]
cmp esi, eax
je 0x4e2865
push eax
mov ecx, esi
call fcn.004dd640
lea eax, [edi + 0x2c]
push eax
lea ecx, [ebx + 0x2c]
call fcn.004e38c0
mov dword [ebp - 4], 0xffffffff
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x4e28e0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5658e7
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x5c04b4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x10], edi
mov bl, byte [ebp + 8]
lea eax, [edi + 4]
mov byte [edi], bl
mov dword [eax], vtable.ByteArray.0
mov dword [ebp + 8], eax
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov dword [ebp - 4], 2
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], 0
mov dword [ebp - 4], 3
lea esi, [edi + 0x18]
mov dword [esi], vtable.ByteArray.0
mov dword [ebp + 8], esi
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov byte [ebp - 4], 6
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov byte [ebp - 4], 7
mov dword [edi + 0x2c], vtable.CArrayNoThrow_class_ASN1__class_ASN1_const__.0
mov dword [edi + 0x30], 0
mov dword [edi + 0x3c], 0
mov dword [edi + 0x38], 0
mov dword [edi + 0x34], 0
mov byte [ebp - 4], 8
push ecx
push 2
mov ecx, esi
call fcn.004ddc60
mov eax, dword [esi + 4]
mov ecx, dword [eax + 4]
mov eax, dword [esi + 0xc]
mov byte [ecx + eax], bl
mov eax, dword [esi + 4]
mov ecx, dword [eax + 4]
mov eax, dword [esi + 0xc]
mov byte [ecx + eax + 1], 0
mov al, byte [edi + 1]
and al, 0xfc
or al, 4
mov byte [edi + 1], al
mov dword [ebp - 4], 0xffffffff
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x4e29f0
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x565947
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x5c04b4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x10], esi
lea eax, [esi + 4]
mov word [esi], 0x104
mov dword [eax], vtable.ByteArray.0
mov dword [ebp - 0x14], eax
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov dword [ebp - 4], 2
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], 0
mov dword [ebp - 4], 3
lea edi, [esi + 0x18]
mov dword [edi], vtable.ByteArray.0
mov dword [ebp - 0x14], edi
mov dword [edi + 4], 0
mov dword [edi + 8], 0
mov byte [ebp - 4], 6
mov dword [edi + 0xc], 0
mov dword [edi + 0x10], 0
mov byte [ebp - 4], 7
mov dword [esi + 0x2c], vtable.CArrayNoThrow_class_ASN1__class_ASN1_const__.0
mov dword [esi + 0x30], 0
mov dword [esi + 0x3c], 0
mov dword [esi + 0x38], 0
mov dword [esi + 0x34], 0
mov byte [ebp - 4], 8
lea eax, [ebp + 0xc]
mov ebx, dword [ebp + 0xc]
push eax
push ecx
push dword [ebx + 0x10]
call fcn.004e3680
mov eax, dword [edi + 4]
mov ecx, dword [eax + 4]
mov eax, dword [edi + 0xc]
mov byte [ecx + eax], 4
mov ecx, dword [edi + 4]
test ecx, ecx
jne 0x4e2ad7
xor eax, eax
jmp 0x4e2add
mov eax, dword [edi + 0xc]
add eax, dword [ecx + 4]
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebx + 4]
add edx, eax
test ecx, ecx
jne 0x4e2aed
xor eax, eax
jmp 0x4e2af3
mov eax, dword [ebx + 0xc]
add eax, dword [ecx + 4]
push dword [ebx + 0x10]
push eax
push edx
call sub.MSVCR120.dll_memcpy
add esp, 0xc
lea ecx, [esi + 4]
push dword [ebx + 0x10]
push dword [ebp + 0xc]
push edi
call fcn.004ddff0
mov al, byte [esi + 1]
and al, 0xfc
or al, 4
mov byte [esi + 1], al
mov dword [ebp - 4], 0xffffffff
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x4e5eb0
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
mov dword [ebp - 4], 0
cmp dword [esi + 0x10], 0
je 0x4e5eff
mov eax, dword [esi + 8]
test eax, eax
je 0x4e5ed2
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0x1388
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4e5eef
push 0
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [esi + 0x10]
call dword [0x5c001c]
mov dword [esi + 0x10], 0
mov eax, dword [esi + 0xc]
test eax, eax
je 0x4e5f25
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov eax, dword [esi + 8]
test eax, eax
jne 0x4e5f2c
push eax
push eax
push eax
push eax
call dword [0x5c0018]
mov dword [esi + 8], eax
test eax, eax
jne 0x4e5f33
xor al, al
pop esi
mov esp, ebp
pop ebp
ret
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
lea eax, [ebp - 4]
push eax
push 0
push esi
push 0x4e5e20
push 0
push 0
call dword [0x5c00f8]
xor ecx, ecx
mov dword [esi + 0x10], eax
test eax, eax
pop esi
setne al
mov esp, ebp
pop ebp
ret

Function at 0x4e5f60
Capabilities:
Terminate thread

Disassembly:
push esi
mov esi, ecx
cmp dword [esi + 0x10], 0
je 0x4e5fa4
mov eax, dword [esi + 8]
test eax, eax
je 0x4e5f77
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0x1388
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4e5f94
push 0
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [esi + 0x10]
call dword [0x5c001c]
mov dword [esi + 0x10], 0
pop esi
ret 4

Function at 0x4e8e30
Capabilities:
Hash data with md5

Disassembly:
add ecx, 4
je 0x4e8e5e
mov dword [ecx + 0x14], 0
mov dword [ecx + 0x10], 0
mov dword [ecx], 0x67452301
mov dword [ecx + 4], 0xefcdab89
mov dword [ecx + 8], 0x98badcfe
mov dword [ecx + 0xc], 0x10325476
ret
Function at 0x4f1530
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
mov ebx, ecx
mov dword [ebp - 0x28], edx
xor al, al
push esi
mov byte [ebp - 5], al
mov eax, dword [ebx + 0x14]
push edi
mov edi, dword [ebp + 8]
test eax, eax
je 0x4f1554
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebx + 0x10]
cmp byte [0x5c6a90], 0
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov esi, eax
test esi, esi
jne 0x4f157b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x4f157b
mov esi, 1
neg esi
sbb esi, esi
neg esi
dec esi
test esi, esi
jne 0x4f16ef
cmp byte [0x5c6a90], 0
mov eax, dword [ebx + 0x10]
je 0x4f15d2
push 0xe
push 8
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x1c], esi
push ecx
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x18], esi
push ecx
push eax
call dword [0x5c0080]
mov esi, eax
push esi
call dword [0x5c00a8]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
jns 0x4f15ca
or eax, 0xffffffff
or ecx, eax
jmp 0x4f160e
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
jmp 0x4f160e
push 0
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x14], 0
push ecx
push 0
push eax
mov dword [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x14], eax
cmp eax, 0xffffffff
jne 0x4f160b
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4f1608
or eax, 0xffffffff
or ecx, eax
jmp 0x4f160e
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x10]
cmp eax, 0xffffffff
jne 0x4f161b
cmp ecx, eax
je 0x4f16ef
cmp byte [0x5c6a90], 0
mov eax, dword [ebx + 0x10]
push 0
je 0x4f1675
xor ecx, ecx
push ecx
push 0x38
push edi
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], ecx
lea ecx, [ebp - 0x24]
push ecx
push 0
push 0
push 0
push eax
call dword [0x5c0260]
mov esi, eax
cmp esi, 0xc0000011
jne 0x4f1659
mov dword [ebp - 0x20], 0
xor esi, esi
push esi
call dword [0x5c00a8]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
jns 0x4f1670
or eax, 0xffffffff
jmp 0x4f168f
mov eax, dword [ebp - 0x20]
jmp 0x4f168f
lea ecx, [ebp - 0x2c]
push ecx
push 0x38
push edi
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4f168c
or eax, 0xffffffff
jmp 0x4f168f
mov eax, dword [ebp - 0x2c]
cmp eax, 0x38
jne 0x4f16ef
cmp dword [edi], 0xcf9bf378
jne 0x4f16b4
mov ecx, dword [edi + 4]
cmp ecx, eax
jae 0x4f16b4
sub eax, ecx
push eax
lea eax, [ecx + edi]
push 0
push eax
call sub.MSVCR120.dll_memset
add esp, 0xc
mov eax, dword [edi + 0x1c]
cmp eax, dword [ebx + 0x34]
jne 0x4f16c4
mov eax, dword [edi + 0x20]
cmp eax, dword [ebx + 0x38]
je 0x4f16ef
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x4f16e8
mov eax, dword [edi + 0x24]
cmp eax, dword [ebx + 0x3c]
jne 0x4f16e5
mov eax, dword [edi + 0x28]
cmp eax, dword [ebx + 0x40]
jne 0x4f16e5
mov al, 1
mov byte [ecx], 0
mov byte [ebp - 5], al
jmp 0x4f16f2
mov byte [ecx], 1
mov al, 1
mov byte [ebp - 5], al
jmp 0x4f16f2
mov al, byte [ebp - 5]
mov ecx, dword [ebx + 0x14]
test ecx, ecx
je 0x4f1703
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, byte [ebp - 5]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4f1710
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
cmp byte [0x5c6a90], 0
mov eax, ecx
mov ecx, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
push esi
mov esi, dword [eax + 0x10]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x28], edx
je 0x4f1789
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], eax
test eax, eax
jg 0x4f1757
jl 0x4f174c
test ecx, ecx
jae 0x4f1757
push 0x19
call ebx
or eax, 0xffffffff
or ecx, eax
jmp 0x4f17bc
push 0xe
push 8
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x30]
push eax
push esi
call dword [0x5c0080]
mov esi, eax
push esi
call dword [0x5c00a8]
push eax
call ebx
test esi, esi
jns 0x4f1781
or eax, 0xffffffff
or ecx, eax
jmp 0x4f17bc
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
jmp 0x4f17bc
push 0
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
push ecx
push esi
mov dword [ebp - 0xc], ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
jne 0x4f17b9
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4f17b6
or eax, 0xffffffff
or ecx, eax
jmp 0x4f17bc
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
cmp eax, 0xffffffff
jne 0x4f17c9
cmp ecx, eax
je 0x4f185f
cmp byte [0x5c6a90], 0
mov eax, dword [ebp - 0x20]
push 0
mov eax, dword [eax + 0x10]
je 0x4f1822
xor ecx, ecx
push ecx
push 0x24
push edi
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], ecx
lea ecx, [ebp - 0x14]
push ecx
push 0
push 0
push 0
push eax
call dword [0x5c0260]
mov esi, eax
cmp esi, 0xc0000011
jne 0x4f180a
mov dword [ebp - 0x10], 0
xor esi, esi
push esi
call dword [0x5c00a8]
push eax
call ebx
test esi, esi
jns 0x4f181d
or eax, 0xffffffff
jmp 0x4f183c
mov eax, dword [ebp - 0x10]
jmp 0x4f183c
lea ecx, [ebp - 0x24]
push ecx
push 0x24
push edi
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4f1839
or eax, 0xffffffff
jmp 0x4f183c
mov eax, dword [ebp - 0x24]
cmp eax, 0x24
jne 0x4f185f
cmp dword [edi], 0x638bcfdc
jne 0x4f185f
mov eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x4f1856
cmp eax, dword [edi + 0x10]
jne 0x4f185f
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4f1870
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
cmp byte [0x5c6a90], 0
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, ecx
mov ebx, edx
mov ecx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x10]
mov edx, dword [esi + 0x10]
mov dword [ebp - 0x10], esi
je 0x4f18ed
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], eax
test eax, eax
jg 0x4f18b4
jl 0x4f18a5
test ecx, ecx
jae 0x4f18b4
push 0x19
call dword [sym.imp.KERNEL32.dll_SetLastError]
or eax, 0xffffffff
or ecx, eax
jmp 0x4f1920
push 0xe
push 8
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x28]
push eax
push edx
call dword [0x5c0080]
mov esi, eax
push esi
call dword [0x5c00a8]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
mov esi, dword [ebp - 0x10]
jns 0x4f18e5
or eax, 0xffffffff
or ecx, eax
jmp 0x4f1920
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
jmp 0x4f1920
push 0
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
push ecx
push edx
mov dword [ebp - 0xc], ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
jne 0x4f191d
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4f191a
or eax, 0xffffffff
or ecx, eax
jmp 0x4f1920
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
cmp eax, 0xffffffff
jne 0x4f1929
cmp ecx, eax
je 0x4f1970
test edi, edi
je 0x4f1970
cmp byte [0x5c6a90], 0
mov eax, dword [esi + 0x10]
je 0x4f1948
push ebx
mov edx, edi
mov ecx, eax
call fcn.005029e0
add esp, 4
jmp 0x4f1963
push 0
lea ecx, [ebp - 0x20]
push ecx
push ebx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4f1960
or eax, 0xffffffff
jmp 0x4f1963
mov eax, dword [ebp - 0x20]
cmp ebx, eax
jne 0x4f1970
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4f34f0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov eax, edx
push esi
mov esi, ecx
mov dword [ebp - 4], eax
mov ebx, eax
mov dword [ebp - 8], ebx
and ecx, 3
je 0x4f353a
mov edx, 4
sub edx, ecx
cmp edx, eax
jbe 0x4f3516
mov edx, eax
xor ecx, ecx
test edx, edx
je 0x4f3531
lea esp, [esp]
mov al, byte [ecx + esi]
sub al, 0x54
xor al, 0xa5
mov byte [ecx + esi], al
inc ecx
cmp ecx, edx
jb 0x4f3520
mov eax, ebx
mov ebx, eax
sub ebx, edx
add esi, ecx
mov dword [ebp - 8], ebx
mov ecx, ebx
shr ecx, 2
push edi
xor edi, edi
mov dword [ebp - 0xc], ecx
test ecx, ecx
je 0x4f3597
mov ebx, ecx
jmp 0x4f3550
mov ecx, dword [esi + edi*4]
lea edx, [ecx - 0x5400]
and edx, 0xff00
lea eax, [ecx - 0x54000000]
and eax, 0xff000000
or edx, eax
lea eax, [ecx - 0x54]
and eax, 0xff
or edx, eax
lea eax, [ecx - 0x540000]
and eax, 0xff0000
or edx, eax
xor edx, 0xa5a5a5a5
mov dword [esi + edi*4], edx
inc edi
cmp edi, ebx
jb 0x4f3550
mov ebx, dword [ebp - 8]
mov eax, dword [ebp - 4]
lea edx, [esi + edi*4]
mov ecx, 0
pop edi
and ebx, 3
jbe 0x4f35b7
mov al, byte [ecx + edx]
sub al, 0x54
xor al, 0xa5
mov byte [ecx + edx], al
inc ecx
cmp ecx, ebx
jb 0x4f35a5
mov eax, dword [ebp - 4]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4f35c0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov eax, edx
mov esi, ecx
mov dword [ebp - 4], eax
push edi
mov edi, eax
mov dword [ebp - 8], edi
and ecx, 3
je 0x4f360a
mov edx, 4
sub edx, ecx
cmp edx, eax
jbe 0x4f35e7
mov edx, eax
xor ecx, ecx
test edx, edx
je 0x4f3601
lea ecx, [ecx]
mov al, byte [ecx + esi]
xor al, 0xa5
add al, 0x54
mov byte [ecx + esi], al
inc ecx
cmp ecx, edx
jb 0x4f35f0
mov eax, edi
mov edi, eax
sub edi, edx
add esi, ecx
mov dword [ebp - 8], edi
mov ecx, edi
xor ebx, ebx
shr ecx, 2
mov dword [ebp - 0xc], ecx
test ecx, ecx
je 0x4f3667
mov edi, ecx
lea ebx, [ebx]
mov ecx, dword [esi + ebx*4]
xor ecx, 0xa5a5a5a5
lea edx, [ecx + 0x54000000]
and edx, 0xff000000
lea eax, [ecx + 0x5400]
and eax, 0xff00
or edx, eax
lea eax, [ecx + 0x540000]
and eax, 0xff0000
or edx, eax
lea eax, [ecx + 0x54]
and eax, 0xff
or edx, eax
mov dword [esi + ebx*4], edx
inc ebx
cmp ebx, edi
jb 0x4f3620
mov edi, dword [ebp - 8]
mov eax, dword [ebp - 4]
lea edx, [esi + ebx*4]
mov ecx, 0
and edi, 3
jbe 0x4f3686
mov al, byte [ecx + edx]
xor al, 0xa5
add al, 0x54
mov byte [ecx + edx], al
inc ecx
cmp ecx, edi
jb 0x4f3674
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret