joyce8/EMBER2024-capa huggingface dataset:
Function at 0x642d110d
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push 0xffffffffffffffff
push esi
mov esi, esp
xor dword [esp - 0x43], esi
xor dword [esp - 0x45], esi
and dword [esi + 4], eax
pop esi
push 0
ja 0x642d1056
add ebx, 0
push ecx
call 0x642d106b
dec esp
adc eax, 0x91b81b2a
div bh
int 0x82
xchg ebx, eax
ror cl, 1
add esp, 8
xor dword [esp], ebx
sub esp, 0x6b
mov dword [esp + 0x67], edx
add esp, 0x67
push ecx
push 0
xor dword [esp - 0x56], edx
xor edi, 0
add dword [esp], edi
push esi
mov ebx, 0x6d44615a
sub ebx, dword [0x6d465999]
mov dword [ebp - 8], ebx
xchg esi, eax
push 0x6d465989
call fcn.642ccb35
xchg esi, eax
add esi, ebx
mov edx, dword [ebp + 8]
sub edx, ebx
call fcn.642cc043
mov edi, eax
mov eax, dword [esi + 8]
xor dword [esp - 0x69], edx
xor ebx, 0
xor eax, edi
cmp edx, eax
jb 0x642d11c9
mov eax, dword [esi + 0xc]
xor eax, edi
cmp edx, eax
ja 0x642d11c9
mov ecx, dword [esi + 0x10]
sub dword [esp - 0x34], ebx
xor ecx, edi
mov edx, dword [esi + 0x14]
xor edx, edi
shl edx, 2
add edx, 0x18
mov eax, dword [esi]
xor eax, edi
cmp eax, 1
je 0x642d1180
mov eax, 1
lock xchg dword [0x6d465995], eax
push 0x3dd1fc71
call 0x642d110d
push esi
add esp, 8
cmp eax, 0
jne 0x642d10f6
push edx
mov eax, edi
xor byte [esi + edx], al
inc edx
dec ecx
jne 0x642d111c
pop edx
mov eax, dword [esi + 0x14]
xor eax, edi
js 0x642d1131
cmp ecx, edx
cmp eax, 0
je 0x642d1156
mov dword [ebp - 4], eax
lea ecx, [esi + 0x18]
mov eax, dword [esi + ecx]
xor eax, edi
add eax, edx
add dword [esi + eax], ebx
add ecx, 4
dec dword [ebp - 4]
jne 0x642d1140
mov eax, 1
mov dword [esp - 0x1a], eax
push 0x8ae1b7eb
call fcn.642d116f
dec eax
loope 0x642d1172
invalid
xor eax, edi
mov dword [esi], eax
mov dword [0x6d465995], 0
add edx, esi
mov dword [ebp + 4], edx
xchg dword [esp], esi
push ecx
lea ecx, [edi - 0x72d1f741]
mov ecx, esp
mov dword [ecx - 0x15], ebx
pop ecx
push esi
xor esi, esi
mov esi, esp
and dword [esi - 0x1d], ecx
pop esi
mov dword [esp], esi
jb 0x642d11a6
xor edx, 0
add esp, 4
pop edi
pop ecx
pop edx
pop ebx
pop eax
leave
jmp 0x642d11bb
jmp 0x642d11c6
ret 4
mov eax, dword [esi + 4]
xor eax, edi
add esi, eax
jmp 0x642d10b4
Function at 0x642d822e
Capabilities:
Access peb ldr_data

