joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100207f0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10026ed5
mov eax, dword fs:[0]
push eax
sub esp, 8
push esi
push edi
mov eax, dword [0x10031008]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
push 0x1050
call fcn.100224ea
mov esi, eax
mov dword [ebp - 0x10], esi
mov dword [ebp - 4], 0
push 0x1050
push 0
push esi
call sub.VCRUNTIME140.dll_memset
lea ecx, [esi + 0x44]
mov dword [esi], 0
mov eax, ecx
mov dword [esi + 4], 0
neg eax
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
lea edx, [esi + 0x1044]
mov dword [esi + 0x10], 0
and eax, 3
mov dword [esi + 0x14], 0
add esp, 0x10
mov dword [esi + 0x18], 0
add eax, ecx
mov dword [esi + 0x1c], 0
mov dword [esi + 0x20], 0
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
mov dword [esi + 0x2c], 0
mov dword [esi + 0x30], 0
mov dword [esi + 0x34], 0
mov dword [ebp - 0x14], esi
mov dword [edx], 0
mov dword [esi + 0x1048], 0
mov dword [esi + 0x38], ecx
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], edx
mov byte [ebp - 4], 2
mov dword [esi + 0x104c], 0
mov dword [ebp - 4], 0xffffffff
mov eax, edi
mov dword [edi], esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x100222b0
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x1002f960
push 0x10022ee9
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x10031008]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x28], 0
xor esi, esi
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x2c], esi
xor ebx, ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x24], ebx
mov word [ebp - 0x20], 0x100
mov eax, dword [ecx]
mov edi, dword [eax + 0x28]
mov dword [ebp - 0x40], edi
test edi, edi
jne 0x10022319
xor eax, eax
jmp 0x1002248f
mov dword [ebp - 4], ebx
push str.InitializeSecurityDescriptor
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1002245a
push 1
push dword [ebp - 0x34]
call eax
test eax, eax
je 0x1002245a
push str.AllocateAndInitializeSid
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1002245a
lea ecx, [ebp - 0x28]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 1
lea ecx, [ebp - 0x24]
push ecx
call eax
test eax, eax
je 0x1002245a
push str.GetLengthSid
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1002245a
push dword [ebp - 0x28]
call eax
add eax, 0x10
mov dword [ebp - 0x30], eax
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov dword [ebp - 0x3c], esi
test esi, esi
je 0x1002245a
push str.InitializeAcl
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1002245a
push 2
push dword [ebp - 0x30]
push esi
call eax
test eax, eax
je 0x1002245a
push str.AddAccessAllowedAce
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1002245a
push dword [ebp - 0x28]
push 0x10000000
push 2
push esi
call eax
test eax, eax
je 0x1002245a
push str.SetSecurityDescriptorDacl
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x30], eax
test eax, eax
je 0x1002245a
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
je 0x10022443
push 0
push ecx
push 1
push dword [ebp - 0x34]
call eax
test eax, eax
je 0x10022430
mov ebx, 1
mov dword [ebp - 0x38], ebx
cmp dword [ebp - 0x2c], 0
je 0x10022440
jmp 0x1002245a
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x2c], 0
mov eax, dword [ebp - 0x30]
push 0
push esi
push 1
push dword [ebp - 0x34]
call eax
mov ecx, 1
test eax, eax
cmovne ebx, ecx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 4], 0xfffffffe
call fcn.100224b6
test ebx, ebx
jne 0x1002248d
test esi, esi
je 0x1002247f
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor esi, esi
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x1002248d
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.100224d9
mov esp, ebp
pop ebp
ret 0xc
Function at 0x402680
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x409008], 0x8088405
inc edx
mov dword [ebx + 0x409008], edx
mul edx
mov eax, edx
pop ebx
ret

Function at 0x407080
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
mov esi, eax
mov eax, dword [0x409214]
mov dword [eax], ecx
mov ebx, edx
test ebx, ebx
jle 0x4070a1
mov eax, 0xff
call fcn.00402680
xor byte [esi], al
inc esi
dec ebx
jne 0x407091
pop esi
pop ebx
ret

