joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4d9cd0
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52a468
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x575054]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov edi, ecx
push 0xb
mov ecx, esi
call fcn.00405910
push eax
mov ecx, edi
call fcn.00405910
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x4d9d22
mov al, 1
jmp 0x4d9e10
lea ecx, [ebp - 0x58]
xor bl, bl
call fcn.00403340
mov dword [ebp - 4], 0
lea edx, [ebp - 0x58]
mov ecx, edi
call fcn.004da410
test al, al
movzx ebx, bl
mov ecx, 1
cmovne ebx, ecx
lea ecx, [ebp - 0x40]
call fcn.00403340
mov byte [ebp - 4], 1
lea edx, [ebp - 0x40]
mov ecx, esi
call fcn.004da410
test al, al
jne 0x4d9d68
test bl, bl
je 0x4d9d86
push 0xb
lea ecx, [ebp - 0x40]
call fcn.00405910
push eax
lea ecx, [ebp - 0x58]
call fcn.00405910
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x4d9dda
mov ecx, esi
call fcn.004d9b20
cmp eax, 0xffffffff
je 0x4d9df1
push esi
lea ecx, [ebp - 0x28]
call fcn.00405990
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x28]
call fcn.004da1d0
test al, al
je 0x4d9de5
lea edx, [ebp - 0x28]
mov ecx, esi
call fcn.004d9bc0
test al, al
je 0x4d9de5
mov edx, esi
mov ecx, edi
call fcn.004d9bc0
lea ecx, [ebp - 0x28]
test al, al
je 0x4d9dde
call fcn.004d9e30
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x28]
call fcn.004032a0
mov bl, 1
jmp 0x4d9df3
mov edx, esi
call fcn.004d9bc0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x28]
call fcn.004032a0
xor bl, bl
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x40]
call fcn.004032a0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x58]
call fcn.004032a0
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0050f27d
mov esp, ebp
pop ebp
ret
Function at 0x4d9e30
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52a4b0
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x575054]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
call fcn.00405910
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push eax
call edi
test eax, eax
je 0x4d9e76
mov al, 1
jmp 0x4d9f6b
mov ecx, esi
call fcn.00405910
push eax
lea ecx, [ebp - 0x28]
call fcn.004032f0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x28]
call fcn.004d9b20
mov ebx, eax
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.004032a0
cmp ebx, 0xffffffff
jne 0x4d9eb5
xor al, al
jmp 0x4d9f6b
mov ecx, esi
call fcn.00405910
push eax
lea ecx, [ebp - 0x28]
call fcn.004032f0
mov dword [ebp - 4], 1
xor edx, edx
lea ecx, [ebp - 0x28]
call fcn.004d9a60
mov bl, al
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.004032a0
test bl, bl
je 0x4d9eae
mov ecx, esi
call fcn.00405910
push eax
call edi
test eax, eax
jne 0x4d9e6f
lea ecx, [ebp - 0x28]
call fcn.00403340
mov dword [ebp - 4], 2
lea edx, [ebp - 0x28]
mov ecx, esi
call fcn.004da410
test al, al
je 0x4d9f2d
lea ecx, [ebp - 0x28]
call fcn.00405910
push eax
call edi
test eax, eax
je 0x4d9f2d
mov bl, 1
jmp 0x4d9f5a
mov ecx, esi
call fcn.00405910
push eax
lea ecx, [ebp - 0x44]
call fcn.004032f0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x44]
mov edx, dword [ebp - 0x2c]
call fcn.004d9a60
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x44]
call fcn.004032a0
xor bl, bl
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.004032a0
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0050f27d
mov esp, ebp
pop ebp
ret
Function at 0x4d9f90
Capabilities:
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x624]
sub esp, 0x624
push 0xffffffffffffffff
push 0x52a4e8
mov eax, dword fs:[0]
push eax
push ecx
mov eax, dword [0x575054]
xor eax, ebp
mov dword [ebp + 0x620], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
push 4
lea ecx, [ebp - 0x10]
call fcn.00403fa0
push 0x579218
lea ecx, [ebp - 0x10]
call fcn.00409150
mov dword [ebp - 4], 0
mov ecx, 0x57921c
call fcn.004058f0
test al, al
jne 0x4da039
push 0x57921c
call fcn.004036c0
add esp, 4
cmp esi, eax
je 0x4da023
mov ecx, 0x57921c
call fcn.00403360
mov edx, eax
cmp dword [eax + 0x14], 8
jb 0x4da018
mov edx, dword [eax]
push dword [eax + 0x10]
push edx
mov ecx, esi
call fcn.004033d0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.00409180
mov al, 1
jmp 0x4da0f8
push 0x20c
lea eax, [ebp + 0x414]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp + 0x414]
push eax
push 0x105
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
dec eax
cmp eax, 0x103
ja 0x4da0e7
xor eax, eax
push 0x412
push eax
mov word [ebp + 0x61e], ax
lea eax, [ebp]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp]
push 0x208
push eax
lea eax, [ebp + 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
cmp eax, 0x208
ja 0x4da0cb
test eax, eax
je 0x4da0cb
add eax, eax
cmp eax, 0x412
jae 0x4da119
xor ecx, ecx
mov word [ebp + eax], cx
lea eax, [ebp]
push eax
call fcn.004035e0
add esp, 4
push eax
lea eax, [ebp]
push eax
jmp 0x4da01c
lea eax, [ebp + 0x414]
push eax
call fcn.004035e0
add esp, 4
push eax
lea eax, [ebp + 0x414]
push eax
jmp 0x4da01c
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.00409180
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp + 0x620]
xor ecx, ebp
call fcn.0050f27d
lea esp, [ebp + 0x624]
pop ebp
ret
call fcn.0050f7ee
int3