Disassembly:
add esp, 8
and dword [esp], ebx
push ecx
push edx
push edi
push esi
or edi, 0xffffffff
not edi
add edi, dword [ebp + 8]
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov ecx, dword [eax + 0xc]
push ecx
xor edx, edx
mov ecx, dword [ecx]
cmp ecx, dword [esp]
je 0x642d8504
push ebp
push 0xffffffffffffffff
sub esp, 0x32
mov dword [esp + 0x2e], 0x6d45260d
add esp, 0x2e
sub esp, 4
mov dword [esp], 0x6d4495d3
push 0xffffffffffffffff
call fcn.642cf42e
xchg edx, eax
and eax, 0
add eax, 0x75d46dc4
push ecx
and ecx, 0xcfb6d7ec
mov ecx, esp
mov dword [ecx - 0x54], esi
pop ecx
ja 0x642d8298
and eax, eax
xchg edx, eax
mov edx, dword [ecx + edx - 0x75d46dac]
call fcn.642d82b0
mov byte [0xee69f033], al
invalid
mov eax, ecx
pop esi
mov edi, dword [esp]
add esp, 4
pop edx
xor ecx, ecx
add ecx, 0xffffffff
and ecx, dword [esp]
xor ecx, 0
add esp, 4
pop ebx
mov esp, ebp
mov ebp, dword [esp]
add esp, 4
jno 0x642d84f8
xor eax, 0
ret 4
xor ecx, ecx
jmp 0x642d84cc
Function at 0x642e7cfe
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push ebx
push ecx
lea esp, [esp - 0x10]
mov dword [esp + 0xc], edx
lea esp, [esp + 0xc]
sub esp, 4
mov dword [esp], 0x8b92e34e
mov dword [esp], edi
push esi
mov eax, dword [ebp + 8]
and ax, 0xf001
dec eax
cmp word [eax], 0x5a4d
jne 0x642e7d20
mov ebx, dword [eax + 0x3c]
cmp ebx, 0xf08
ja 0x642e7d20
add ebx, eax
cmp dword [ebx], 0x4550
jne 0x642e7d20
ret
cmp word [ebx + 4], 0x14c
jne 0x642e7d20
test word [ebx + 0x16], 2
je 0x642e7d20
test word [ebx + 0x16], 0x100
je 0x642e7d20
cmp word [ebx + 0x18], 0x10b
jne 0x642e7d20
mov edx, dword [ebx + 0x78]
cmp edx, 0
je 0x642e7d20
lea edx, [eax + edx]
mov edx, dword [edx + 0xc]
push 0xe1641d81
call 0x642e7dac
adc al, 0xbd
mov dl, 3
cmp byte [ecx + 0x75ac5ffe], 0xa
jnp 0x642e7d40
int1
salc
push edi
inc esp
add esp, 8
lea edx, [edx + eax]
mov ebx, eax
push edx
call fcn.642cec8b
xchg ebx, eax
cmp ebx, dword [ebp + 0xc]
jne 0x642e7d20
sub esp, 0x3e
mov esi, dword [esp + 0x3e]
add esp, 0x42
pop edi
mov edx, dword [esp]
add esp, 4
pop ecx
pop ebx
leave
ret 8