Function at 0x4154b5
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x43ac80]
jne 0x4154bf
repz ret
jmp fcn.0041a9cb

Function at 0x425391
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.0041b995
and dword [ebp - 4], 0
cmp dword [0x43eb60], 0
mov ebx, eax
jne 0x425442
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x4254f3
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x4254f3
push eax
call fcn.0041b923
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x43eb60], eax
call esi
push eax
call fcn.0041b923
mov dword [esp], 0x43306c
push edi
mov dword [0x43eb64], eax
call esi
push eax
call fcn.0041b923
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x43eb68], eax
call esi
push eax
call fcn.0041b923
pop ecx
mov dword [0x43eb70], eax
test eax, eax
je 0x425442
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.0041b923
pop ecx
mov dword [0x43eb6c], eax
mov eax, dword [0x43eb6c]
cmp eax, ebx
je 0x42549a
cmp dword [0x43eb70], ebx
je 0x42549a
push eax
call fcn.0041b99e
push dword [0x43eb70]
mov esi, eax
call fcn.0041b99e
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x42549a
test edi, edi
je 0x42549a
call esi
test eax, eax
je 0x425491
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x425491
test byte [ebp - 0xc], 1
jne 0x42549a
or dword [ebp + 0x10], 0x200000
jmp 0x4254d3
mov eax, dword [0x43eb64]
cmp eax, ebx
je 0x4254d3
push eax
call fcn.0041b99e
pop ecx
test eax, eax
je 0x4254d3
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x4254d3
mov eax, dword [0x43eb68]
cmp eax, ebx
je 0x4254d3
push eax
call fcn.0041b99e
pop ecx
test eax, eax
je 0x4254d3
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x43eb60]
call fcn.0041b99e
pop ecx
test eax, eax
je 0x4254f3
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x4254f5
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x42b6b0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x258
mov eax, dword [0x43ac80]
xor eax, ebp
mov dword [ebp - 8], eax
cmp dword [ebp + 8], 0
jne 0x42b6d0
xor eax, eax
jmp 0x42b767
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x42b765
mov dword [ebp - 0x258], 0
push 0x24c
push 0
lea ecx, [ebp - 0x254]
push ecx
call fcn.00415f30
add esp, 0xc
lea edx, [ebp - 0x258]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
je 0x42b765
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 0xc], 0xffffffff
je 0x42b73e
mov edx, dword [ebp - 0x238]
cmp edx, dword [ebp + 0xc]
je 0x42b73e
xor eax, eax
jmp 0x42b767
mov eax, dword [ebp + 8]
push eax
call fcn.0042b240
add esp, 4
test eax, eax
je 0x42b765
cmp dword [ebp + 0xc], 0xffffffff
jne 0x42b75e
mov eax, dword [ebp - 0x238]
jmp 0x42b767
mov eax, 1
jmp 0x42b767
xor eax, eax
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004154b5
mov esp, ebp
pop ebp
ret

