joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4c5e00
Capabilities:
Get token membership

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
push ebx
push esi
xor ebx, ebx
push 0x110
lea eax, [ebp - 0x120]
push ebx
push eax
mov dword [ebp - 0x12c], 0x11c
mov dword [ebp - 0x128], 6
mov dword [ebp - 0x124], ebx
call fcn.004c9b50
mov esi, dword [sym.imp.KERNEL32.dll_VerSetConditionMask]
add esp, 0xc
push 3
push 1
push 3
push 2
push ebx
push ebx
call esi
push edx
push eax
call esi
push edx
push eax
push 3
lea ecx, [ebp - 0x12c]
push ecx
call dword [sym.imp.KERNEL32.dll_VerifyVersionInfoW]
test eax, eax
jne 0x4c5e6f
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x10]
push edx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [ebp - 8]
push eax
mov byte [ebp - 8], bl
mov byte [ebp - 7], bl
mov byte [ebp - 6], bl
mov byte [ebp - 5], bl
mov byte [ebp - 4], bl
mov byte [ebp - 3], 5
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
mov dword [ebp - 0xc], eax
cmp eax, ebx
je 0x4c5ec9
mov edx, dword [ebp - 0x10]
lea ecx, [ebp - 0xc]
push ecx
push edx
push ebx
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
jne 0x4c5ebc
mov dword [ebp - 0xc], ebx
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [ebp - 0xc]
xor ecx, ecx
cmp eax, ebx
setne cl
pop esi
mov al, cl
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4c5fa0
Capabilities:
Check if process is running under wine

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x548a88]
xor ecx, ecx
sub esp, 0x18
cmp eax, ecx
jne 0x4c5fea
mov eax, str.SoftwareWine
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], SysReAllocString
mov dword [ebp - 0x10], reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 8], ecx
mov dword [ebp - 4], ecx
call fcn.004c5ee0
xor ecx, ecx
test al, al
setne cl
lea ecx, [ecx + ecx - 1]
mov eax, ecx
mov dword [0x548a88], eax
xor edx, edx
cmp eax, 1
sete dl
mov al, dl
mov esp, ebp
pop ebp
ret

Function at 0x4c61f0
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
push ebx
push edi
mov edi, dword [ebp + 0xc]
mov byte [ebp - 1], 0
test edi, edi
je 0x4c6216
push 0x22c
push 0
push edi
call fcn.004c9b50
add esp, 0xc
push 0
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov ebx, eax
test ebx, ebx
je 0x4c62aa
cmp ebx, 0xffffffff
je 0x4c62aa
push 0x228
lea eax, [ebp - 0x22c]
push 0
push eax
mov dword [ebp - 0x230], 0x22c
call fcn.004c9b50
add esp, 0xc
lea ecx, [ebp - 0x230]
push ecx
push ebx
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
je 0x4c62a3
push esi
mov esi, dword [ebp + 8]
cmp dword [ebp - 0x228], esi
je 0x4c628d
lea edx, [ebp - 0x230]
push edx
push ebx
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x4c6263
pop esi
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [ebp - 1]
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x4c629e
mov ecx, 0x8b
lea esi, [ebp - 0x230]
rep movsd dword es:[edi], dword [esi]
mov byte [ebp - 1], 1
pop esi
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [ebp - 1]
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4c6380
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x4c6408
cmp word [ebx], 0
je 0x4c6408
push edi
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov edi, eax
test edi, edi
jne 0x4c63b1
push eax
push ebx
call fcn.0044c570
add esp, 8
pop edi
pop ebx
pop ebp
ret
lea eax, [edi + edi + 4]
push esi
push eax
call fcn.0044c4d0
mov esi, eax
add esp, 4
test esi, esi
je 0x4c6401
push edi
mov edx, 0xffff
xor ecx, ecx
push esi
mov word [esi], cx
mov eax, edx
push ebx
mov word [esi + edi*2], dx
mov word [esi + edi*2 + 2], ax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x4c63f8
cmp eax, edi
ja 0x4c63f8
cmp word [esi], 0
je 0x4c63f8
mov eax, esi
pop esi
pop edi
pop ebx
pop ebp
ret
push esi
call fcn.0044c4f0
add esp, 4
pop esi
pop edi
xor eax, eax
pop ebx
pop ebp
ret
xor eax, eax
pop ebx
pop ebp
ret

Function at 0x4c67f0
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edx, dword [ebp + 8]
mov dword [ebp - 8], eax
mov dword [ebp - 4], 0
mov eax, 1
lea ecx, [esi + 0x48]
cmp dword [ecx], edx
je 0x4c6823
inc eax
add ecx, 4
cmp eax, 0xa
jb 0x4c6814
jmp 0x4c682a
mov eax, dword [esi + eax*4 + 0x6c]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
cmp dword [esi + 0x38], ecx
jle 0x4c6864
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edi
mov edi, dword [ebp + 0xc]
lea ecx, [ecx]
mov edx, dword [esi + 0x40]
push 0xa
push edx
call ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 8]
cmp edi, 0xffffffff
je 0x4c685a
cmp eax, edi
ja 0x4c6862
mov eax, dword [ebp - 4]
cmp dword [esi + 0x38], eax
jg 0x4c6840
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret 8
Function at 0x4c6870
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
push esi
push edi
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, dword [sym.imp.KERNEL32.dll_TryEnterCriticalSection]
push esi
mov dword [ebp - 8], eax
call edi
test eax, eax
jne 0x4c69bb
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
call edi
test eax, eax
jne 0x4c69bb
mov eax, dword [ebp - 4]
cmp dword [esi + 0x30], eax
je 0x4c698f
mov edi, dword [esi + 0x34]
test edi, edi
je 0x4c698f
xor ebx, ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x4c698f
lea eax, [esi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x34]
cmp edi, eax
jne 0x4c6981
xor edi, edi
cmp eax, edi
je 0x4c6907
cmp eax, 0xffffffff
je 0x4c6907
push eax
mov dword [esi + 0x34], edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov edx, dword [esi]
mov eax, dword [esi + 4]
mov ecx, dword [esi + 8]
mov dword [ebp - 0x38], edx
mov edx, dword [esi + 0xc]
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x34], eax
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x30], ecx
mov ecx, dword [esi + 0x14]
lea edx, [ebp - 0x38]
push edx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], ecx
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_TryEnterCriticalSection]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
mov dword [esi], ecx
mov ecx, dword [ebp - 0x14]
mov ebx, eax
mov eax, dword [ebp - 0x18]
mov dword [esi + 4], edx
mov edx, dword [ebp - 0x10]
mov dword [esi + 8], eax
mov eax, dword [ebp - 0xc]
mov dword [esi + 0xc], ecx
mov dword [esi + 0x10], edx
mov dword [esi + 0x14], eax
mov eax, dword [esi + 0x6c]
cmp eax, edi
mov dword [esi + 0x44], edi
jle 0x4c697b
dec eax
mov dword [esi + 0x6c], eax
mov ecx, dword [ebp - 4]
mov dword [esi + 0x30], ecx
lea eax, [esi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test ebx, ebx
jne 0x4c69bb
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [ebp + 8]
cmp ecx, 0xffffffff
je 0x4c69ac
sub eax, dword [ebp - 8]
cmp eax, ecx
ja 0x4c69c6
push esi
call dword [sym.imp.KERNEL32.dll_TryEnterCriticalSection]
test eax, eax
je 0x4c68b1
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 4
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x4c6e90
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x4c6ebd
cmp word [ebx], 0
je 0x4c6ebd
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x4c6ed4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
jne 0x4c6ec2
xor eax, eax
pop ebx
pop ebp
ret
push 0
push 0x4e5034
call fcn.0044c570
add esp, 8
pop ebx
pop ebp
ret
push esi
push edi
lea edi, [eax + 1]
push 2
push edi
call fcn.0044c490
mov esi, eax
add esp, 8
test esi, esi
jne 0x4c6eef
pop edi
pop esi
pop ebx
pop ebp
ret
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x4c6f00
cmp eax, edi
jb 0x4c6f0b
push esi
call fcn.0044c4f0
add esp, 4
xor esi, esi
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret

Function at 0x4c6f20
Capabilities:
Query environment variable
Set environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
test eax, eax
je 0x4c6fba
cmp word [eax], 0
je 0x4c6fba
push edi
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x4c6fb9
cmp word [edi], 0
je 0x4c6fb9
push ebx
push esi
push 0x208
mov ebx, 0x104
call fcn.0044c4d0
push 0x25
push edi
mov esi, eax
call fcn.004c9bca
add esp, 0xc
test eax, eax
je 0x4c6f9f
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp eax, ebx
jbe 0x4c6f95
push esi
lea ebx, [eax + 1]
call fcn.0044c4f0
lea eax, [ebx + ebx]
push eax
call fcn.0044c4d0
add esp, 8
push ebx
mov esi, eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x4c6f9f
cmp eax, ebx
ja 0x4c6f9f
mov edi, esi
mov ecx, dword [ebp + 8]
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test esi, esi
je 0x4c6fb7
push esi
call fcn.0044c4f0
add esp, 4
pop esi
pop ebx
pop edi
pop ebp
ret
Function at 0x4c7280
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 0xc]
push ebx
xor edx, edx
push esi
push edi
mov edi, dword [ebp + 0x14]
mov dword [ebp - 8], edx
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x18], edx
cmp edi, 0x4b0
jne 0x4c72c4
mov ecx, dword [ebp + 0x10]
cmp ecx, edx
mov dword [ebp - 0x10], eax
jl 0x4c72b7
lea esi, [ecx + ecx]
jmp 0x4c7319
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
add esi, esi
jmp 0x4c7319
mov ebx, dword [ebp + 0x10]
push edx
push edx
push edx
push edx
push ebx
push eax
push edx
push edi
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov esi, eax
test esi, esi
jge 0x4c72e7
mov dword [ebp - 8], 0xfffffffe
jmp 0x4c740a
push esi
call fcn.0044c4d0
add esp, 4
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x4c7303
mov dword [ebp - 8], 0xfffffffd
jmp 0x4c740a
mov ecx, dword [ebp + 0xc]
push 0
push 0
push esi
push eax
push ebx
push ecx
push 0
push edi
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov esi, eax
test esi, esi
jge 0x4c7329
mov dword [ebp - 8], 0xfffffffe
jmp 0x4c740a
mov edx, dword [ebp + 8]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x18], ebx
test ebx, ebx
je 0x4c7403
cmp ebx, 0xffffffff
je 0x4c7403
cmp byte [ebp + 0x18], 0
je 0x4c73d8
mov byte [ebp - 4], 0xef
mov byte [ebp - 3], 0xbb
mov byte [ebp - 2], 0xbf
mov byte [ebp + 0x14], 0xff
mov byte [ebp + 0x15], 0xfe
mov dword [ebp - 0xc], 0
cmp edi, 0x4b0
je 0x4c73b5
cmp edi, 0xfde9
jne 0x4c73d8
push 0
lea eax, [ebp - 0xc]
push eax
mov edi, 3
push edi
lea ecx, [ebp - 4]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4c73ac
cmp dword [ebp - 0xc], edi
je 0x4c73d5
mov dword [ebp - 8], 0xfffffffc
jmp 0x4c740a
push 0
lea edx, [ebp - 0xc]
push edx
mov edi, 2
push edi
lea eax, [ebp + 0x14]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4c73ac
cmp dword [ebp - 0xc], edi
jne 0x4c73ac
mov dword [ebp - 8], edi
mov edx, dword [ebp - 0x10]
push 0
lea ecx, [ebp - 0x14]
push ecx
push esi
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4c73fa
mov eax, dword [ebp - 0x14]
cmp esi, eax
jne 0x4c73fa
add dword [ebp - 8], eax
jmp 0x4c740a
mov dword [ebp - 8], 0xfffffffb
jmp 0x4c740a
mov dword [ebp - 8], 0xffffffff
mov esi, dword [ebp + 0x1c]
test esi, esi
je 0x4c7419
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
mov eax, dword [ebp - 0x18]
pop edi
pop esi
pop ebx
test eax, eax
je 0x4c742f
cmp eax, 0xffffffff
je 0x4c742f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x4c743f
push eax
call fcn.0044c4f0
add esp, 4
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
Function at 0x4c7670
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
mov ebx, ecx
cmp byte [ebx + 4], 0
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 8], ebx
je 0x4c769b
mov eax, dword [ebx]
cmp eax, esi
je 0x4c769b
test eax, eax
je 0x4c7697
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [ebx + 4], 0
mov dword [ebx], esi
test esi, esi
jne 0x4c76ab
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8
push edi
mov byte [ebp + 0xb], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, dword [sym.imp.KERNEL32.dll_TryEnterCriticalSection]
push esi
mov dword [ebp - 4], eax
call edi
test eax, eax
jne 0x4c76f4
mov ebx, dword [ebp + 0xc]
lea esp, [esp]
cmp ebx, 0xffffffff
je 0x4c76e2
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 4]
cmp eax, ebx
jae 0x4c7706
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
call edi
test eax, eax
je 0x4c76d0
mov ebx, dword [ebp - 8]
pop edi
mov al, 1
pop esi
mov byte [ebx + 4], 1
movzx eax, al
pop ebx
mov esp, ebp
pop ebp
ret 8
mov al, byte [ebp + 0xb]
pop edi
pop esi
movzx eax, al
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x4c77f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x440
mov dword [ebp - 4], ecx
test ecx, ecx
je 0x4c79a7
mov eax, dword [ebp + 8]
test eax, eax
je 0x4c79a7
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
call edi
mov esi, eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x10], esi
test eax, eax
je 0x4c782e
push eax
call edi
mov ebx, eax
jmp 0x4c7830
xor ebx, ebx
lea eax, [ebx + esi]
lea eax, [eax + eax*2 + 0x20]
mov dword [ebp - 0xc], 0
cmp eax, 0x400
jae 0x4c784d
lea edi, [ebp - 0x440]
jmp 0x4c7863
push eax
call fcn.0044c4d0
mov edi, eax
add esp, 4
mov dword [ebp - 0xc], edi
test edi, edi
je 0x4c79a4
xor esi, esi
cmp byte [ebp + 0xc], 0
je 0x4c78b5
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx ecx, word [ebp - 0x12]
movzx edx, word [ebp - 0x14]
movzx eax, word [ebp - 0x16]
push ecx
movzx ecx, word [ebp - 0x18]
push edx
push eax
push ecx
lea edx, [ebp - 0x40]
push str._i:_02i:_02i._03i
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
push esi
lea ecx, [ebp - 0x40]
push ecx
push edi
call fcn.004c9f70
add esp, 0xc
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4c78ed
cmp word [eax], 0
je 0x4c78ed
push 0
push 0
lea edx, [ebx + ebx*2 + 1]
push edx
lea ecx, [esi + edi]
push ecx
push 0xffffffffffffffff
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp eax, 1
jle 0x4c78e8
lea esi, [esi + eax - 1]
mov byte [esi + edi], 0x20
inc esi
mov ecx, dword [ebp + 8]
cmp word [ecx], 0
je 0x4c791f
mov eax, dword [ebp - 0x10]
push 0
push 0
lea edx, [eax + eax*2 + 1]
push edx
lea eax, [esi + edi]
push eax
push 0xffffffffffffffff
push ecx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp eax, 1
jle 0x4c791f
lea esi, [esi + eax - 1]
cmp byte [ebp + 0x14], 0
je 0x4c793b
push 2
lea ecx, [esi + edi]
push 0x4ffc5c
push ecx
call fcn.004c9f70
add esp, 0xc
add esi, 2
mov ebx, dword [ebp - 4]
mov byte [esi + edi], 0
cmp dword [ebx + 0xc], 0
je 0x4c7994
push 0xffffffffffffffff
lea edx, [ebx + 0x10]
push edx
lea ecx, [ebp - 8]
mov dword [ebp - 8], 0
mov byte [ebp - 4], 0
call fcn.004c7670
mov ecx, dword [ebx + 0xc]
push 0
lea eax, [ebp + 0xc]
push eax
push esi
push edi
push ecx
mov dword [ebp + 0xc], esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebx + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
cmp byte [ebp - 4], 0
je 0x4c7994
mov eax, dword [ebp - 8]
test eax, eax
je 0x4c7994
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x4c79a4
push eax
call fcn.0044c4f0
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
Function at 0x4c7cd0
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x4c7ef6
cmp dword [esi + 8], 0
je 0x4c7d2e
cmp dword [esi], 1
je 0x4c7d2e
mov eax, dword [esi + 4]
sub eax, 0
je 0x4c7d01
sub eax, 1
je 0x4c7d10
sub eax, 1
jne 0x4c7d2e
jmp 0x4c7d10
call fcn.004c6070
test al, al
lea eax, [esi + 0x424]
jne 0x4c7d16
lea eax, [esi + 0x21c]
test eax, eax
je 0x4c7d2e
cmp word [eax], 0
je 0x4c7d2e
push eax
push str.ComSpec
call fcn.004c6f20
add esp, 8
cmp dword [esi + 0xc], 0
je 0x4c7ef6
cmp byte [ebp + 0xc], 0
jne 0x4c7ef6
cmp word [esi + 0x62c], 0
je 0x4c7ef6
cmp word [esi + 0x834], 0
je 0x4c7ef6
push ebx
push str.PATH
call fcn.004c6e90
mov ebx, eax
add esp, 4
mov dword [ebp - 8], ebx
test ebx, ebx
jne 0x4c7d88
push eax
push 0x4e5034
call fcn.0044c570
add esp, 8
mov dword [ebp - 8], eax
mov ebx, eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0
push ebx
mov dword [ebp - 0x10], eax
call fcn.0044c570
push 0x208
mov dword [ebp - 0xc], eax
call fcn.0044c4d0
add esp, 0xc
cmp dword [ebp - 0xc], 0
mov edi, eax
je 0x4c7eda
test edi, edi
je 0x4c7ece
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
push eax
push ecx
mov byte [ebp - 1], 0
xor ebx, ebx
call dword [sym.imp.USER32.dll_CharUpperBuffW]
xor eax, eax
mov dword [ebp - 0x10], eax
sub eax, 0
je 0x4c7e10
sub eax, 1
jne 0x4c7e20
test byte [esi + 0xc], 1
je 0x4c7ea6
lea eax, [esi + 0x62c]
push eax
mov dword [ebp - 0x14], eax
lea eax, [esi + 0x834]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x4c7ea6
mov ebx, dword [ebp - 0x14]
jmp 0x4c7e20
test byte [esi + 0xc], 2
je 0x4c7ea6
lea ebx, [esi + 0x834]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0x104
push ebx
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
push esi
push edi
call dword [sym.imp.USER32.dll_CharUpperBuffW]
mov edx, dword [ebp - 0xc]
push edi
push edx
call fcn.004ca978
add esp, 8
test eax, eax
je 0x4c7e70
nop
movzx ecx, word [eax + esi*2]
lea eax, [eax + esi*2]
cmp cx, 0x3b
je 0x4c7ea3
test cx, cx
je 0x4c7ea3
push edi
push eax
call fcn.004ca978
add esp, 8
test eax, eax
jne 0x4c7e50
mov eax, dword [ebp - 8]
push 0
push 0
push eax
push 0x4e599c
push ebx
call fcn.0044c5d0
mov esi, eax
add esp, 0x14
test esi, esi
je 0x4c7eb6
mov eax, dword [ebp - 8]
test eax, eax
je 0x4c7e9c
push eax
call fcn.0044c4f0
add esp, 4
mov dword [ebp - 8], esi
mov byte [ebp - 1], 1
mov esi, dword [ebp + 8]
mov eax, dword [ebp - 0x10]
inc eax
cmp eax, 1
mov dword [ebp - 0x10], eax
jle 0x4c7dd8
cmp byte [ebp - 1], 0
je 0x4c7ecb
mov ecx, dword [ebp - 8]
push ecx
push str.PATH
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
push edx
call fcn.0044c4f0
add esp, 4
test edi, edi
je 0x4c7ee7
push edi
call fcn.0044c4f0
add esp, 4
pop edi
test ebx, ebx
je 0x4c7ef5
push ebx
call fcn.0044c4f0
add esp, 4
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4c7f00
Capabilities:
Get common file path
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x4c8038
mov ebx, dword [ebp + 0xc]
cmp ebx, 0x104
jb 0x4c8038
xor eax, eax
push edi
mov word [esi], ax
call fcn.004c6070
movzx ecx, al
mov eax, dword [ebp + 0x10]
mov dword [ebp + 8], ecx
cmp eax, 2
je 0x4c7f93
cmp eax, 3
je 0x4c7f93
push ebx
push esi
push str.ComSpec
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x4c7f93
push esi
call fcn.004c62c0
mov edi, eax
add esp, 4
test edi, edi
je 0x4c7f8c
push str.ConEmuC.exe
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x4c7f8c
push str.ConEmuC64.exe
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x4c7f8c
push 0
push esi
call fcn.004c5850
add esp, 8
test al, al
jne 0x4c7f93
xor edx, edx
mov word [esi], dx
jmp 0x4c7f99
cmp word [esi], 0
jne 0x4c7fec
lea edi, [ebx - 0x14]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
jle 0x4c7fe6
cmp eax, edi
jae 0x4c7fe6
cmp dword [ebp + 8], 0
je 0x4c7fcc
cmp dword [ebp + 0x10], 2
jne 0x4c7fcc
cmp word [esi + eax*2 - 2], 0x5c
mov eax, str.SysWOW64cmd.exe
je 0x4c7fde
mov eax, 0x507fc4
jmp 0x4c7fde
cmp word [esi + eax*2 - 2], 0x5c
mov eax, str.System32cmd.exe
je 0x4c7fde
mov eax, 0x507f7c
push eax
push ebx
push esi
call fcn.004017b0
cmp word [esi], 0
je 0x4c8008
push 0
push esi
call fcn.004c5850
add esp, 8
test al, al
jne 0x4c8002
xor eax, eax
mov word [esi], ax
jmp 0x4c8008
cmp word [esi], 0
jne 0x4c8031
lea ecx, [ebp + 8]
push ecx
push esi
push ebx
push 0
push str.cmd.exe
push 0
call dword [sym.imp.KERNEL32.dll_SearchPathW]
test eax, eax
je 0x4c8025
cmp eax, ebx
jb 0x4c8031
push str.cmd.exe
push ebx
push esi
call fcn.00401730
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret
pop esi
xor eax, eax
pop ebx
pop ebp
ret
Function at 0x4c8320
Capabilities:
Query environment variable
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x618
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push 0x104
lea eax, [ebp - 0x410]
push eax
push str.ComSpecC
call esi
test eax, eax
je 0x4c844f
cmp word [ebp - 0x410], 0
je 0x4c844f
push 0x104
lea edx, [ebp - 0x618]
push edx
xor ecx, ecx
push str.ComSpec
mov word [ebp - 0x208], cx
call esi
test eax, eax
jne 0x4c8380
mov word [ebp - 0x618], ax
lea ecx, [ebp - 0x618]
push 0x5c
push ecx
call fcn.004ca94c
mov esi, eax
add esp, 8
test esi, esi
jne 0x4c839f
lea esi, [ebp - 0x618]
jmp 0x4c83a2
add esi, 2
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
push str.ConEmuC.exe
push esi
call edi
test eax, eax
je 0x4c83c1
push str.ConEmuC64.exe
push esi
call edi
test eax, eax
jne 0x4c8411
lea edx, [ebp - 0x410]
push 0x5c
push edx
call fcn.004ca94c
mov esi, eax
add esp, 8
test esi, esi
jne 0x4c83e0
lea esi, [ebp - 0x410]
jmp 0x4c83e3
add esi, 2
push str.ConEmuC.exe
push esi
call edi
test eax, eax
je 0x4c8411
push str.ConEmuC64.exe
push esi
call edi
test eax, eax
je 0x4c8411
lea eax, [ebp - 0x410]
push eax
lea ecx, [ebp - 0x208]
push ecx
call fcn.00405470
add esp, 8
cmp word [ebp - 0x208], 0
pop edi
jne 0x4c8432
push 0
lea edx, [ebp - 0x208]
push 0x104
push edx
call fcn.004c7f00
add esp, 0xc
mov esi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea eax, [ebp - 0x208]
push eax
push str.ComSpec
call esi
push 0
push str.ComSpecC
call esi
pop esi
mov esp, ebp
pop ebp
ret