Function at 0x4da120
Capabilities:
Get common file path

Disassembly:
sub esp, 0x210
mov eax, dword [0x575054]
xor eax, esp
mov dword [esp + 0x20c], eax
push ebx
mov ebx, dword [esp + 0x218]
lea eax, [esp + 4]
push esi
push edi
push 0x20c
push 0
push eax
mov esi, edx
mov edi, ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [esp + 0xc]
mov ecx, esi
push eax
push 0
call fcn.00405910
push eax
mov ecx, edi
call fcn.00405910
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x4da1b5
xor eax, eax
mov word [esp + 0x216], ax
lea eax, [esp + 0xc]
push eax
call fcn.004035e0
add esp, 4
mov ecx, ebx
push eax
lea eax, [esp + 0x10]
push eax
call fcn.004033d0
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [esp + 0x20c]
xor ecx, esp
call fcn.0050f27d
add esp, 0x210
ret
mov ecx, dword [esp + 0x218]
xor al, al
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0050f27d
add esp, 0x210
ret
Function at 0x4ddc40
Capabilities:
Check os version

Disassembly:
sub esp, 0x118
mov eax, dword [0x575054]
xor eax, esp
mov dword [esp + 0x114], eax
push esi
mov esi, ecx
mov dword [esp + 4], 0x114
push 0x110
lea eax, [esp + 0xc]
push 0
push eax
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x20], 0
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
mov byte [esi], 0
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
mov eax, esi
je 0x4ddcd7
cmp dword [esp + 8], 6
jb 0x4ddcd7
mov byte [esi], 1
mov ecx, dword [esp + 0x118]
pop esi
xor ecx, esp
call fcn.0050f27d
add esp, 0x118
ret