Function at 0x642e7dac
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push ebx
push ecx
lea esp, [esp - 0x10]
mov dword [esp + 0xc], edx
lea esp, [esp + 0xc]
sub esp, 4
mov dword [esp], 0x8b92e34e
mov dword [esp], edi
push esi
mov eax, dword [ebp + 8]
and ax, 0xf001
dec eax
cmp word [eax], 0x5a4d
jne 0x642e7d20
mov ebx, dword [eax + 0x3c]
cmp ebx, 0xf08
ja 0x642e7d20
add ebx, eax
cmp dword [ebx], 0x4550
jne 0x642e7d20
ret
cmp word [ebx + 4], 0x14c
jne 0x642e7d20
test word [ebx + 0x16], 2
je 0x642e7d20
test word [ebx + 0x16], 0x100
je 0x642e7d20
cmp word [ebx + 0x18], 0x10b
jne 0x642e7d20
mov edx, dword [ebx + 0x78]
cmp edx, 0
je 0x642e7d20
lea edx, [eax + edx]
mov edx, dword [edx + 0xc]
push 0xe1641d81
call 0x642e7dac
adc al, 0xbd
mov dl, 3
cmp byte [ecx + 0x75ac5ffe], 0xa
jnp 0x642e7d40
int1
salc
push edi
inc esp
add esp, 8
lea edx, [edx + eax]
mov ebx, eax
push edx
call fcn.642cec8b
xchg ebx, eax
cmp ebx, dword [ebp + 0xc]
jne 0x642e7d20
sub esp, 0x3e
mov esi, dword [esp + 0x3e]
add esp, 0x42
pop edi
mov edx, dword [esp]
add esp, 4
pop ecx
pop ebx
leave
ret 8
Function at 0x642e7e63
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0
push ecx
xor ecx, ecx
jne 0x642e7ebc
mov ecx, esp
xor dword [ecx - 0x55], edi
pop ecx
call 0x642e7e63
dec esp
adc eax, 0x91b81b2a
div bh
int 0x82
xchg ebx, eax
ror cl, 1
into
out dx, eax
call 0x642e7e72
cld
test edx, ebx
or ebp, eax
add dword [esi - 0x7cc26b19], esp
les ecx, [eax]
or dword [esp], ebp
mov ebp, esp
sub esp, 0x100
push ebx
push edx
push ecx
push edi
push esi
mov ebx, dword [ebp + 8]
mov edx, ebx
add ebx, dword [ebx + 0x3c]
mov ebx, dword [ebx + 0x78]
lea ebx, [ebx + edx]
mov eax, dword [ebx + 0x24]
add eax, edx
xor edi, edi
jne 0x646edb15
or edi, dword [ebx + 0x20]
add edi, edx
mov ecx, dword [ebx + 0x18]
mov esi, dword [edi]
add esi, edx
push 0
push ecx
mov ecx, esp
push 0x55d34c8a
call 0x642e7ec3
sti
sbb byte [ecx + 0x56], dh
xlatb
les ebp, [ebp + 0x8c483e2]
xchg dword [ecx + 4], eax
xor eax, edx
shl eax, 3
xor ecx, 0
shl eax, 0x1d
add eax, dword [ecx + 4]
pop ecx
push esi
call fcn.642ced39
cmp eax, dword [ebp + 0xc]
pop eax
je 0x642e7f62
add edi, 4
add eax, 2
dec ecx
jne 0x642e7ea8
call 0x642e7f0f
loope 0x642e7f05
invalid
sbb esi, ebx
mov edi, 0xdbead58c
js 0x642e7f5f
mov dh, 0xe8
or byte [eax], al
add byte [eax], al
mov bh, 0x24
lea eax, [edx + 0x53]
nop
mov dword [esi + 0x2308c483], ecx
sal byte [ecx], 0xc0
fsub st(7)
int 0xf
mov bh, 0
movzx eax, word [eax]
jmp 0x642e7f70
shl eax, 2
add eax, dword [ebx + 0x1c]
add eax, edx
mov eax, dword [eax]
add eax, edx
mov ebx, edx
add ebx, dword [edx + 0x3c]
mov ecx, dword [ebx + 0x7c]
mov ebx, dword [ebx + 0x78]
add ebx, edx
add ecx, ebx
cmp eax, ebx
jb 0x642e7f23
cmp eax, ecx
ja 0x642e7f23
mov esi, eax
lea edi, [ebp - 0x100]
mov al, byte [esi]
mov byte [edi], al
inc edi
inc esi
js 0x642e7fad
or ecx, ecx
xor dword [esp - 0x6b], eax
cmp al, 0x2e
jne 0x642e7fa3
lea edi, [ebp - 0x100]
push 0x100
push edi
push esi
call fcn.642cf218
lea esp, [esp - 0x60]
mov dword [esp + 0x5c], edi
lea esp, [esp + 0x5c]
Function at 0x642e7e72
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0
push ecx
xor ecx, ecx
jne 0x642e7ebc
mov ecx, esp
xor dword [ecx - 0x55], edi
pop ecx
call 0x642e7e63
dec esp
adc eax, 0x91b81b2a
div bh
int 0x82
xchg ebx, eax
ror cl, 1
into
out dx, eax
call 0x642e7e72
cld
test edx, ebx
or ebp, eax
add dword [esi - 0x7cc26b19], esp
les ecx, [eax]
or dword [esp], ebp
mov ebp, esp
sub esp, 0x100
push ebx
push edx
push ecx
push edi
push esi
mov ebx, dword [ebp + 8]
mov edx, ebx
add ebx, dword [ebx + 0x3c]
mov ebx, dword [ebx + 0x78]
lea ebx, [ebx + edx]
mov eax, dword [ebx + 0x24]
add eax, edx
xor edi, edi
jne 0x646edb15
or edi, dword [ebx + 0x20]
add edi, edx
mov ecx, dword [ebx + 0x18]
mov esi, dword [edi]
add esi, edx
push 0
push ecx
mov ecx, esp
push 0x55d34c8a
call 0x642e7ec3
sti
sbb byte [ecx + 0x56], dh
xlatb
les ebp, [ebp + 0x8c483e2]
xchg dword [ecx + 4], eax
xor eax, edx
shl eax, 3
xor ecx, 0
shl eax, 0x1d
add eax, dword [ecx + 4]
pop ecx
push esi
call fcn.642ced39
cmp eax, dword [ebp + 0xc]
pop eax
je 0x642e7f62
add edi, 4
add eax, 2
dec ecx
jne 0x642e7ea8
call 0x642e7f0f
loope 0x642e7f05
invalid
sbb esi, ebx
mov edi, 0xdbead58c
js 0x642e7f5f
mov dh, 0xe8
or byte [eax], al
add byte [eax], al
mov bh, 0x24
lea eax, [edx + 0x53]
nop
mov dword [esi + 0x2308c483], ecx
sal byte [ecx], 0xc0
fsub st(7)
int 0xf
mov bh, 0
movzx eax, word [eax]
jmp 0x642e7f70
shl eax, 2
add eax, dword [ebx + 0x1c]
add eax, edx
mov eax, dword [eax]
add eax, edx
mov ebx, edx
add ebx, dword [edx + 0x3c]
mov ecx, dword [ebx + 0x7c]
mov ebx, dword [ebx + 0x78]
add ebx, edx
add ecx, ebx
cmp eax, ebx
jb 0x642e7f23
cmp eax, ecx
ja 0x642e7f23
mov esi, eax
lea edi, [ebp - 0x100]
mov al, byte [esi]
mov byte [edi], al
inc edi
inc esi
js 0x642e7fad
or ecx, ecx
xor dword [esp - 0x6b], eax
cmp al, 0x2e
jne 0x642e7fa3
lea edi, [ebp - 0x100]
push 0x100
push edi
push esi
call fcn.642cf218
lea esp, [esp - 0x60]
mov dword [esp + 0x5c], edi
lea esp, [esp + 0x5c]
Function at 0x101895d0
Capabilities:
Packed with generic packer

