joyce8/EMBER2024-capa huggingface dataset:
Function at 0x449a40
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push 0xffffffffffffffff
push 0x4ce578
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4f59b8]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
mov dword [esp + 0x14], ecx
mov dword [ecx], vtable.CPFBase_class_COSCARParser_.0
mov eax, dword [ecx + 0x10]
mov eax, dword [eax]
lea edi, [ecx + 0xc]
xor ebx, ebx
mov esi, edi
mov ebp, eax
mov dword [esp + 0x30], ebx
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], ebp
jmp 0x449a90
cmp esi, ebx
mov ecx, dword [edi + 4]
mov dword [esp + 0x24], ecx
je 0x449a9f
cmp esi, edi
je 0x449aa4
call fcn.0049f4bd
cmp ebp, dword [esp + 0x24]
je 0x449b32
cmp esi, ebx
jne 0x449ab7
call fcn.0049f4bd
cmp ebp, dword [esi + 4]
jne 0x449ac1
call fcn.0049f4bd
mov esi, dword [ebp + 0x14]
cmp esi, ebx
je 0x449b1c
cmp dword [esi + 0x4c], 0x10
jb 0x449ada
mov edx, dword [esi + 0x38]
push edx
call fcn.0049f16d
add esp, 4
mov dword [esi + 0x4c], 0xf
mov dword [esi + 0x48], ebx
mov byte [esi + 0x38], bl
mov eax, dword [esi + 0x28]
cmp eax, ebx
je 0x449afa
push eax
call fcn.0049fdaa
add esp, 4
mov dword [esi + 0x28], ebx
mov dword [esi + 0x2c], ebx
mov eax, dword [esi + 0x14]
cmp eax, ebx
je 0x449b10
push eax
call fcn.0049fdaa
add esp, 4
mov dword [esi + 0x14], ebx
push esi
mov dword [esi + 0x18], ebx
call fcn.0049f16d
add esp, 4
lea ecx, [esp + 0x18]
call fcn.00446c50
mov ebp, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
jmp 0x449a90
mov eax, dword [edi + 4]
mov ecx, dword [eax]
push eax
push edi
push ecx
push edi
lea eax, [esp + 0x30]
push eax
mov ecx, edi
call fcn.00448930
mov ecx, dword [edi + 4]
push ecx
call fcn.0049f16d
mov edx, dword [esp + 0x18]
mov dword [edi + 4], ebx
mov dword [edi + 8], ebx
add esp, 4
mov dword [edx], vtable.IProtocolFilter.0
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
Function at 0x456df0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4cf678
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4f59b8]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
mov dword [esp + 0x14], ecx
mov dword [ecx], vtable.CPFBase_class_CYMSGParser_.0
mov eax, dword [ecx + 0x10]
mov ebx, dword [eax]
lea edi, [ecx + 0xc]
xor ebp, ebp
mov esi, edi
mov dword [esp + 0x30], ebp
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], ebx
lea esp, [esp]
cmp esi, ebp
mov ecx, dword [edi + 4]
mov dword [esp + 0x24], ecx
je 0x456e4f
cmp esi, edi
je 0x456e54
call fcn.0049f4bd
cmp ebx, dword [esp + 0x24]
je 0x456ebc
cmp esi, ebp
jne 0x456e63
call fcn.0049f4bd
cmp ebx, dword [esi + 4]
jne 0x456e6d
call fcn.0049f4bd
mov esi, dword [ebx + 0x14]
cmp esi, ebp
je 0x456ea9
mov eax, dword [esi + 0x40]
cmp eax, ebp
je 0x456e87
push eax
call fcn.0049fdaa
add esp, 4
mov dword [esi + 0x40], ebp
mov dword [esi + 0x44], ebp
mov eax, dword [esi + 0x20]
cmp eax, ebp
je 0x456e9d
push eax
call fcn.0049fdaa
add esp, 4
mov dword [esi + 0x20], ebp
push esi
mov dword [esi + 0x24], ebp
call fcn.0049f16d
add esp, 4
lea ecx, [esp + 0x18]
call fcn.00455710
mov ebx, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
jmp 0x456e40
mov eax, dword [edi + 4]
mov ecx, dword [eax]
push eax
push edi
push ecx
push edi
lea edx, [esp + 0x30]
push edx
mov ecx, edi
call fcn.00456540
mov eax, dword [edi + 4]
push eax
call fcn.0049f16d
mov ecx, dword [esp + 0x18]
mov dword [edi + 4], ebp
mov dword [edi + 8], ebp
add esp, 4
mov dword [ecx], vtable.IProtocolFilter.0
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret

Function at 0x463ab0
Capabilities:
Acquire debug privileges

Disassembly:
sub esp, 0x14
lea eax, [esp]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x463aea
lea ecx, [esp + 8]
push ecx
push 0x4d8088
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x463af4
mov edx, dword [esp]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0x14
ret
mov ecx, dword [esp]
push 0
push 0
push 0
lea eax, [esp + 0x10]
push eax
push 0
push ecx
mov dword [esp + 0x1c], 1
mov dword [esp + 0x28], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x463ae0
mov eax, dword [esp]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
add esp, 0x14
ret
Function at 0x465a00
Capabilities:
Enumerate process modules

Disassembly:
mov eax, 0x1008
call fcn.0049fd00
push esi
mov esi, dword [esp + 0x1010]
mov ecx, dword [esi + 4]
mov eax, dword [ecx]
mov dword [ecx], ecx
mov ecx, dword [esi + 4]
mov dword [ecx + 4], ecx
cmp eax, dword [esi + 4]
push edi
mov dword [esi + 8], 0
je 0x465a42
lea esp, [esp]
mov edi, dword [eax]
push eax
call fcn.0049f16d
add esp, 4
cmp edi, dword [esi + 4]
mov eax, edi
jne 0x465a30
lea eax, [esp + 0xc]
push eax
push 0x1000
lea ecx, [esp + 0x18]
push ecx
call sub.PSAPI.DLL_EnumProcesses
test eax, eax
jne 0x465a69
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
add esp, 0x1008
ret
mov eax, dword [esp + 0xc]
shr eax, 2
je 0x465aaf
push ebx
push ebp
lea ebp, [esp + 0x18]
mov dword [esp + 0x10], eax
lea esp, [esp]
mov edi, dword [esi + 4]
mov edx, dword [edi + 4]
push ebp
push edx
push edi
mov ecx, esi
call fcn.00464dc0
push 1
mov ecx, esi
mov ebx, eax
call fcn.00465310
mov dword [edi + 4], ebx
mov eax, dword [ebx + 4]
add ebp, 4
sub dword [esp + 0x10], 1
mov dword [eax], ebx
jne 0x465a80
pop ebp
pop ebx
pop edi
xor eax, eax
pop esi
add esp, 0x1008
ret
Function at 0x46a950
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4d0b18
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push esi
push edi
mov eax, dword [0x4f59b8]
xor eax, esp
push eax
lea eax, [esp + 0x34]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esp + 0x44]
xor edi, edi
push 0xffffffffffffffff
push edi
push eax
lea ecx, [esp + 0x18]
mov dword [esp + 0x30], 7
mov dword [esp + 0x2c], edi
mov word [esp + 0x1c], di
call fcn.00402ea0
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x4c]
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], edx
lea eax, [esp + 0xc]
push eax
lea ecx, [esi + 0xc]
mov dword [esp + 0x40], edi
call fcn.0046a8b0
mov eax, dword [esp + 0x28]
cmp eax, edi
je 0x46a9cf
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [esp + 0x24], 8
jb 0x46a9e3
mov ecx, dword [esp + 0x10]
push ecx
call fcn.0049f16d
add esp, 4
mov ecx, dword [esp + 0x34]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
add esp, 0x34
ret 0xc
Function at 0x480810
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
movzx eax, word [ebp + 0xc]
test eax, eax
je 0x4808b2
push 0x104
lea ecx, [ebp - 0x208]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push str.drivers_
push 0x104
lea edx, [ebp - 0x208]
push edx
call fcn.004a3821
add esp, 0xc
push 0x4f498c
push 0x104
lea eax, [ebp - 0x208]
push eax
call fcn.004a3821
add esp, 0xc
push str..sys
push 0x104
lea ecx, [ebp - 0x208]
push ecx
call fcn.004a3821
add esp, 0xc
lea edx, [ebp - 0x208]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4808b2
lea eax, [ebp - 0x208]
push eax
mov cx, word [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00482420
add esp, 0xc
mov dword [ebp - 0x20c], eax
push 0
push 1
push 0
call fcn.00480680
mov esp, ebp
pop ebp
ret

Function at 0x480b70
Capabilities:
Create service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x618
push esi
push edi
mov byte [ebp - 0x615], 0
mov dword [ebp - 0x614], 0
mov eax, dword [0x4f49d0]
mov dword [ebp - 0x610], eax
mov cx, word [0x4f49d4]
mov word [ebp - 0x60c], cx
push 0x1fa
push 0
lea edx, [ebp - 0x60a]
push edx
call fcn.0049fd30
add esp, 0xc
mov ecx, 7
mov esi, str.KHCap_Packet_Driver__KHCAP_
lea edi, [ebp - 0x408]
rep movsd dword es:[edi], dword [esi]
push 0x1e4
push 0
lea eax, [ebp - 0x3ec]
push eax
call fcn.0049fd30
add esp, 0xc
mov ecx, 6
mov esi, str.system32driversKHCAP.sys
lea edi, [ebp - 0x200]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
push 0x1e5
push 0
lea ecx, [ebp - 0x1e5]
push ecx
call fcn.0049fd30
add esp, 0xc
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x204], eax
cmp dword [ebp - 0x204], 0
jne 0x480c33
xor al, al
jmp 0x480ce1
push 0
push 0
push 0
push 0
push 0
lea edx, [ebp - 0x200]
push edx
push 1
push 3
push 1
push 0xf01ff
lea eax, [ebp - 0x408]
push eax
lea ecx, [ebp - 0x610]
push ecx
mov edx, dword [ebp - 0x204]
push edx
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov dword [ebp - 0x40c], eax
cmp dword [ebp - 0x40c], 0
jne 0x480ca4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x614], eax
cmp dword [ebp - 0x614], 0x431
jne 0x480ca2
mov dword [ebp - 0x614], 0
mov byte [ebp - 0x615], 1
jmp 0x480cab
mov byte [ebp - 0x615], 1
cmp dword [ebp - 0x40c], 0
je 0x480cc1
mov eax, dword [ebp - 0x40c]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edx, dword [ebp - 0x204]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x614]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov al, byte [ebp - 0x615]
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x481860
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 8]
cmp dword [eax + 0x160], 0
jne 0x4818cf
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x4c], 0xffffffff
je 0x4818a7
mov edx, dword [ebp + 8]
cmp dword [edx + 0x4c], 0
jne 0x48188d
mov dword [ebp - 8], 0xffffffff
jmp 0x481896
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x4c]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x48]
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0
mov edx, dword [ebp + 0xc]
add edx, 0x20
push edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x1c]
push ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x18]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov byte [ebp - 1], al
jmp 0x4818d3
mov byte [ebp - 1], 0
mov al, byte [ebp - 1]
mov esp, ebp
pop ebp
ret

