joyce8/EMBER2024-capa huggingface dataset:
Function at 0x408063
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
xor ebx, ebx
push edi
push ebx
push ebx
push 3
push ebx
push 1
or esi, 0xffffffff
push 0xc0000000
push str.CONIN_
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], esi
call dword [sym.imp.ish_CreateFileA]
mov edi, eax
cmp edi, esi
jne 0x408098
mov eax, esi
jmp 0x408113
lea eax, [ebp - 0xc]
push eax
push edi
call dword [sym.imp.ish_GetConsoleMode]
test eax, eax
je 0x4080b0
push 1
push edi
call dword [sym.imp.ish_SetConsoleMode]
mov esi, dword [sym.imp.ish_ReadFile]
lea eax, [ebp - 8]
push ebx
push eax
lea eax, [ebp - 2]
push 1
push eax
push edi
call esi
test eax, eax
je 0x4080f9
cmp dword [ebp - 8], 1
jne 0x4080f9
movzx eax, byte [ebp - 2]
cmp eax, 0xa
mov dword [ebp - 0x10], eax
jne 0x4080f9
lea eax, [ebp - 8]
push ebx
push eax
lea eax, [ebp - 2]
push 1
push eax
push edi
call esi
test eax, eax
je 0x4080f9
cmp dword [ebp - 8], 1
jne 0x4080f9
movzx eax, byte [ebp - 2]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x408109
push dword [ebp - 0xc]
push edi
call dword [sym.imp.ish_SetConsoleMode]
push edi
call dword [sym.imp.ish_CloseHandle]
mov eax, dword [ebp - 0x10]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x408118
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
push ebx
xor ebx, ebx
cmp dword [0x419998], ebx
push esi
push edi
mov dword [ebp - 4], ebx
mov dword [ebp - 8], 1
jne 0x408141
call fcn.00408352
test eax, eax
je 0x408168
mov edi, dword [ebp + 8]
cmp edi, ebx
je 0x40822a
cmp byte [edi], bl
je 0x40822a
push edi
call dword [sym.imp.ish_lstrlenA]
mov edx, eax
cmp edx, 0x104
mov dword [ebp - 4], edx
jbe 0x40816f
xor eax, eax
jmp 0x40834d
lea eax, [ebp - 0x118]
xor esi, esi
sub edi, eax
lea eax, [ebp + esi - 0x118]
mov cl, byte [edi + eax]
cmp cl, 0x2f
jne 0x40818d
mov byte [eax], 0x5c
jmp 0x40818f
mov byte [eax], cl
inc esi
cmp esi, edx
jbe 0x408179
cmp byte [ebp - 0x118], 0x5c
jne 0x408202
cmp byte [ebp - 0x117], 0x5c
jne 0x408202
push 2
xor ecx, ecx
pop eax
cmp edx, eax
jbe 0x40822a
cmp byte [ebp + eax - 0x118], 0x5c
jne 0x4081bf
inc ecx
cmp ecx, 2
je 0x4081c7
inc eax
cmp eax, dword [ebp - 4]
jb 0x4081af
jmp 0x4081d2
inc eax
mov dword [ebp - 4], eax
mov byte [ebp + eax - 0x118], bl
cmp ecx, 1
jne 0x40822a
mov eax, dword [ebp - 4]
cmp byte [ebp + eax - 0x118], 0x5c
lea eax, [ebp + eax - 0x118]
je 0x40822a
mov cl, byte [ebp - 0x118]
mov byte [eax], cl
mov eax, dword [ebp - 4]
inc dword [ebp - 4]
mov byte [ebp + eax - 0x117], bl
jmp 0x40822a
cmp byte [ebp - 0x117], 0x3a
jne 0x408221
mov byte [ebp - 0x116], 0x5c
mov byte [ebp - 0x115], bl
mov dword [ebp - 4], 3
jmp 0x40822a
mov byte [ebp - 0x118], bl
mov dword [ebp - 4], ebx
mov edi, dword [sym.imp.ish_EnterCriticalSection]
mov esi, 0x419e60
push esi
call edi
cmp dword [0x419d40], ebx
je 0x40825a
lea eax, [ebp - 0x118]
push eax
push 0x419d58
call dword [sym.imp.ish_lstrcmpiA]
test eax, eax
je 0x408313
push esi
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ebx
call dword [sym.imp.ish_LeaveCriticalSection]
push ebx
lea eax, [ebp + 8]
push ebx
push eax
mov al, byte [ebp - 0x118]
push ebx
neg al
sbb eax, eax
lea ecx, [ebp - 0x118]
push ebx
push ebx
and eax, ecx
push ebx
push eax
call dword [sym.imp.ish_GetVolumeInformationA]
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x4082d2
test byte [ebp + 8], 8
je 0x4082d2
mov eax, dword [ebp + 0x10]
cmp dword [eax + 4], ebx
je 0x4082d2
mov al, byte [ebp - 0x118]
lea ecx, [ebp - 0x118]
neg al
sbb eax, eax
and eax, ecx
push eax
call dword [sym.imp.ish_GetDriveTypeA]
cmp eax, 4
jne 0x4082d2
lea eax, [ebp - 0x10]
mov dword [ebp - 0xc], 1
push eax
push dword [ebp + 0xc]
call fcn.004083ee
pop ecx
pop ecx
push esi
call edi
cmp dword [ebp - 8], ebx
je 0x40833d
mov eax, dword [ebp - 4]
inc eax
push eax
lea eax, [ebp - 0x118]
push eax
push 0x419d58
call dword [sym.imp.ish_lstrcpynA]
mov eax, dword [ebp + 8]
mov dword [0x419d40], 1
mov dword [0x419d48], eax
mov eax, dword [ebp - 0xc]
mov dword [0x419d4c], eax
mov eax, dword [ebp - 0x10]
mov dword [0x419d50], eax
mov eax, dword [ebp + 0x10]
push 0x120
push 0x419d40
push eax
mov ecx, dword [eax + 4]
mov dword [0x419d44], ecx
mov ecx, dword [eax + 0x14]
mov dword [0x419d54], ecx
call fcn.00409410
add esp, 0xc
jmp 0x408343
mov dword [0x419d40], ebx
push esi
call dword [sym.imp.ish_LeaveCriticalSection]
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x408352
Capabilities:
Check mutex on windows

Disassembly:
push ebx
push ebp
push esi
xor esi, esi
cmp dword [0x419998], esi
push edi
je 0x408368
push 1
pop eax
jmp 0x4083e9
push esi
push 1
push esi
call dword [sym.imp.ish_CreateMutexA]
mov ebx, eax
cmp ebx, esi
jne 0x40837c
xor eax, eax
jmp 0x4083e9
mov edi, dword [sym.imp.ish_InterlockedExchange]
mov ebp, 0x41999c
push ebx
push ebp
call edi
mov esi, eax
test esi, esi
je 0x4083b3
push esi
push ebp
call edi
push ebx
call dword [sym.imp.ish_CloseHandle]
push 0xffffffffffffffff
push esi
call dword [sym.imp.ish_WaitForSingleObject]
push esi
call dword [sym.imp.ish_ReleaseMutex]
mov eax, dword [0x419998]
jmp 0x4083e9
push 0x419e60
call dword [sym.imp.ish_InitializeCriticalSection]
push 0x120
push 0
push 0x419d40
call fcn.0040a0e0
add esp, 0xc
call fcn.004085d7
push 1
pop esi
push ebx
mov dword [0x419998], esi
call dword [sym.imp.ish_ReleaseMutex]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x411c43
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.ish_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x411c6e
test byte [esp + 8], 0x80
je 0x411c5d
and al, 0xfe
jmp 0x411c5f
or al, 1
push eax
push dword [esp + 8]
call dword [sym.imp.ish_SetFileAttributesA]
test eax, eax
jne 0x411c7f
call dword [sym.imp.ish_GetLastError]
push eax
call fcn.0040f532
pop ecx
or eax, 0xffffffff
ret
xor eax, eax
ret
Function at 0x481d0e
Capabilities:
Check for software breakpoints

Disassembly:
call 0x481d13
pop eax
mov ebx, 0x400000
mov esi, dword [ebx + 0xc0]
lea eax, [ebx + esi]
dec eax
mov cl, byte [eax]
cmp cl, 0xcc
je 0x481d22
sub eax, 3
mov edx, dword [eax]
mov esi, dword [ebx + 0x16c]
add esi, ebx
lea edi, [ebx + 0x1000]
push edi
mov ecx, edx
sub ecx, esi
push ecx
push esi
call fcn.00481bb0
lea edx, [eax - 4]
sub edx, dword [edx]
mov esi, ebx
add esi, dword [edx + 0x10c]
mov edi, dword [edx + 0x104]
mov ecx, 0x1d6be
call fcn.00481cd1
mov esi, dword [edx + 0x80]
push edx
add esi, ebx
mov eax, dword [esi + 0xc]
or eax, eax
je 0x481db9
add eax, ebx
push eax
call sub.kernel32.dll_LoadLibraryA
mov ebp, eax
mov ecx, dword [esi]
add ecx, ebx
mov edi, dword [esi + 0x10]
add edi, ebx
mov eax, dword [ecx]
or eax, eax
je 0x481db4
pushal
test eax, 0x80000000
je 0x481d9e
and eax, 0x7fffffff
jmp 0x481da2
lea eax, [ebx + eax + 2]
push eax
push ebp
call sub.kernel32.dll_GetProcAddress
mov dword [edi], eax
popal
add edi, 4
add ecx, 4
jmp 0x481d89
add esi, 0x14
jmp 0x481d6f
pop edx
add ebx, dword [edx + 0x28]
jmp ebx
Function at 0x401000
Capabilities:
Encode data using xor
Encrypt data using blowfish
Encrypt data using rc4 ksa

Disassembly:
push 0xffffffffffffffff
push 0x40eeb8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
mov eax, dword [esp + 0x1c]
push ebx
push ebp
push esi
mov esi, ecx
push edi
push 0x63
push eax
lea edi, [esi + 4]
mov dword [esp + 0x20], esi
push edi
mov dword [esi], 0x4104dc
call dword [sym.imp.MSVCRT.dll_strncpy]
xor ebx, ebx
mov byte [esi + 0x67], bl
push 0x48
mov dword [esp + 0x34], ebx
mov dword [esi], 0x4104d0
call sub.MFC42.DLL_operatornew
push 0x1000
mov dword [esi + 0x68], eax
call sub.MFC42.DLL_operatornew
mov dword [esi + 0x6c], eax
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
mov ecx, dword [esi + 0x68]
mov edx, dword [eax + 0x414020]
mov dword [eax + ecx], edx
add eax, 4
cmp eax, 0x48
jl 0x40106e
xor eax, eax
mov ecx, 0x100
mov edx, dword [esi + 0x6c]
mov edi, dword [eax + 0x414068]
mov dword [edx + eax], edi
add eax, 4
dec ecx
jne 0x401089
cmp eax, 0x1000
jl 0x401084
xor edi, edi
xor ecx, ecx
lea eax, [edi + 1]
cdq
idiv ebp
movsx eax, byte [esi + edi + 4]
shl eax, 8
mov bl, byte [edx + esi + 4]
and ebx, 0xff
or ebx, eax
lea eax, [edi + 2]
cdq
idiv ebp
mov eax, dword [esi + 0x68]
shl ebx, 8
mov dl, byte [edx + esi + 4]
and edx, 0xff
or ebx, edx
lea edx, [ecx + eax]
lea eax, [edi + 3]
mov dword [esp + 0x14], edx
cdq
idiv ebp
mov eax, dword [esp + 0x14]
add ecx, 4
shl ebx, 8
mov dl, byte [edx + esi + 4]
xor edx, ebx
and edx, 0xff
xor edx, ebx
mov ebx, dword [eax]
xor ebx, edx
mov dword [eax], ebx
lea eax, [edi + 4]
cdq
idiv ebp
cmp ecx, 0x48
mov edi, edx
jl 0x4010a6
xor edi, edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x10], edi
lea eax, [esp + 0x10]
lea ecx, [esp + 0x2c]
push eax
push ecx
mov ecx, esi
call fcn.00401390
mov edx, dword [esi + 0x68]
mov eax, dword [esp + 0x2c]
mov dword [edi + edx], eax
mov ecx, dword [esi + 0x68]
mov edx, dword [esp + 0x10]
mov dword [edi + ecx + 4], edx
add edi, 8
cmp edi, 0x48
jl 0x40111a
mov edi, 4
mov ebx, 0x80
lea eax, [esp + 0x10]
lea ecx, [esp + 0x2c]
push eax
push ecx
mov ecx, esi
call fcn.00401390
mov edx, dword [esi + 0x6c]
mov eax, dword [esp + 0x2c]
mov dword [edi + edx - 4], eax
mov ecx, dword [esi + 0x6c]
mov edx, dword [esp + 0x10]
mov dword [edi + ecx], edx
add edi, 8
dec ebx
jne 0x401152
cmp edi, 0x1004
jl 0x40114d
mov ecx, dword [esp + 0x1c]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x18
ret 4
Function at 0x402af0
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x40f118
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push edi
mov edi, ecx
mov eax, dword [edi + 0x68]
test eax, eax
jne 0x402b9a
push esi
lea ecx, [esp + 8]
call sub.MFC42.DLL_CString::CString_3
push 0x104
push 0x104
lea ecx, [esp + 0x10]
mov dword [esp + 0x1c], 0
call sub.MFC42.DLL_CString::GetBuffer
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push 0xffffffffffffffff
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::ReleaseBuffer
push str.winhlp32.exe
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::operator
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x402b81
push 0x6a
push esi
call dword [sym.imp.USER32.dll_LoadCursorA]
test eax, eax
je 0x402b81
push eax
call dword [sym.imp.USER32.dll_CopyIcon]
mov dword [edi + 0x68], eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea ecx, [esp + 8]
mov dword [esp + 0x14], 0xffffffff
call sub.MFC42.DLL_CString::CString
pop esi
mov ecx, dword [esp + 8]
pop edi
mov dword fs:[0], ecx
add esp, 0x10
ret

Function at 0x402bb0
Capabilities:
Query or enumerate registry value

Disassembly:
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
sub esp, 0x10c
lea eax, [esp]
push esi
push eax
push 1
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
test esi, esi
jne 0x402c12
mov edx, dword [esp + 4]
lea eax, [esp + 8]
lea ecx, [esp + 0xc]
push eax
push ecx
push esi
push edx
mov dword [esp + 0x18], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
mov ecx, dword [esp + 0x11c]
lea eax, [esp + 0xc]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
add esp, 0x10c
ret 0xc
Function at 0x402e20
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x208
mov eax, dword [esp + 0x20c]
push ebx
push ebp
mov ebp, dword [esp + 0x218]
push esi
push edi
push ebp
push 0
push 0
push eax
push str.open
mov edi, ecx
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
mov esi, eax
cmp esi, 0x20
ja 0x402f14
lea ecx, [esp + 0x10]
push ecx
push str..htm
push 0x80000000
mov ecx, edi
call fcn.00402bb0
test eax, eax
jne 0x402f14
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [esp + 0x10]
push str._shellopencommand
push edx
call ebx
lea eax, [esp + 0x10]
lea ecx, [esp + 0x10]
push eax
push ecx
push 0x80000000
mov ecx, edi
call fcn.00402bb0
test eax, eax
jne 0x402f14
lea edx, [esp + 0x10]
push str.__1_
push edx
call dword [sym.imp.MSVCRT.dll__mbsstr]
mov esi, eax
add esp, 8
test esi, esi
jne 0x402ee5
lea eax, [esp + 0x10]
push 0x4153c4
push eax
call dword [sym.imp.MSVCRT.dll_strstr]
mov esi, eax
add esp, 8
test esi, esi
jne 0x402ee5
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [esp + eax + 0xf]
jmp 0x402ee8
mov byte [esi], 0
push 0x4153c0
push esi
call ebx
mov edx, dword [esp + 0x21c]
push edx
push esi
call ebx
lea eax, [esp + 0x10]
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_WinExec]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret 8
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret 8

Function at 0x404200
Capabilities:
Get common file path

Disassembly:
sub esp, 0x20c
lea eax, [esp + 4]
push esi
push eax
push 0xff
mov dword [esp + 0xc], 0
mov byte [esp + 0x113], 0
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov edx, dword [esp + 0x218]
lea ecx, [esp + 0x10c]
push ecx
push 0
lea eax, [esp + 0x10]
push edx
push eax
mov byte [esp + 0x21f], 0
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
mov esi, dword [esp + 0x214]
lea ecx, [esp + 0x10c]
push ecx
mov ecx, esi
call fcn.0040e972
mov eax, esi
pop esi
add esp, 0x20c
ret
Function at 0x4044b0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push 0xffffffffffffffff
push 0x40f4f0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x28], 2
call sub.MFC42.DLL_AfxGetModuleState
mov eax, dword [eax + 4]
mov ecx, dword [esp + 0x34]
mov esi, dword [eax + 0x6c]
mov eax, dword [esp + 0x38]
push eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
xor ebx, ebx
cmp edi, ebx
je 0x4045b4
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebx
je 0x4045b4
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
lea ecx, [esp + 0x10]
mov ebp, eax
call sub.MFC42.DLL_CFile::CFile
mov edx, dword [esp + 0x30]
push ebx
push 0x1001
push edx
lea ecx, [esp + 0x1c]
mov byte [esp + 0x34], 3
call sub.MFC42.DLL_CFile::Open
test eax, eax
je 0x4045a6
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push eax
push ebp
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CFile::Write
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CFile::Close
lea ecx, [esp + 0x10]
mov byte [esp + 0x28], 2
call fcn.0040eb10
lea ecx, [esp + 0x30]
mov byte [esp + 0x28], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x34]
mov byte [esp + 0x28], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x38]
mov dword [esp + 0x28], 0xffffffff
call sub.MFC42.DLL_CString::CString
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
add esp, 0x1c
ret
lea ecx, [esp + 0x10]
mov byte [esp + 0x28], 2
call fcn.0040eb10
lea ecx, [esp + 0x30]
mov byte [esp + 0x28], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x34]
mov byte [esp + 0x28], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x38]
mov dword [esp + 0x28], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov dword fs:[0], ecx
add esp, 0x1c
ret
Function at 0x404600
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push 0xffffffffffffffff
push 0x40f518
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push esi
push edi
mov dword [esp + 0x14], 1
call sub.MFC42.DLL_AfxGetModuleState
mov eax, dword [eax + 4]
mov ecx, dword [esp + 0x20]
mov esi, dword [eax + 0x6c]
mov eax, dword [esp + 0x24]
push eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
je 0x40464e
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x404680
lea ecx, [esp + 0x20]
mov byte [esp + 0x14], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x24]
mov dword [esp + 0x14], 0xffffffff
call sub.MFC42.DLL_CString::CString
pop edi
xor al, al
pop esi
mov ecx, dword [esp + 4]
mov dword fs:[0], ecx
add esp, 0x10
ret
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push edi
push esi
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push eax
push ebp
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_1
mov ecx, dword [esp + 0x20]
push eax
mov byte [esp + 0x1c], 2
call fcn.0040e93c
lea ecx, [esp + 0xc]
mov byte [esp + 0x18], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x24]
mov byte [esp + 0x18], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x28]
mov dword [esp + 0x18], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x10]
pop ebp
pop edi
mov al, 1
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret
Function at 0x4050e0
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40f660
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x120
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esp
cmp byte [esi + 0xe4], 0xff
je 0x405124
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov al, byte [ebp + 0xc]
xor ebx, ebx
cmp al, bl
mov dword [ebp - 0x14], 1
jne 0x4051e9
cmp dword [esi + 0x60], ebx
jne 0x405159
mov ecx, esi
call fcn.00404e20
mov ecx, dword [esi + 0x68]
mov edx, dword [eax + 0x14]
cmp ecx, edx
je 0x405160
push 0xffffffffffffff9a
mov ecx, esi
call fcn.00404a70
jmp 0x405160
mov dword [ebp - 0x14], 0xffffffff
mov ecx, esi
call fcn.00404e20
cmp word [eax + 0xe], 8
jne 0x405177
lea edx, [esi + 0x28]
push edx
call fcn.004090c0
mov edi, dword [ebp + 8]
cmp edi, ebx
je 0x4051e9
lea eax, [ebp + 0xc]
mov dword [ebp - 4], ebx
push eax
call sub.MFC42.DLL_CTime::GetTickCount
mov eax, dword [eax]
lea ecx, [ebp + 0xc]
push ecx
mov ecx, esi
mov dword [ebp - 0x124], eax
mov dword [ebp - 0x12c], eax
mov byte [ebp - 0x11c], bl
call fcn.00404e20
mov ecx, eax
call fcn.00406320
mov edx, dword [eax]
lea eax, [ebp - 0x12c]
push eax
push edi
mov dword [ebp - 0x128], edx
call sub.MFC42.DLL_CFile::SetStatus
mov ecx, esi
call fcn.00404e20
mov ecx, dword [eax + 0x24]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
jne 0x4051e2
mov dword [ebp - 0x14], 0xfffffffe
mov dword [ebp - 4], 0xffffffff
lea ecx, [esi + 0xe8]
call fcn.00407f10
lea ecx, [esi + 0x6c]
mov byte [esi + 0xe4], bl
call fcn.00407710
mov ecx, esi
call fcn.00406050
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x14]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x405520
Capabilities:
Create directory

Disassembly:
push 0xffffffffffffffff
push 0x40f748
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, dword [esp + 0x14]
push ebx
push esi
push eax
lea ecx, [esp + 0x20]
call fcn.0040e972
push 0x415514
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], 0
call sub.MFC42.DLL_CString::TrimRight
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 8]
push ecx
push edx
call fcn.00405240
mov ecx, dword [esp + 0x24]
mov eax, dword [eax]
push ecx
push eax
mov byte [esp + 0x24], 1
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 0x10
or esi, 0xffffffff
test eax, eax
je 0x4055a2
mov edx, dword [esp + 0x1c]
push edx
call fcn.00405640
add esp, 4
cmp eax, esi
sete al
test al, al
jne 0x4055a2
xor bl, bl
jmp 0x4055a4
mov bl, 1
lea ecx, [esp + 8]
mov byte [esp + 0x14], 0
call sub.MFC42.DLL_CString::CString
test bl, bl
jne 0x40561d
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 8]
push eax
push ecx
call fcn.00405240
mov eax, dword [eax]
mov byte [esp + 0x1c], 2
push eax
call fcn.00405520
add esp, 0xc
lea ecx, [esp + 8]
test al, al
sete bl
mov byte [esp + 0x14], 0
call sub.MFC42.DLL_CString::CString
test bl, bl
jne 0x4055fd
mov edx, dword [esp + 0x1c]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x40561d
lea ecx, [esp + 0x1c]
mov dword [esp + 0x14], esi
call sub.MFC42.DLL_CString::CString
pop esi
xor al, al
pop ebx
mov ecx, dword [esp + 4]
mov dword fs:[0], ecx
add esp, 0x10
ret
lea ecx, [esp + 0x1c]
mov dword [esp + 0x14], esi
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0xc]
pop esi
mov al, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret

Function at 0x405640
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x40f768
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push esi
lea ecx, [esp + 4]
call sub.MFC42.DLL_CFileFind::CFileFind
mov esi, dword [esp + 0x30]
push 0
push esi
lea ecx, [esp + 0xc]
mov dword [esp + 0x30], 0
call sub.MFC42.DLL_CFileFind::FindFile
test eax, eax
jne 0x4056c6
push esi
call fcn.00405710
add esp, 4
mov dword [esp + 0x28], 0xffffffff
test al, al
lea ecx, [esp + 4]
je 0x4056af
call fcn.0040eb7c
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret
call fcn.0040eb7c
xor eax, eax
pop esi
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret
lea ecx, [esp + 4]
call sub.MFC42.DLL_CFileFind::FindNextFileA
mov eax, dword [esp + 4]
push 0x10
lea ecx, [esp + 8]
call dword [eax + 0x40]
neg eax
sbb eax, eax
lea ecx, [esp + 4]
and al, 0xfe
mov dword [esp + 0x28], 0xffffffff
inc eax
mov esi, eax
call fcn.0040eb7c
mov ecx, dword [esp + 0x20]
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x28
ret
Function at 0x405c80
Capabilities:
Get disk information

Disassembly:
mov eax, dword [esp + 4]
push ebx
lea ecx, [esp + 8]
push eax
push ecx
call fcn.00405cb0
mov eax, dword [eax]
add esp, 8
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 2
lea ecx, [esp + 8]
sete bl
call sub.MFC42.DLL_CString::CString
mov al, bl
pop ebx
ret

Function at 0x405dd0
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
mov eax, dword [esp + 4]
push esi
mov esi, ecx
push eax
mov ecx, dword [esi + 0x14]
push ecx
mov ecx, esi
call fcn.00405f30
mov edx, dword [esi + 0x18]
mov dword [esi + 0x14], eax
and eax, 0xff
mov ecx, esi
add eax, edx
imul eax, eax, 0x8088405
inc eax
mov dword [esi + 0x18], eax
shr eax, 0x18
mov byte [esp + 8], al
mov eax, dword [esi + 0x1c]
mov edx, dword [esp + 8]
push edx
push eax
call fcn.00405f30
mov dword [esi + 0x1c], eax
pop esi
ret 4