Disassembly:
cmp byte [esp + 8], 1
jne 0x10189739
pushal
mov esi, section.UPX1
lea edi, [esi - 0x153000]
push edi
or ebp, 0xffffffff
jmp 0x101895fa
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x10189601
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x101895f0
mov eax, 1
add ebx, ebx
jne 0x10189613
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x10189624
jne 0x10189634
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x10189634
dec eax
add ebx, ebx
jne 0x10189630
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x10189608
xor ecx, ecx
sub eax, 3
jb 0x1018964c
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x101896be
sar eax, 1
mov ebp, eax
jmp 0x10189657
add ebx, ebx
jne 0x10189657
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x10189664
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x10189688
inc ecx
add ebx, ebx
jne 0x10189674
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x10189669
jne 0x10189685
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x10189669
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x101896a8
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x10189699
jmp 0x101895f6
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x101896a8
add edi, ecx
jmp 0x101895f6
pop esi
lea edi, [esi + 0x185000]
mov eax, dword [edi]
or eax, eax
je 0x10189707
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x189000]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x18903c]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x101896c5
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x189040]
or eax, eax
je 0x10189701
mov dword [ebx], eax
add ebx, 4
jmp 0x101896e2
popal
xor eax, eax
ret 0xc
add edi, 4
lea ebx, [esi - 4]
xor eax, eax
mov al, byte [edi]
inc edi
or eax, eax
je 0x10189738
cmp al, 0xef
ja 0x1018972b
add ebx, eax
mov eax, dword [ebx]
xchg ah, al
rol eax, 0x10
xchg ah, al
add eax, esi
mov dword [ebx], eax
jmp 0x1018970d
and al, 0xf
shl eax, 0x10
mov ax, word [edi]
add edi, 2
jmp 0x1018971a
popal
jmp 0x10029c40
Function at 0x402fd4
Capabilities:
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff3e0
push ebx
push esi
push edi
mov dword [ebp - 4], edx
mov edi, eax
push 0
push 0x80
push 4
push 0
push 0
push 0xc0000000
push 0x4671e0
call sub.kernel32.dll_CreateFileA
mov esi, eax
cmp esi, 0xffffffff
jne 0x40308e
lea eax, [ebp - 0xc10]
push eax
push 0
push 0
push 0x8005
push 0
call sub.SHFolder.dll_SHGetFolderPathA
test eax, eax
jne 0x40308e
lea eax, [ebp - 0xc10]
call fcn.004022b4
mov ebx, eax
test ebx, ebx
je 0x403042
cmp byte [ebp + ebx - 0xc11], 0x5c
je 0x40304b
mov byte [ebp + ebx - 0xc10], 0x5c
inc ebx
lea ecx, [ebp - 0xc]
lea edx, [ebp - 0x10]
mov eax, 0x4671e0
call fcn.00402fb4
mov ecx, dword [ebp - 0xc]
inc ecx
lea edx, [ebp + ebx - 0xc10]
mov eax, dword [ebp - 0x10]
call sub.rtl160.bpl__System_Move_qqrpxvpvi
push 0
push 0x80
push 4
push 0
push 0
push 0xc0000000
lea eax, [ebp - 0xc10]
push eax
call sub.kernel32.dll_CreateFileA
mov esi, eax
cmp esi, 0xffffffff
je 0x4031c2
push 2
push 0
push 0
push esi
call sub.kernel32.dll_SetFilePointer
lea edx, [ebp - 0x410]
mov eax, 0x4031cc
mov ecx, 2
call fcn.0040259c
mov ebx, eax
mov eax, 0x4031d0
mov ecx, 0x20
mov edx, ebx
call fcn.0040259c
mov ebx, eax
lea eax, [ebp - 0xc20]
push eax
call sub.kernel32.dll_GetLocalTime
movzx eax, word [ebp - 0xc20]
mov edx, ebx
call fcn.004024ec
mov ebx, eax
mov byte [ebx], 0x2f
inc ebx
movzx eax, word [ebp - 0xc1e]
mov edx, ebx
call fcn.004024ec
mov ebx, eax
mov byte [ebx], 0x2f
inc ebx
movzx eax, word [ebp - 0xc1a]
mov edx, ebx
call fcn.004024ec
mov ebx, eax
mov byte [ebx], 0x20
inc ebx
movzx eax, word [ebp - 0xc18]
mov edx, ebx
call fcn.004024ec
mov ebx, eax
mov byte [ebx], 0x3a
inc ebx
cmp word [ebp - 0xc16], 0xa
jae 0x403137
mov byte [ebx], 0x30
inc ebx
movzx eax, word [ebp - 0xc16]
mov edx, ebx
call fcn.004024ec
mov ebx, eax
mov byte [ebx], 0x3a
inc ebx
cmp word [ebp - 0xc14], 0xa
jae 0x403159
mov byte [ebx], 0x30
inc ebx
movzx eax, word [ebp - 0xc14]
mov edx, ebx
call fcn.004024ec
mov ebx, eax
mov eax, 0x4031d0
mov ecx, 0x20
mov edx, ebx
call fcn.0040259c
mov ebx, eax
mov eax, 0x4031cc
mov ecx, 2
mov edx, ebx
call fcn.0040259c
mov ebx, eax
push 0
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x410]
sub ebx, eax
push ebx
lea eax, [ebp - 0x410]
push eax
push esi
call sub.kernel32.dll_WriteFile
push 0
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 4]
push eax
push edi
push esi
call sub.kernel32.dll_WriteFile
push esi
call sub.kernel32.dll_CloseHandle
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x403214
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff7f8
push ebx
mov eax, 0x4671e0
call fcn.004022d0
mov ebx, eax
test ebx, ebx
jbe 0x4032b6
mov eax, dword [0x45c7fc]
call fcn.004022b4
mov ecx, eax
inc ecx
lea edx, [ebx + 0x4671dc]
mov eax, dword [0x45c7fc]
call sub.rtl160.bpl__System_Move_qqrpxvpvi
push 0x3ff
lea eax, [ebp - 0x808]
push eax
push 0x4032bc
call sub.kernel32.dll_GetEnvironmentVariableA
mov ebx, eax
test ebx, ebx
jbe 0x4032b6
cmp byte [ebp + ebx - 0x809], 0x5c
je 0x40327e
mov byte [ebp + ebx - 0x808], 0x5c
inc ebx
lea ecx, [ebp - 8]
lea edx, [ebp - 4]
mov eax, 0x4671e0
call fcn.00402fb4
mov ecx, dword [ebp - 8]
inc ecx
lea edx, [ebp + ebx - 0x808]
mov eax, dword [ebp - 4]
call sub.rtl160.bpl__System_Move_qqrpxvpvi
mov edx, 0x4671e0
lea eax, [ebp - 0x808]
mov ecx, 0x3ff
call sub.rtl160.bpl__System_Move_qqrpxvpvi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x405dfc
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffbd8
push ebx
xor ebx, ebx
cmp dword [0x467c8c], 0
je 0x405e95
cmp byte [0x467c88], 0
je 0x405e4a
push 0x405e9c
call sub.kernel32.dll_OutputDebugStringA
lea edx, [ebp - 0x400]
mov eax, 0x405ebc
call fcn.004022f8
lea edx, [ebp - 0x400]
mov eax, 0x405e9c
call fcn.004025e8
jmp 0x405e95
call sub.rtl160.bpl__System_IsMemoryManagerSet_qqrv
test al, al
jne 0x405e95
lea eax, [ebp - 0x428]
call sub.rtl160.bpl__System_GetHeapStatus_qqrv
cmp dword [ebp - 0x41c], 0
je 0x405e93
push 0x405ed0
call sub.kernel32.dll_OutputDebugStringA
lea edx, [ebp - 0x400]
mov eax, 0x4060b8
call fcn.004022f8
lea edx, [ebp - 0x400]
mov eax, 0x405ed0
call fcn.004025e8
jmp 0x405e95
mov bl, 1
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4063ac
Capabilities:
Print debug messages
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
cmp byte [0x467c88], 0
jne 0x40652d
push 1
push 0x2000
push 0x10000
push 0x80800000
call sub.kernel32.dll_VirtualAlloc
mov dword [0x4675e0], eax
call sub.kernel32.dll_GetCurrentProcessId
mov ebx, eax
xor eax, eax
mov ecx, eax
add ecx, ecx
add ecx, ecx
mov edx, ebx
shr edx, cl
and edx, 0xf
movzx edx, byte [edx + str.0123456789ABCDEF]
mov ecx, 0x18
sub ecx, eax
mov byte [ecx + str.LocalFastMM_PID_________], dl
inc eax
cmp eax, 8
jne 0x4063e3
push str.LocalFastMM_PID_________
push 0
push 4
call sub.kernel32.dll_OpenFileMappingA
mov dword [0x467c84], eax
cmp dword [0x467c84], 0
jne 0x4064b1
mov eax, dword [sym.imp.rtl160.bpl__System_IsLibrary]
cmp byte [eax], 0
jne 0x40646c
push str.LocalFastMM_PID_________
push 4
push 0
push 4
push 0
push 0xffffffffffffffff
call sub.kernel32.dll_CreateFileMappingA
mov dword [0x467c84], eax
push 0
push 0
push 0
push 2
mov eax, dword [0x467c84]
push eax
call sub.kernel32.dll_MapViewOfFile
mov dword [eax], 0x467c6c
push eax
call sub.kernel32.dll_UnmapViewOfFile
mov dword [0x467c6c], fcn.0040420c
mov dword [0x467c70], 0x404388
mov dword [0x467c74], 0x404474
mov dword [0x467c78], 0x4045d8
mov dword [0x467c7c], 0x40546c
mov dword [0x467c80], 0x4054bc
mov byte [0x467c89], 1
jmp 0x4064f3
push 0
push 0
push 0
push 4
mov eax, dword [0x467c84]
push eax
call sub.kernel32.dll_MapViewOfFile
mov edx, dword [eax]
mov esi, edx
mov edi, 0x467c6c
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
push eax
call sub.kernel32.dll_UnmapViewOfFile
mov eax, dword [0x467c84]
push eax
call sub.kernel32.dll_CloseHandle
xor eax, eax
mov dword [0x467c84], eax
mov byte [0x467c89], 0
mov eax, 0x467c54
call sub.rtl160.bpl__System_GetMemoryManager_qqrr23System_TMemoryManagerEx
mov eax, 0x467c6c
call sub.rtl160.bpl__System_SetMemoryManager_qqrrx23System_TMemoryManagerEx
mov byte [0x467c88], 1
cmp byte [0x467c89], 0
je 0x406523
push 0x406534
call sub.kernel32.dll_OutputDebugStringA
jmp 0x40652d
push 0x406550
call sub.kernel32.dll_OutputDebugStringA
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x40a490
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov esi, ecx
mov ebx, edx
xor eax, eax
push ebp
push 0x40a648
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 1], 1
xor edx, edx
push ebp
push 0x40a5ef
push dword fs:[edx]
mov dword fs:[edx], esp
push 0
mov ecx, ebx
mov dl, 1
mov eax, dword [sym.imp.rtl160.bpl__System_Classes_TFileStream_]
call sub.rtl160.bpl__System_Classes_TFileStream__bctr_qqrx20System_UnicodeStringus
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x40a5de
push dword fs:[eax]
mov dword fs:[eax], esp
or edi, 0xffffffff
mov eax, esi
call sub.rtl160.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
mov edx, eax
lea eax, [ebp - 0x10]
call sub.rtl160.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
mov eax, dword [ebp - 0x10]
mov dl, 1
call sub.rtl160.bpl__System_Sysutils_FileExists_qqrx20System_UnicodeStringo
mov ebx, eax
test bl, bl
je 0x40a542
mov eax, esi
call sub.rtl160.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_GetFileAttributesW
mov edi, eax
cmp edi, 0xffffffff
je 0x40a52d
push 0x80
mov eax, esi
call sub.rtl160.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_SetFileAttributesW
push 0x41
mov ecx, esi
mov dl, 1
mov eax, dword [sym.imp.rtl160.bpl__System_Classes_TFileStream_]
call sub.rtl160.bpl__System_Classes_TFileStream__bctr_qqrx20System_UnicodeStringus
mov dword [ebp - 0xc], eax
jmp 0x40a558
push 0xff40
mov ecx, esi
mov dl, 1
mov eax, dword [sym.imp.rtl160.bpl__System_Classes_TFileStream_]
call sub.rtl160.bpl__System_Classes_TFileStream__bctr_qqrx20System_UnicodeStringus
mov dword [ebp - 0xc], eax
xor eax, eax
push ebp
push 0x40a5c1
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
mov edx, dword [eax]
call dword [edx]
push edx
push eax
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
call sub.rtl160.bpl__System_Classes_TStream_CopyFrom_qqrp22System_Classes_TStreamj
test bl, bl
je 0x40a593
cmp edi, 0xffffffff
je 0x40a5ab
push edi
mov eax, esi
call sub.rtl160.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_SetFileAttributesW
jmp 0x40a5ab
mov eax, dword [ebp - 8]
mov eax, dword [eax + 4]
call sub.rtl160.bpl__System_Sysutils_FileGetDate_qqrui
mov edx, eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 4]
call sub.rtl160.bpl__System_Sysutils_FileSetDate_qqruii
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40a5c8
lea eax, [ebp - 0xc]
call sub.rtl160.bpl__System_Sysutils_FreeAndNil_qqrpv
ret
Function at 0x40f1bc
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdd0
push ebx
push esi
xor ecx, ecx
mov dword [ebp - 0x228], ecx
mov dword [ebp - 0x224], ecx
mov dword [ebp - 0x220], ecx
mov dword [ebp - 0x21c], ecx
mov ebx, edx
mov esi, eax
xor eax, eax
push ebp
push 0x40f32f
push dword fs:[eax]
mov dword fs:[eax], esp
push 1
call sub.kernel32.dll_SetErrorMode
mov dword [ebp - 4], eax
xor edx, edx
push ebp
push 0x40f30a
push dword fs:[edx]
mov dword fs:[edx], esp
mov word [ebp - 0x216], 0
push 0
push 0
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0x105
lea eax, [ebp - 0x216]
push eax
lea eax, [ebp - 0x21c]
mov edx, esi
call sub.rtl160.bpl__System__UStrFromWChar_qqrr20System_UnicodeStringb
lea eax, [ebp - 0x21c]
mov edx, 0x40f348
call sub.rtl160.bpl__System__UStrCat_qqrr20System_UnicodeStringx20System_UnicodeString
mov eax, dword [ebp - 0x21c]
call sub.rtl160.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_GetVolumeInformationW
test eax, eax
je 0x40f27b
lea eax, [ebp - 0x216]
call sub.rtl160.bpl__System__PWCharLen_qqrpb
lea edx, [ebp - 0x216]
mov ecx, ebx
xchg ecx, eax
call sub.rtl160.bpl__System__UStrFromPWCharLen_qqrr20System_UnicodeStringpbi
jmp 0x40f282
mov eax, ebx
call sub.rtl160.bpl__System__UStrClr_qqrpv
cmp si, 0x61
jae 0x40f2a4
lea edx, [ebp - 0x220]
mov eax, dword [ebx]
call sub.rtl160.bpl__System_Sysutils_AnsiUpperCaseFileName_qqrx20System_UnicodeString
mov edx, dword [ebp - 0x220]
mov eax, ebx
call sub.rtl160.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
jmp 0x40f2be
lea edx, [ebp - 0x224]
mov eax, dword [ebx]
call sub.rtl160.bpl__System_Sysutils_AnsiLowerCaseFileName_qqrx20System_UnicodeString
mov edx, dword [ebp - 0x224]
mov eax, ebx
call sub.rtl160.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
lea eax, [ebp - 0x228]
push eax
mov eax, dword [ebx]
mov dword [ebp - 0x230], eax
mov byte [ebp - 0x22c], 0x11
lea edx, [ebp - 0x230]
xor ecx, ecx
mov eax, 0x40f35c
call sub.rtl160.bpl__System_Sysutils_Format_qqrx20System_UnicodeStringpx14System_TVarRecxi
mov edx, dword [ebp - 0x228]
mov eax, ebx
call sub.rtl160.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40f311
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_SetErrorMode
ret