Function at 0x4ddcf0
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52aa50
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push esi
push edi
mov eax, dword [0x575054]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
push str.wintrust.dll
lea ecx, [ebp - 0x28]
call fcn.004032f0
mov dword [ebp - 4], 0
lea eax, [ebp - 0x28]
push eax
call fcn.004ccc10
mov ecx, eax
call fcn.004cccd0
mov ebx, eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.004032a0
push str.crypt32.dll
lea ecx, [ebp - 0x40]
call fcn.004032f0
mov dword [ebp - 4], 1
lea eax, [ebp - 0x40]
push eax
call fcn.004ccc10
mov ecx, eax
call fcn.004cccd0
mov esi, eax
mov dword [ebp - 0x10], esi
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
call fcn.004032a0
test ebx, ebx
je 0x4dde05
test esi, esi
je 0x4dde05
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CryptCATAdminCalcHashFromFileHandle
push ebx
call esi
push str.CryptCATAdminAcquireContext
push ebx
mov dword [edi + 4], eax
call esi
push str.CryptCATAdminEnumCatalogFromHash
push ebx
mov dword [edi + 8], eax
call esi
push str.CryptCATCatalogInfoFromContext
push ebx
mov dword [edi + 0xc], eax
call esi
push str.CryptCATAdminReleaseCatalogContext
push ebx
mov dword [edi + 0x10], eax
call esi
push str.CryptCATAdminReleaseContext
push ebx
mov dword [edi + 0x14], eax
call esi
push str.WTHelperProvDataFromStateData
push ebx
mov dword [edi + 0x18], eax
call esi
push str.WTHelperGetProvSignerFromChain
push ebx
mov dword [edi + 0x1c], eax
call esi
push str.WinVerifyTrust
push ebx
mov dword [edi + 0x20], eax
call esi
push str.CertNameToStrW
push dword [ebp - 0x10]
mov dword [edi + 0x24], eax
call esi
mov dword [edi + 0x28], eax
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 0x4e1c70
Capabilities:
Get number of processors

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x528aef
mov eax, dword fs:[0]
push eax
push ecx
push esi
push edi
mov eax, dword [0x575054]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push edx
push 0x94
call fcn.00402320
mov esi, dword [ebp + 8]
add esp, 8
mov edi, eax
mov ecx, eax
mov dword [ebp - 0x10], edi
push esi
call fcn.00405990
mov dword [ebp - 4], 0
lea ecx, [esi + 0x18]
push ecx
lea ecx, [edi + 0x18]
call fcn.00405990
mov byte [ebp - 4], 1
lea eax, [esi + 0x30]
push eax
lea ecx, [edi + 0x30]
call fcn.00405990
mov byte [ebp - 4], 2
lea eax, [esi + 0x48]
push eax
lea ecx, [edi + 0x48]
call fcn.00405990
mov byte [ebp - 4], 3
lea ecx, [edi + 0x64]
mov al, byte [esi + 0x60]
mov byte [edi + 0x60], al
lea eax, [esi + 0x64]
push eax
call fcn.00405990
mov byte [ebp - 4], 4
lea eax, [esi + 0x7c]
push eax
lea ecx, [edi + 0x7c]
call fcn.00405990
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x4e3860
Capabilities:
Get file size