Function at 0x482420
Capabilities:
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push 0x4f4b18
movzx eax, word [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x48244e
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x48251f
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x482470
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x48251f
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x48248e
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x48251f
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x4824ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x48251f
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
mov ecx, dword [ebp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
jne 0x4824da
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x48251f
push 0
lea edx, [ebp - 4]
push edx
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x482513
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x20]
jmp 0x48251f
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x48b580
Capabilities:
Contain obfuscated stackstrings
Encode data using xor

Disassembly:
sub esp, 0x48
mov eax, dword [0x4f59b8]
xor eax, esp
mov dword [esp + 0x44], eax
push ebx
push esi
mov al, 0xea
push 0
mov ebx, ecx
mov cl, 0x8e
mov byte [esp + 0x15], al
mov byte [esp + 0x33], al
mov byte [esp + 0x49], al
mov eax, dword [esp + 0x5c]
push 0x44
mov esi, edx
mov dl, 0xb9
mov byte [esp + 0x1e], cl
mov byte [esp + 0x29], cl
mov ecx, dword [esp + 0x5c]
push eax
mov byte [esp + 0x14], 0x32
mov byte [esp + 0x15], 0xad
mov byte [esp + 0x16], 6
mov byte [esp + 0x17], 0xd
mov byte [esp + 0x18], 0x22
mov byte [esp + 0x19], 0xb8
mov byte [esp + 0x1a], 0x3e
mov byte [esp + 0x1b], 0xb5
mov byte [esp + 0x1c], 0x13
mov byte [esp + 0x1e], dl
mov byte [esp + 0x1f], 0x9b
mov byte [esp + 0x20], 0xfe
mov byte [esp + 0x21], 0x36
mov byte [esp + 0x23], 0xe1
mov byte [esp + 0x24], 0x92
mov byte [esp + 0x25], 0x30
mov byte [esp + 0x26], 0x46
mov byte [esp + 0x27], 0x35
mov byte [esp + 0x28], 0x9e
mov byte [esp + 0x29], 0x4d
mov byte [esp + 0x2a], 0x7f
mov byte [esp + 0x2b], 5
mov byte [esp + 0x2c], 0xaa
mov byte [esp + 0x2e], 0xf4
mov byte [esp + 0x2f], 0x88
mov byte [esp + 0x30], 0x13
mov byte [esp + 0x31], 0x5b
mov byte [esp + 0x32], 0xee
mov byte [esp + 0x33], 0x1e
mov byte [esp + 0x34], 0xf3
mov byte [esp + 0x35], dl
mov byte [esp + 0x36], 0x49
mov byte [esp + 0x37], 0xb3
mov byte [esp + 0x38], 0x58
mov byte [esp + 0x39], 0x96
mov byte [esp + 0x3a], 0x4e
mov byte [esp + 0x3c], 0x98
mov byte [esp + 0x3d], 0x7a
mov byte [esp + 0x3e], 0x75
mov byte [esp + 0x3f], 0xe2
mov byte [esp + 0x40], 0xe
mov byte [esp + 0x41], 0x83
mov byte [esp + 0x42], 0x22
mov byte [esp + 0x43], 0xd2
mov byte [esp + 0x44], 0x78
mov byte [esp + 0x45], 0x44
mov byte [esp + 0x46], 0x66
mov byte [esp + 0x47], 0xae
mov byte [esp + 0x48], 0xb0
mov byte [esp + 0x49], 0x61
mov byte [esp + 0x4a], 0x47
mov byte [esp + 0x4b], 0xd0
mov byte [esp + 0x4c], 0xbc
mov byte [esp + 0x4d], 0xbb
mov byte [esp + 0x4e], 0x60
mov byte [esp + 0x4f], 0xb6
mov byte [esp + 0x50], 0x79
mov byte [esp + 0x52], 0xa9
mov byte [esp + 0x53], 0x84
mov byte [esp + 0x54], 0x19
mov byte [esp + 0x55], 0x50
mov byte [esp + 0x56], 0x37
mov byte [esp + 0x57], 0xbf
push ecx
call fcn.004a4300
test ebx, ebx
mov ecx, eax
jbe 0x48b73b
push edi
mov edi, dword [esp + 0x60]
sub edi, esi
jmp 0x48b710
mov dl, byte [esp + ecx + 0xc]
xor dl, byte [edi + esi]
add ecx, 1
mov byte [esi], dl
mov eax, 0xf0f0f0f1
mul ecx
shr edx, 6
mov eax, edx
neg eax
shl eax, 4
sub eax, edx
add esi, 1
sub ebx, 1
lea ecx, [ecx + eax*4]
jne 0x48b710
pop edi
mov ecx, dword [esp + 0x4c]
pop esi
pop ebx
xor ecx, esp
call fcn.0049fcf1
add esp, 0x48
ret
Function at 0x48bd57
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x4f59b8]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.0048bbb6
mov eax, 0x400000
push 0x94
mov dword [esi + 8], eax
mov dword [esi + 4], eax
lea eax, [ebp - 0x20]
push 0
push eax
mov dword [esi], 0x3c
mov byte [esi + 0xc], 0
call fcn.0049fd30
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x10], 2
jne 0x48bda6
cmp dword [ebp - 0x1c], 5
jb 0x48bdbe
jmp 0x48bdba
cmp dword [ebp - 0x10], 1
jne 0x48bdbe
cmp dword [ebp - 0x1c], 4
ja 0x48bdba
jne 0x48bdbe
cmp dword [ebp - 0x18], 0
jbe 0x48bdbe
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x4dc5b0
call fcn.0048b973
test eax, eax
jge 0x48bddf
mov byte [0x4f72d8], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.0049fcf1
add ebp, 0x78
leave
ret

Function at 0x49fcf1
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4f59b8]
jne 0x49fcfb
repz ret
jmp fcn.004ae0dc
Function at 0x4ac693
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x4f5c78]
je 0x4ac6ae
inc edi
cmp edi, 0x17
jb 0x4ac69f
cmp edi, 0x17
jae 0x4ac82e
push ebp
push 3
call fcn.004c1528
cmp eax, 1
pop ecx
je 0x4ac7fa
push 3
call fcn.004c1528
test eax, eax
pop ecx
jne 0x4ac6e2
cmp dword [0x4f5a00], 1
je 0x4ac7fa
cmp ebx, 0xfc
je 0x4ac82d
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x4f8ef8
push ebp
call fcn.004a37bc
add esp, 0xc
test eax, eax
je 0x4ac718
push esi
push esi
push esi
push esi
push esi
call fcn.0049f365
add esp, 0x14
push 0x104
mov esi, 0x4f8f11
push esi
push 0
mov byte [0x4f9015], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4ac75c
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.004a37bc
add esp, 0xc
test eax, eax
je 0x4ac75c
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.0049f365
add esp, 0x14
push esi
call fcn.004a38a0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x4ac7a1
push esi
call fcn.004a38a0
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x4f920c
push 0x4dde2c
sub ecx, eax
push ecx
push eax
call fcn.004ba7a5
add esp, 0x14
test eax, eax
je 0x4ac7a1
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.0049f365
add esp, 0x14
jmp 0x4ac7a3
xor esi, esi
push 0x4dde28
push ebx
push ebp
call fcn.004ba734
add esp, 0xc
test eax, eax
je 0x4ac7c3
push esi
push esi
push esi
push esi
push esi
call fcn.0049f365
add esp, 0x14
push dword [edi*8 + 0x4f5c7c]
push ebx
push ebp
call fcn.004ba734
add esp, 0xc
test eax, eax
je 0x4ac7e5
push esi
push esi
push esi
push esi
push esi
call fcn.0049f365
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.004c136b
add esp, 0xc
jmp 0x4ac82d
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x4ac82d
cmp ebp, 0xffffffff
je 0x4ac82d
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x4f5c7c]
push dword [esi]
call fcn.004a38a0
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x4c136b
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.004ac966
xor ebx, ebx
cmp dword [0x4f9a64], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x4c1441
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x4c1521
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x4c1521
push eax
call fcn.004ac8f8
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x4f9a64], eax
call esi
push eax
call fcn.004ac8f8
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x4f9a68], eax
call esi
push eax
call fcn.004ac8f8
mov dword [0x4f9a6c], eax
lea eax, [ebp - 0xc]
push eax
call fcn.004aee21
test eax, eax
pop ecx
pop ecx
je 0x4c140f
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0049f365
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x4c1441
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.004ac8f8
cmp eax, ebx
pop ecx
mov dword [0x4f9a74], eax
je 0x4c1441
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.004ac8f8
pop ecx
mov dword [0x4f9a70], eax
mov eax, dword [0x4f9a70]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x4c14c6
cmp dword [0x4f9a74], ecx
je 0x4c14c6
push eax
call fcn.004ac96f
push dword [0x4f9a74]
mov esi, eax
call fcn.004ac96f
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x4c14c6
cmp edi, ebx
je 0x4c14c6
call esi
cmp eax, ebx
je 0x4c1493
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x4c1493
test byte [ebp - 0x18], 1
jne 0x4c14c6
lea eax, [ebp - 0x10]
push eax
call fcn.004aeed0
test eax, eax
pop ecx
je 0x4c14ae
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0049f365
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x4c14bd
or dword [ebp + 0x10], 0x200000
jmp 0x4c1501
or dword [ebp + 0x10], 0x40000
jmp 0x4c1501
mov eax, dword [0x4f9a68]
cmp eax, dword [ebp - 8]
je 0x4c1501
push eax
call fcn.004ac96f
cmp eax, ebx
pop ecx
je 0x4c1501
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x4c1501
mov eax, dword [0x4f9a6c]
cmp eax, dword [ebp - 8]
je 0x4c1501
push eax
call fcn.004ac96f
cmp eax, ebx
pop ecx
je 0x4c1501
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x4f9a64]
call fcn.004ac96f
cmp eax, ebx
pop ecx
je 0x4c1521
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x4c1523
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4e549e
Capabilities:
Encode data using xor