Function at 0x42b850
Capabilities:
Enumerate process modules

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42ed78
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x43ac80]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x38], 8
lea ecx, [ebp - 0x30]
call fcn.00404b50
mov dword [ebp - 4], 0
push 0
mov eax, dword [ebp - 0x38]
push eax
lea ecx, [ebp - 0x30]
call fcn.00404c80
mov ecx, dword [ebp - 0x38]
shl ecx, 2
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 1
mov byte [ebp - 0xd], 1
movzx edx, byte [ebp - 0xd]
test edx, edx
je 0x42b924
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x34]
push ecx
push 0
lea ecx, [ebp - 0x30]
call fcn.00404d60
push eax
call sub.PSAPI.DLL_EnumProcesses
test eax, eax
je 0x42b910
mov edx, dword [ebp - 0x18]
cmp edx, dword [ebp - 0x34]
jb 0x42b901
mov eax, dword [ebp - 0x38]
shl eax, 1
mov dword [ebp - 0x38], eax
push 0
mov ecx, dword [ebp - 0x38]
push ecx
lea ecx, [ebp - 0x30]
call fcn.00404c80
mov edx, dword [ebp - 0x38]
shl edx, 2
mov dword [ebp - 0x34], edx
jmp 0x42b90e
mov eax, dword [ebp - 0x18]
shr eax, 2
mov dword [ebp - 0x38], eax
mov byte [ebp - 0xd], 0
jmp 0x42b922
mov byte [ebp - 0xd], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x14], 0
jmp 0x42b8b4
cmp dword [ebp - 0x14], 0
je 0x42b963
mov ecx, dword [ebp + 8]
call fcn.00404e10
mov dword [ebp - 0x3c], 0
jmp 0x42b944
mov ecx, dword [ebp - 0x3c]
add ecx, 1
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp - 0x3c]
cmp edx, dword [ebp - 0x38]
jae 0x42b963
mov eax, dword [ebp - 0x3c]
push eax
lea ecx, [ebp - 0x30]
call fcn.00404d60
push eax
mov ecx, dword [ebp + 8]
call fcn.00404d90
jmp 0x42b93b
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x40], ecx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x30]
call fcn.00404bc0
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret
Function at 0x42ca90
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov dword [ebp - 0xc], 0
mov byte [0x43ebd4], 1
mov dword [0x43ebd0], 1
lea eax, [ebp - 8]
push eax
push 0x20019
push 0
mov ecx, 0x43ec78
call fcn.004019b0
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x42cb16
mov dword [ebp - 0x10], 4
mov dword [ebp - 0x14], 4
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0xc]
push edx
lea eax, [ebp - 0x10]
push eax
push 0
mov ecx, 0x43ec84
call fcn.004019b0
push eax
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 4], eax
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 4], 0
jne 0x42cb2c
cmp dword [ebp - 0xc], 1
jne 0x42cb2c
mov dword [0x43ebd0], 2
mov esp, ebp
pop ebp
ret
Function at 0x402d20
Capabilities:
Terminate process