Disassembly:
sub esp, 8
mov eax, dword [0x575054]
xor eax, esp
mov dword [esp + 4], eax
mov eax, dword [ecx]
push esi
push edi
mov edi, dword [esp + 0x14]
cmp eax, 0xffffffff
je 0x4e38c5
lea ecx, [esp + 8]
mov dword [esp + 8], 0
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4e38a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4e38c5
mov eax, dword [esp + 8]
xor ecx, ecx
add ecx, esi
mov dword [edi], ecx
adc eax, 0
mov dword [edi + 4], eax
mov al, 1
pop edi
pop esi
mov ecx, dword [esp + 4]
xor ecx, esp
call fcn.0050f27d
add esp, 8
ret 4
mov ecx, dword [esp + 0xc]
xor al, al
pop edi
pop esi
xor ecx, esp
call fcn.0050f27d
add esp, 8
ret 4
Function at 0x4e3a60
Capabilities:
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52b668
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x575054]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov ecx, dword [ebp + 0x14]
mov esi, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], ecx
test ecx, ecx
je 0x4e3aa9
mov dword [ecx], 0
mov dword [eax], 0
cmp dword [edi], 0xffffffff
je 0x4e3bfb
mov eax, dword [ebp + 0xc]
mov ecx, 0x100000
push 0
mov ebx, eax
mov dword [ebp - 0x1c], 0
cmp eax, 0x100000
lea eax, [ebp - 0x1c]
push eax
cmova ebx, ecx
push ebx
push esi
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
neg eax
sbb eax, eax
and eax, 0x7fffbffb
add eax, 0x80004005
cmp dword [edi + 0x1c], 0
je 0x4e3bc6
test eax, eax
je 0x4e3bc6
mov edx, dword [ebp - 0x1c]
cmp edx, ebx
jae 0x4e3bc9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [edi]
mov dword [ebp - 0x24], eax
cmp ecx, 0xffffffff
je 0x4e3b4b
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4e3b3f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4e3b4b
mov eax, dword [ebp - 0x14]
xor ecx, ecx
add ecx, esi
adc eax, 0
jmp 0x4e3b59
xorps xmm0, xmm0
movlpd qword [ebp - 0x38], xmm0
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x38]
push 0
push dword [ebp - 0x24]
push eax
push ecx
sub esp, 0x18
lea eax, [edi + 4]
mov ecx, esp
mov dword [ebp - 0x24], esp
push eax
call fcn.00405990
mov dword [ebp - 4], 0
mov ecx, dword [edi + 0x1c]
mov eax, dword [ecx]
mov dword [ebp - 4], 0xffffffff
call dword [eax + 0x18]
mov esi, dword [ebp - 0x20]
test eax, eax
jne 0x4e3bc6
push eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x1c]
push ebx
add eax, esi
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, eax
xor edx, edx
test ecx, ecx
mov eax, 0x80004005
cmovne eax, edx
mov edx, dword [ebp - 0x1c]
add edx, dword [ebp - 0x18]
mov dword [ebp - 0x1c], edx
test ecx, ecx
je 0x4e3b04
jmp 0x4e3bc9
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x28]
add dword [ecx], edx
test eax, eax
jne 0x4e3bf2
test edx, edx
je 0x4e3bee
mov eax, dword [ebp + 0xc]
add esi, edx
sub eax, edx
mov dword [ebp - 0x20], esi
mov dword [ebp + 0xc], eax
mov ecx, 0x100000
jne 0x4e3ac0
mov al, 1
jmp 0x4e3bfd
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
je 0x4e3bfb
mov dword [ecx], eax
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0050f27d
mov esp, ebp
pop ebp
ret 0x10
Function at 0x4e5120
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52b9f8
mov eax, dword fs:[0]
push eax
sub esp, 0x54
mov eax, dword [0x575054]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov edi, dword [ebp + 0x10]
mov ecx, edi
mov esi, dword [ebp + 0xc]
call fcn.004058f0
test al, al
jne 0x4e517a
cmp byte [ebp + 8], al
jne 0x4e5181
mov eax, dword [ebx]
test eax, eax
je 0x4e52e1
cmp byte [eax + 0xa5], 0
je 0x4e52e1
xor al, al
jmp 0x4e52f7
mov ecx, esi
call fcn.004058f0
test al, al
jne 0x4e52e1
push esi
call fcn.004bc390
add esp, 4
test al, al
je 0x4e51a9
push esi
push edi
call fcn.004e4d50
jmp 0x4e52dd
push 0xb
mov ecx, esi
call fcn.00405910
push eax
mov ecx, edi
call fcn.00405910
mov ebx, dword [sym.imp.KERNEL32.dll_MoveFileExW]
push eax
call ebx
test eax, eax
je 0x4e51ce
mov al, 1
jmp 0x4e52dd
lea ecx, [ebp - 0x58]
mov byte [ebp - 0x59], 0
call fcn.00403340
mov dword [ebp - 4], 0
lea edx, [ebp - 0x58]
mov ecx, edi
call fcn.004da410
movzx ecx, byte [ebp - 0x59]
test al, al
mov edx, 1
cmovne ecx, edx
mov dword [ebp - 0x60], ecx
lea ecx, [ebp - 0x40]
call fcn.00403340
mov byte [ebp - 4], 1
lea edx, [ebp - 0x40]
mov ecx, esi
call fcn.004da410
test al, al
jne 0x4e521b
cmp byte [ebp - 0x60], al
je 0x4e5257
push 0xb
lea ecx, [ebp - 0x40]
call fcn.00405910
push eax
lea ecx, [ebp - 0x58]
call fcn.00405910
push eax
call ebx
test eax, eax
je 0x4e5257
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x40]
call fcn.004032a0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x58]
call fcn.004032a0
mov al, 1
jmp 0x4e52dd
mov ecx, esi
call fcn.004d9b20
cmp eax, 0xffffffff
je 0x4e52c0
push esi
lea ecx, [ebp - 0x28]
call fcn.00405990
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x28]
call fcn.004da1d0
test al, al
je 0x4e52b4
lea edx, [ebp - 0x28]
mov ecx, esi
call fcn.004d9bc0
test al, al
je 0x4e52b4
mov edx, esi
mov ecx, edi
call fcn.004d9bc0
lea ecx, [ebp - 0x28]
test al, al
je 0x4e52ad
call fcn.004d9e30
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x28]
call fcn.004032a0
jmp 0x4e5235
mov edx, esi
call fcn.004d9bc0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x28]
call fcn.004032a0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x40]
call fcn.004032a0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x58]
call fcn.004032a0
xor al, al
test al, al
jne 0x4e52f5
push edi
call fcn.004bc390
add esp, 4
test al, al
je 0x4e52f5
mov ecx, edi
call fcn.004d9e30
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0050f27d
mov esp, ebp
pop ebp
ret 0xc
Function at 0x4f1680
Capabilities:
Enumerate threads
Suspend thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x575054]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x24], edx
push edi
push 0
push 4
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov edi, eax
cmp edi, 0xffffffff
je 0x4f177a
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0x1c
push eax
push edi
call dword [sym.imp.KERNEL32.dll_Thread32First]
test eax, eax
je 0x4f1773
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [ebp - 0x20], 0x10
jb 0x4f1759
call ebx
cmp dword [ebp - 0x14], eax
jne 0x4f1759
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [ebp - 0x18], eax
je 0x4f1759
mov edx, dword [esi]
test edx, edx
jne 0x4f1722
push 0x200
push edx
push dword [0x5790f4]
mov dword [esi + 4], 0x80
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esi], edx
test edx, edx
je 0x4f1773
jmp 0x4f174d
mov eax, dword [esi + 4]
cmp dword [esi + 8], eax
jb 0x4f174d
shl eax, 3
push eax
push edx
push 0
push dword [0x5790f4]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov edx, eax
test edx, edx
je 0x4f1773
mov eax, dword [esi + 4]
add eax, eax
mov dword [esi], edx
mov dword [esi + 4], eax
mov ecx, dword [esi + 8]
mov eax, dword [ebp - 0x18]
mov dword [edx + ecx*4], eax
inc dword [esi + 8]
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0x1c
push eax
push edi
call dword [sym.imp.KERNEL32.dll_Thread32Next]
test eax, eax
jne 0x4f16e1
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esi], 0
je 0x4f17bf
xor edi, edi
cmp dword [esi + 8], edi
jbe 0x4f17bf
mov eax, dword [esi]
push dword [eax + edi*4]
push 0
push 0x5a
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov ebx, eax
test ebx, ebx
je 0x4f17b9
push ebx
call dword [sym.imp.KERNEL32.dll_SuspendThread]
push dword [ebp + 8]
mov edx, dword [ebp - 0x24]
mov ecx, ebx
call fcn.004f1510
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc edi
cmp edi, dword [esi + 8]
jb 0x4f1786
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0050f27d
mov esp, ebp
pop ebp
ret