Disassembly:
mov al, byte [edi + eax]
movzx edx, al
mov ebx, edx
mov dword [esp + 0x24], edx
sub ebx, ecx
cmp edi, dword [esp + 0x20]
jl 0x4e5427
or ebx, 0xffffffff
jmp 0x4e543d
mov edx, dword [esp + 0x1c]
cmp al, byte [edi + edx + 1]
jne 0x4e5518
test ebx, ebx
je 0x4e5518
mov eax, ebx
mov ecx, edi
cdq
sub ecx, esi
xor eax, edx
dec ecx
sub eax, edx
mov dword [esp + 0x10], ecx
cmp eax, 1
jne 0x4e54fe
mov eax, dword [esp + 0x18]
cdq
xor eax, edx
sub eax, edx
cmp eax, 1
jg 0x4e54fe
test ecx, ecx
jle 0x4e54fe
lea eax, [ebx + ebp]
mov edx, ebx
mov dword [esp + 0x18], edx
test eax, eax
jne 0x4e54c6
cmp esi, edi
jge 0x4e550c
xor ebp, ebp
nop dword [eax]
mov eax, ebp
cdq
idiv ecx
add eax, 0xff
cdq
xor eax, edx
sub eax, edx
test ebx, ebx
fstp xword [ecx + 0xd]
fstp xword [ecx + 0xd]
mov ecx, 0xff
sub ecx, eax
mov eax, ecx
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
sub ebp, 0x1fe
mov byte [esi + edx], al
inc esi
cmp esi, edi
jl 0x4e548e
mov edx, dword [esp + 0x18]
jmp 0x4e550c
cmp ebp, ebx
jne 0x4e550c
cmp esi, edi
jge 0x4e550c
xor ebp, ebp
mov eax, ebp
cdq
idiv ecx
test ebx, ebx
jns 0x4e54e6
mov ecx, 0xff
sub ecx, eax
mov eax, ecx
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
add ebp, 0xff
mov byte [esi + edx], al
inc esi
cmp esi, edi
jl 0x4e54d0
mov edx, dword [esp + 0x18]
jmp 0x4e550c
xor edx, edx
test ebx, ebx
setg dl
lea edx, [edx*2 - 1]
mov ecx, dword [esp + 0x24]
mov ebp, edx
mov dword [esp + 0x18], ebx
mov esi, edi
mov eax, dword [esp + 0x1c]
inc edi
cmp edi, dword [esp + 0x2c]
jl 0x4e540e
pop ebx
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0x18
ret