Disassembly:
push 0x14
push 0x404e18
call fcn.004029e0
push 1
call fcn.00402efb
pop ecx
test al, al
je 0x402d08
xor bl, bl
mov byte [ebp - 0x19], bl
and dword [ebp - 4], 0
call fcn.00402ec9
mov byte [ebp - 0x24], al
mov eax, dword [0x4063f4]
xor ecx, ecx
inc ecx
cmp eax, ecx
je 0x402d08
test eax, eax
jne 0x402c2c
mov dword [0x4063f4], ecx
push 0x404174
push 0x404168
call sub.api_ms_win_crt_runtime_l1_1_0.dll__initterm_e
pop ecx
pop ecx
test eax, eax
je 0x402c0f
mov dword [ebp - 4], 0xfffffffe
mov eax, 0xff
jmp 0x402cf8
push 0x404164
push 0x40415c
call sub.api_ms_win_crt_runtime_l1_1_0.dll__initterm
pop ecx
pop ecx
mov dword [0x4063f4], 2
jmp 0x402c31
mov bl, cl
mov byte [ebp - 0x19], bl
push dword [ebp - 0x24]
call fcn.0040304f
pop ecx
call fcn.004031dc
mov esi, eax
xor edi, edi
cmp dword [esi], edi
je 0x402c62
push esi
call fcn.00402fbb
pop ecx
test al, al
je 0x402c62
mov esi, dword [esi]
push edi
push 2
push edi
mov ecx, esi
call dword [0x404158]
call esi
call fcn.004031e2
mov esi, eax
cmp dword [esi], edi
je 0x402c80
push esi
call fcn.00402fbb
pop ecx
test al, al
je 0x402c80
push dword [esi]
call sub.api_ms_win_crt_runtime_l1_1_0.dll__register_thread_local_exe_atexit_callback
pop ecx
call fcn.00403302
movzx esi, ax
call sub.api_ms_win_crt_runtime_l1_1_0.dll__get_wide_winmain_command_line
push esi
push eax
push edi
push 0x400000
call main
mov esi, eax
call fcn.00403338
test al, al
je 0x402d0f
test bl, bl
jne 0x402cae
call sub.api_ms_win_crt_runtime_l1_1_0.dll__cexit
push edi
push 1
call fcn.0040306c
pop ecx
pop ecx
mov dword [ebp - 4], 0xfffffffe
mov eax, esi
jmp 0x402cf8
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret
push 7
call fcn.004031e8
push esi
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
push dword [ebp - 0x20]
call sub.api_ms_win_crt_runtime_l1_1_0.dll__exit
int3
call fcn.00495000
jmp 0x402ba2
Function at 0x402bfc
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x6c
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
lea eax, [ebp - 0x2c]
mov dword [esp], eax
call fcn.00405dec
cmp dword [ebp - 0x14], 7
ja 0x402c22
lea esi, [ebp - 0x28]
jmp 0x402c25
mov esi, dword [ebp - 0x28]
mov dword [ebp - 0x48], 0x4359dc
mov dword [ebp - 0x44], 0x437390
mov dword [ebp - 0x40], ebp
mov dword [ebp - 0x38], esp
mov dword [ebp - 0x40], 0x402cb1
mov dword [ebp - 0x5c], 1
lea eax, [ebp - 0x64]
call fcn.00436645
mov dword [esp + 4], esi
mov dword [esp + 8], 0
mov dword [esp], 0
call sub.SHELL32.DLL_SHCreateDirectoryExW
sub esp, 0xc
mov esi, eax
mov ecx, dword [ebp - 0x14]
cmp ecx, 8
jb 0x402c8e
mov eax, dword [ebp - 0x28]
lea ecx, [ecx + ecx + 2]
cmp ecx, 0x1000
jb 0x402c86
mov eax, dword [eax - 4]
mov dword [esp], eax
call fcn.00418f50
test esi, esi
je 0x402c9e
mov dword [ebp - 0x5c], 0xffffffff
call sub.KERNEL32.DLL_GetLastError
lea eax, [ebp - 0x64]
mov dword [esp], eax
call fcn.00436666
add esp, 0x6c
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x41f0a4
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0xc
mov al, byte [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov byte [ebp - 5], al
mov al, byte [edx]
mov bl, al
xor bl, byte [ebp + 0xc]
lock cmpxchg byte [edx], bl
jne 0x41f0b9
mov byte [ebp + 0xc], al
mov al, byte [ebp + 0xc]
mov dword [ebp - 0xc], ecx
mov byte [ebp - 0xd], al
mov al, byte [ebp - 0xd]
movzx eax, al
add esp, 0xc
pop ebx
pop ebp
ret

Function at 0x41f634
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0xc
mov ax, word [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov word [ebp - 6], ax
mov ax, word [edx]
mov bx, ax
xor bx, word [ebp + 0xc]
lock cmpxchg word [edx], bx
jne 0x41f64c
mov word [ebp + 0xc], ax
mov ax, word [ebp + 0xc]
mov dword [ebp - 0xc], ecx
mov word [ebp - 0xe], ax
mov ax, word [ebp - 0xe]
movzx eax, ax
add esp, 0xc
pop ebx
pop ebp
ret

Function at 0x41fb94
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0xc
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov dword [ebp - 8], eax
mov eax, dword [edx]
mov ebx, eax
xor ebx, dword [ebp + 0xc]
lock cmpxchg dword [edx], ebx
jne 0x41fba9
mov dword [ebp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
add esp, 0xc
pop ebx
pop ebp
ret

Function at 0x420e54
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x1c
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 8]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], edx
mov edi, dword [ebp - 0x1c]
mov edx, dword [edi + 4]
mov eax, dword [edi]
mov ecx, edx
mov ebx, eax
xor ebx, dword [ebp - 0x18]
xor ecx, dword [ebp - 0x14]
lock cmpxchg8b qword [edi]
jne 0x420e7d
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp - 0x28]
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x422200
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0xc
mov edi, dword [esp + 0x20]
test edi, edi
je 0x422332
mov ebx, dword [esp + 0x24]
test ebx, ebx
je 0x422332
cmp dword [esp + 0x28], 0
je 0x422332
mov dword [esp], str.borlndmm
call sub.KERNEL32.DLL_GetModuleHandleA
sub esp, 4
mov esi, eax
test esi, esi
je 0x422332
mov ebp, dword [esp + 0x2c]
mov dword [esp], esi
mov dword [esp + 4], str._Borlndmm_SysGetMem_qqri
call sub.KERNEL32.DLL_GetProcAddress
sub esp, 8
mov dword [edi], eax
mov dword [esp], esi
mov dword [esp + 4], str._Borlndmm_SysFreeMem_qqrpv
call sub.KERNEL32.DLL_GetProcAddress
sub esp, 8
mov dword [ebx], eax
mov dword [esp], esi
mov dword [esp + 4], str._Borlndmm_SysReallocMem_qqrpvi
call sub.KERNEL32.DLL_GetProcAddress
sub esp, 8
mov ecx, dword [esp + 0x28]
mov dword [ecx], eax
mov dword [esp], esi
mov dword [esp + 4], str._Borlndmm_SysAllocMem_qqri
call sub.KERNEL32.DLL_GetProcAddress
sub esp, 8
mov dword [ebp], eax
mov dword [esp], esi
mov dword [esp + 4], str._Borlndmm_SysRegisterExpectedMemoryLeak_qqrpi
call sub.KERNEL32.DLL_GetProcAddress
sub esp, 8
mov ecx, dword [esp + 0x30]
mov dword [ecx], eax
mov dword [esp], esi
mov esi, dword [esp + 0x34]
mov dword [esp + 4], str._Borlndmm_SysUnregisterExpectedMemoryLeak_qqrpi
call sub.KERNEL32.DLL_GetProcAddress
sub esp, 8
mov dword [esi], eax
mov eax, dword [edi]
mov dword [0x43d848], eax
cmp dword [ebp], 0
jne 0x4222e6
mov dword [ebp], 0x4221d0
mov eax, dword [esp + 0x30]
cmp dword [eax], 0
jne 0x4222f5
mov dword [eax], 0x4221c0
mov ecx, dword [esi]
test ecx, ecx
je 0x422322
cmp dword [edi], 0
je 0x422332
cmp dword [ebx], 0
je 0x422332
mov esi, dword [esp + 0x28]
cmp dword [esi], 0
je 0x422332
cmp dword [ebp], 0
je 0x422332
cmp dword [eax], 0
je 0x422332
xor eax, eax
test ecx, ecx
setne al
jmp 0x422334
mov dword [esi], 0x4221c0
mov ecx, 0x4221c0
cmp dword [edi], 0
jne 0x422300
xor eax, eax
add esp, 0xc
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x4238b4
Capabilities:
Read file via mapping

Disassembly:
push edi
push esi
push eax
call sub.KERNEL32.DLL_GetCurrentProcessId
mov ecx, eax
and ecx, 0xf
mov cl, byte [ecx + str.0123456789ABCDEF]
mov byte [0x43adda], cl
mov ecx, eax
shr ecx, 4
and ecx, 0xf
mov cl, byte [ecx + str.0123456789ABCDEF]
mov byte [0x43add9], cl
mov ecx, eax
shr ecx, 8
and ecx, 0xf
mov cl, byte [ecx + str.0123456789ABCDEF]
mov byte [0x43add8], cl
mov ecx, eax
shr ecx, 0xc
and ecx, 0xf
mov cl, byte [ecx + str.0123456789ABCDEF]
mov byte [0x43add7], cl
mov ecx, eax
shr ecx, 0x10
and ecx, 0xf
mov cl, byte [ecx + str.0123456789ABCDEF]
mov byte [0x43add6], cl
mov ecx, eax
shr ecx, 0x14
and ecx, 0xf
mov cl, byte [ecx + str.0123456789ABCDEF]
mov byte [0x43add5], cl
mov ecx, eax
shr ecx, 0x18
and ecx, 0xf
mov cl, byte [ecx + str.0123456789ABCDEF]
mov byte [0x43add4], cl
shr eax, 0x1c
mov al, byte [eax + str.0123456789ABCDEF]
mov byte [0x43add3], al
sub esp, 4
push str.LocalFastMM_PID________
push 0
push 4
call sub.KERNEL32.DLL_OpenFileMappingA
add esp, 4
mov esi, eax
test esi, esi
je 0x423997
sub esp, 0xc
push 0
push 0
push 0
push 4
push esi
call sub.KERNEL32.DLL_MapViewOfFile
add esp, 0xc
mov edi, dword [eax]
sub esp, 0xc
push eax
call sub.KERNEL32.DLL_UnmapViewOfFile
push esi
call sub.KERNEL32.DLL_CloseHandle
add esp, 0xc
jmp 0x423999
xor edi, edi
mov eax, edi
add esp, 4
pop esi
pop edi
ret

Function at 0x4239a4
Capabilities:
Read file via mapping

Disassembly:
sub esp, 0xc
xor eax, eax
cmp dword [0x43a670], 0x42427a
jne 0x423a08
cmp dword [0x43a674], fcn.004245fe
jne 0x423a08
cmp dword [0x43a678], fcn.004247f6
jne 0x423a08
cmp dword [0x43a67c], fcn.00424b10
jne 0x423a08
cmp dword [0x43a680], 0x422944
jne 0x423a08
cmp dword [0x43a684], 0x422954
jne 0x423a08
mov ecx, dword [0x43d8a8]
test ecx, ecx
jne 0x423a08
call fcn.004238b4
mov ecx, eax
xor eax, eax
test ecx, ecx
je 0x423a0c
add esp, 0xc
ret
sub esp, 8
push str.LocalFastMM_PID________
push 4
push 0
push 4
push 0
push 0xffffffffffffffff
call sub.KERNEL32.DLL_CreateFileMappingA
add esp, 8
mov dword [0x43d8a8], eax
sub esp, 0xc
push 0
push 0
push 0
push 2
push eax
call sub.KERNEL32.DLL_MapViewOfFile
add esp, 0xc
mov dword [eax], fcn.0042427a
sub esp, 0xc
push eax
call sub.KERNEL32.DLL_UnmapViewOfFile
add esp, 0xc
mov eax, 1
add esp, 0xc
ret
Function at 0x425ae8
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x2c
mov ebx, dword [esp + 0x44]
call fcn.00426a34
test bh, 0xc0
jne 0x425b0b
mov eax, dword [0x43b4a4]
mov ecx, 0xc000
and ecx, dword [eax]
or ebx, ecx
mov eax, ebx
and eax, 0x700
add eax, 0xffffff00
mov ecx, eax
shr ecx, 8
mov esi, 3
cmp ecx, 6
ja 0x425b2f
sar eax, 6
mov esi, dword [eax + 0x43ae38]
mov edi, dword [esp + 0x40]
test bh, 1
je 0x425b58
lea eax, [esp + 0x4c]
mov dword [esp + 0x20], eax
mov al, byte [0x43ae58]
and al, byte [esp + 0x48]
mov eax, 0x80
mov ecx, 1
cmovs ecx, eax
jmp 0x425b6b
mov dword [esp], edi
call sub.KERNEL32.DLL_GetFileAttributesW
sub esp, 4
xor ecx, ecx
cmp eax, 0xffffffff
cmovne ecx, eax
mov eax, ebx
and al, 3
je 0x425b84
cmp al, 2
je 0x425b8b
cmp al, 1
jne 0x425c83
mov eax, 0x40000000
jmp 0x425b90
mov eax, SysReAllocString
jmp 0x425b90
mov eax, 0xc0000000
mov edx, ebx
and edx, 0x70
add edx, 0xfffffff0
shr edx, 4
cmp edx, 3
mov ebp, 3
cmovb ebp, edx
xor edx, edx
cmp eax, 0x80000000
sete dl
test bl, 4
cmove edx, ebp
mov dword [esp + 0x20], 0xc
mov dword [esp + 0x24], 0
mov ebp, ebx
shr ebp, 7
not ebp
and ebp, 1
mov dword [esp + 0x28], ebp
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], esi
lea ecx, [esp + 0x20]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], edi
mov dword [esp + 0x18], 0
call sub.KERNEL32.DLL_CreateFileW
sub esp, 0x1c
mov esi, eax
cmp esi, 0xffffffff
je 0x425c60
mov edi, ebx
shr edi, 1
not edi
and edi, 0x4000
or edi, ebx
mov dword [esp], esi
call fcn.004256ac
mov ecx, edi
or ecx, 0x2000
test eax, eax
cmove ecx, edi
and ecx, 0xfffff8ff
mov dword [esp], esi
mov dword [esp + 4], ecx
call fcn.00426bf4
mov edi, eax
cmp edi, 0xffffffff
jne 0x425c91
mov dword [esp], 4
call fcn.00426fd0
mov dword [esp], esi
call sub.KERNEL32.DLL_CloseHandle
sub esp, 4
mov edi, 0xffffffff
jmp 0x425c91
call sub.KERNEL32.DLL_GetLastError
movzx eax, ax
test bh, 1
mov ecx, 0x50
mov edx, 2
cmovne edx, ecx
cmp eax, 0x6e
cmovne edx, eax
mov dword [esp], edx
jmp 0x425c8a
mov dword [esp], 1
call fcn.00426fd0
mov edi, eax
call fcn.00426a84
mov eax, edi
add esp, 0x2c
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x426030
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x10]
cmp dword [0x43b3d4], eax
jbe 0x42606d
sub esp, 0xc
lea ecx, [esp + 0x14]
push 0
push ecx
push dword [esp + 0x2c]
push dword [esp + 0x2c]
push dword [eax*4 + 0x43fb50]
call sub.KERNEL32.DLL_ReadFile
add esp, 0xc
cmp eax, 1
jne 0x426074
mov eax, dword [esp + 8]
add esp, 0xc
ret
sub esp, 0xc
push 6
jmp 0x42608a
call sub.KERNEL32.DLL_GetLastError
mov ecx, eax
xor eax, eax
cmp ecx, 0x6d
jne 0x426086
add esp, 0xc
ret
sub esp, 0xc
push ecx
call fcn.00426fd0
add esp, 0x10
add esp, 0xc
ret
Function at 0x4260a8
Capabilities:
Write file on windows

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x10]
cmp dword [0x43b3d4], eax
jbe 0x4260e5
sub esp, 0xc
lea ecx, [esp + 0x14]
push 0
push ecx
push dword [esp + 0x2c]
push dword [esp + 0x2c]
push dword [eax*4 + 0x43fb50]
call sub.KERNEL32.DLL_WriteFile
add esp, 0xc
cmp eax, 1
jne 0x4260f6
mov eax, dword [esp + 8]
add esp, 0xc
ret
sub esp, 0xc
push 6
call fcn.00426fd0
add esp, 0x10
add esp, 0xc
ret
call fcn.00427070
add esp, 0xc
ret

Function at 0x427f50
Capabilities:
Delete file

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x10]
mov dword [esp], eax
call sub.KERNEL32.DLL_DeleteFileA
sub esp, 4
cmp eax, 1
jne 0x427f6d
xor eax, eax
add esp, 0xc
ret
add esp, 0xc
jmp fcn.00427070