Function at 0x4f17d0
Capabilities:
Resume thread

Disassembly:
push ebx
mov ebx, ecx
mov eax, dword [ebx]
test eax, eax
je 0x4f181e
push esi
xor esi, esi
cmp dword [ebx + 8], esi
jbe 0x4f180e
push edi
mov eax, dword [ebx]
push dword [eax + esi*4]
push 0
push 0x5a
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov edi, eax
test edi, edi
je 0x4f1805
push edi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc esi
cmp esi, dword [ebx + 8]
jb 0x4f17e2
mov eax, dword [ebx]
pop edi
push eax
push 0
push dword [0x5790f4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop esi
pop ebx
ret
Function at 0x4f1820
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
imul esi, ecx, 0x2c
mov ebx, edx
push edi
add esi, dword [0x579870]
mov al, byte [esi + 0x14]
mov edi, dword [esi]
and al, 1
je 0x4f1840
sub edi, 5
movzx eax, al
lea ecx, [ebp - 4]
push ecx
push 0x40
lea eax, [eax*2 + 5]
push eax
push edi
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x4f186b
pop edi
pop esi
mov eax, 0xa
pop ebx
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x4f188c
mov byte [edi], 0xe9
mov eax, dword [esi + 4]
sub eax, edi
sub eax, 5
mov dword [edi + 1], eax
test byte [esi + 0x14], 1
je 0x4f18ad
mov eax, dword [esi]
mov word [eax], 0xf9eb
jmp 0x4f18ad
mov eax, dword [esi + 0xc]
test byte [esi + 0x14], 1
mov dword [edi], eax
je 0x4f18a7
mov ax, word [esi + 0x10]
mov word [edi + 4], ax
mov al, byte [esi + 0x12]
mov byte [edi + 6], al
jmp 0x4f18ad
mov al, byte [esi + 0x10]
mov byte [edi + 4], al
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push dword [ebp - 8]
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push dword [ebp - 8]
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov al, byte [esi + 0x14]
and bl, 1
mov cl, bl
and al, 0xfd
add cl, cl
shl bl, 2
or cl, al
and cl, 0xfb
or cl, bl
xor eax, eax
pop edi
mov byte [esi + 0x14], cl
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4f1900
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov edx, dword [0x579878]
push ebx
push esi
push edi
xor edi, edi
xor esi, esi
mov dword [ebp - 4], edi
mov ebx, ecx
test edx, edx
je 0x4f19f1
mov eax, dword [0x579870]
add eax, 0x14
movzx ecx, byte [eax]
shr ecx, 1
and ecx, 1
cmp ecx, ebx
jne 0x4f1945
inc esi
add eax, 0x2c
cmp esi, edx
jb 0x4f1928
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp esi, 0xffffffff
je 0x4f19f1
xor eax, eax
lea ecx, [ebp - 0x10]
test ebx, ebx
setne al
or edx, 0xffffffff
push eax
call fcn.004f1680
mov ecx, dword [0x579878]
add esp, 4
cmp esi, ecx
jae 0x4f19a5
imul edi, esi, 0x2c
mov eax, dword [0x579870]
movzx eax, byte [edi + eax + 0x14]
shr eax, 1
and eax, 1
cmp eax, ebx
je 0x4f199a
mov edx, ebx
mov ecx, esi
call fcn.004f1820
mov dword [ebp - 4], eax
test eax, eax
jne 0x4f19a2
mov ecx, dword [0x579878]
inc esi
add edi, 0x2c
cmp esi, ecx
jb 0x4f1971
mov edi, dword [ebp - 4]
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4f19f1
xor esi, esi
cmp dword [ebp - 8], esi
jbe 0x4f19e2
mov edi, eax
push dword [edi + esi*4]
push 0
push 0x5a
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov ebx, eax
test ebx, ebx
je 0x4f19d6
push ebx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc esi
cmp esi, dword [ebp - 8]
jb 0x4f19b5
mov edi, dword [ebp - 4]
mov eax, dword [ebp - 0x10]
push eax
push 0
push dword [0x5790f4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret