joyce8/EMBER2024-capa huggingface dataset:
Function at 0x469170
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x430
test ecx, ecx
je 0x4691a6
mov esi, ecx
mov dword [esp + 4], edx
mov dword [esp], 0
mov ebx, esp
push ebx
push 0
push 0
push 2
push str.DumpFolder
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_RegGetValueW]
test eax, eax
je 0x4691b5
xor ebx, ebx
mov eax, ebx
add esp, 0x430
pop esi
pop edi
pop ebx
pop ebp
ret
mov edi, dword [esp]
lea ebp, [esp + 0x14]
mov dword [esp + 8], ebp
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 0x104
test edi, edi
je 0x469218
xor eax, eax
cmp edi, 0x105
jb 0x4691f7
lea ecx, [esp + 8]
push 2
push edi
lea eax, [esp + 0x1c]
push eax
call fcn.0046e2c0
mov ebp, dword [esp + 8]
mov eax, dword [esp + 0xc]
mov ecx, edi
sub ecx, eax
je 0x469214
lea eax, [eax*2]
add eax, ebp
add ecx, ecx
push ecx
push 0
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
mov dword [esp + 0xc], edi
push ebx
push ebp
push 0
push 2
push str.DumpFolder
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_RegGetValueW]
test eax, eax
je 0x469250
xor ebx, ebx
mov eax, dword [esp + 8]
lea ecx, [esp + 0x14]
cmp eax, ecx
je 0x4691a8
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
jmp 0x4691a8
push 0
push 0
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
xor ebx, ebx
test eax, eax
je 0x469232
mov esi, eax
lea ebp, [esp + 0x228]
mov dword [esp + 0x21c], ebp
mov dword [esp + 0x220], 0
mov dword [esp + 0x224], 0x104
mov edi, ebp
cmp eax, 0x105
jb 0x4692b1
lea ecx, [esp + 0x21c]
push 2
push esi
push ebp
call fcn.0046e2c0
mov edi, dword [esp + 0x21c]
mov ebx, dword [esp + 0x220]
mov eax, esi
sub eax, ebx
je 0x4692c8
lea ecx, [edi + ebx*2]
add eax, eax
push eax
push 0
push ecx
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
mov dword [esp + 0x220], esi
push esi
push edi
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp esi, eax
jne 0x4692fb
dec esi
push dword [esp + 4]
push esi
push dword [esp + 0x224]
call fcn.004a8240
add esp, 0xc
test eax, eax
sete bl
jmp 0x4692fd
xor ebx, ebx
mov eax, dword [esp + 0x21c]
cmp eax, ebp
je 0x469232
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
jmp 0x469232
Function at 0x470810
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, ecx
mov ebx, dword [ecx + 8]
xor edx, edx
mov ecx, ebx
add ecx, 0x3f
setb dl
shld edx, ecx, 0x1a
je 0x47087c
mov ecx, dword [eax]
xor esi, esi
cmp edx, 4
jb 0x470870
mov esi, edx
and esi, 0xfffffffc
xor edi, edi
pcmpeqd xmm0, xmm0
nop dword [eax]
movdqu xmm1, xmmword [ecx + edi*8]
movdqu xmm2, xmmword [ecx + edi*8 + 0x10]
pxor xmm1, xmm0
pxor xmm2, xmm0
movdqu xmmword [ecx + edi*8], xmm1
movdqu xmmword [ecx + edi*8 + 0x10], xmm2
add edi, 4
cmp esi, edi
jne 0x470840
cmp esi, edx
je 0x47087c
nop dword [eax]
not dword [ecx + esi*8]
not dword [ecx + esi*8 + 4]
inc esi
cmp edx, esi
jne 0x470870
mov ecx, ebx
neg cl
mov esi, 0xffffffff
shr esi, cl
xor edi, edi
test cl, 0x20
mov ecx, esi
cmovne ecx, edi
mov ebp, 0xffffffff
cmove esi, ebp
test ebx, ebx
je 0x4708b6
cmp ebx, 0x41
jb 0x4708aa
mov eax, dword [eax]
lea eax, [eax + edx*8]
add eax, 0xfffffff8
mov edi, ecx
and dword [eax], esi
and dword [eax + 4], edi
pop esi
pop edi
pop ebx
pop ebp
ret
xor esi, esi
jmp 0x4708ac
Function at 0x47e950
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
push eax
mov eax, ecx
mov edx, dword [ecx + 8]
cmp edx, 0x40
ja 0x47e99d
mov esi, dword [eax]
mov ecx, edx
neg cl
mov edi, 0xffffffff
shr edi, cl
xor ebx, ebx
test cl, 0x20
mov ebp, edi
mov ecx, 0xffffffff
cmove edi, ecx
mov ecx, dword [eax + 4]
not ecx
not esi
cmovne ebp, ebx
test edx, edx
je 0x47eae4
mov ebx, ebp
and edi, esi
and ebx, ecx
mov dword [eax], edi
mov dword [eax + 4], ebx
jmp 0x47ea29
mov ecx, dword [eax]
xor ebx, ebx
mov esi, edx
add esi, 0x3f
setb bl
shld ebx, esi, 0x1a
xor esi, esi
cmp ebx, 4
jb 0x47e9f0
mov esi, ebx
and esi, 0xfffffffc
xor edi, edi
pcmpeqd xmm0, xmm0
nop
movdqu xmm1, xmmword [ecx + edi*8]
movdqu xmm2, xmmword [ecx + edi*8 + 0x10]
pxor xmm1, xmm0
pxor xmm2, xmm0
movdqu xmmword [ecx + edi*8], xmm1
movdqu xmmword [ecx + edi*8 + 0x10], xmm2
add edi, 4
cmp esi, edi
jne 0x47e9c0
cmp esi, ebx
je 0x47e9fc
nop dword [eax]
not dword [ecx + esi*8]
not dword [ecx + esi*8 + 4]
inc esi
cmp ebx, esi
jne 0x47e9f0
neg dl
mov esi, 0xffffffff
mov ecx, edx
shr esi, cl
mov ecx, 0xffffffff
xor edi, edi
test dl, 0x20
cmove edi, esi
cmove esi, ecx
mov ecx, dword [eax]
and dword [ecx + ebx*8 - 8], esi
and dword [ecx + ebx*8 - 4], edi
mov edx, dword [eax + 8]
cmp edx, 0x41
jae 0x47ea65
mov dword [esp], edx
mov esi, dword [eax]
mov edi, dword [eax + 4]
add esi, 1
adc edi, 0
mov ecx, edx
neg cl
mov ebx, 0xffffffff
shr ebx, cl
xor ebp, ebp
test cl, 0x20
mov ecx, ebx
mov edx, eax
mov eax, 0xffffffff
cmove ebx, eax
mov dword [edx], esi
mov dword [edx + 4], edi
cmovne ecx, ebp
cmp dword [esp], 0
je 0x47eae0
mov ebp, ecx
jmp 0x47eacf
xor ebx, ebx
mov ecx, edx
add ecx, 0x3f
setb bl
shld ebx, ecx, 0x1a
mov ecx, dword [eax]
add dword [ecx], 1
adc dword [ecx + 4], 0
jae 0x47eaa2
add dword [ecx + 8], 1
adc dword [ecx + 0xc], 0
jae 0x47eaa2
mov esi, 2
nop dword [eax]
cmp ebx, esi
je 0x47eaa2
add dword [ecx + esi*8], 1
adc dword [ecx + esi*8 + 4], 0
lea esi, [esi + 1]
jb 0x47ea90
neg dl
mov edi, ebx
mov ebx, 0xffffffff
mov ecx, edx
shr ebx, cl
mov ecx, 0xffffffff
xor ebp, ebp
test dl, 0x20
cmove ebp, ebx
cmove ebx, ecx
mov ecx, dword [eax]
lea edx, [ecx + edi*8]
add edx, 0xfffffff8
mov esi, dword [ecx + edi*8 - 8]
mov edi, dword [ecx + edi*8 - 4]
and esi, ebx
and edi, ebp
mov dword [edx], esi
mov dword [edx + 4], edi
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret
xor ebx, ebx
jmp 0x47eacf
xor edi, edi
jmp 0x47e98f
Function at 0x482c80
Capabilities:
Encode data using xor

Disassembly:
push esi
mov eax, dword [esp + 0xc]
test eax, eax
je 0x482d32
mov ecx, dword [esp + 8]
xor edx, edx
cmp eax, 4
jb 0x482ce0
mov edx, eax
and edx, 0xfffffffc
xor esi, esi
pcmpeqd xmm0, xmm0
nop word cs:[eax + eax]
movdqu xmm1, xmmword [ecx + esi*8]
movdqu xmm2, xmmword [ecx + esi*8 + 0x10]
pxor xmm1, xmm0
pxor xmm2, xmm0
movdqu xmmword [ecx + esi*8], xmm1
movdqu xmmword [ecx + esi*8 + 0x10], xmm2
add esi, 4
cmp edx, esi
jne 0x482cb0
cmp edx, eax
je 0x482cec
nop dword [eax]
not dword [ecx + edx*8]
not dword [ecx + edx*8 + 4]
inc edx
cmp eax, edx
jne 0x482ce0
mov edx, dword [ecx]
mov esi, dword [ecx + 4]
add edx, 1
adc esi, 0
mov dword [ecx], edx
mov dword [ecx + 4], esi
cmp eax, 1
je 0x482d32
or edx, esi
jne 0x482d32
add dword [ecx + 8], 1
adc dword [ecx + 0xc], 0
jae 0x482d32
mov edx, 2
nop word cs:[eax + eax]
cmp eax, edx
je 0x482d32
add dword [ecx + edx*8], 1
adc dword [ecx + edx*8 + 4], 0
lea edx, [edx + 1]
jb 0x482d20
pop esi
ret
Function at 0x4a5520
Capabilities:
Check if file exists

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0xa0
mov esi, dword [esp + 0xb8]
mov ecx, dword [esp + 0xb4]
lea eax, [esp + 0x20]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0x80
cmp byte [ecx + 0x11], 1
jne case.0x4a5564.2
movzx edx, byte [ecx + 0x10]
dec edx
cmp edx, 5
ja case.0x4a5564.2
xor eax, eax
xor ebp, ebp
jmp dword [edx*4 + 0x515fa4]
mov ebp, dword [ecx]
mov eax, dword [ecx + 4]
jmp case.0x4a5564.1
lea eax, [esp + 0x14]
push eax
call fcn.00465530
mov ebp, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov word [esp + 0x10], 0x105
mov dword [esp], ebp
mov dword [esp + 4], eax
mov ecx, esp
push esi
push ecx
mov edi, eax
call fcn.004a4e30
add esp, 8
mov ebx, eax
mov bh, 1
cmp esi, 1
je 0x4a55c7
mov word [esp + 0x10], 0x105
mov dword [esp], ebp
mov dword [esp + 4], edi
push esi
lea eax, [esp + 4]
push eax
call fcn.004a3320
add esp, 8
mov bh, al
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x20]
cmp eax, ecx
je 0x4a55dc
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
and bl, bh
mov eax, ebx
add esp, 0xa0
pop esi
pop edi
pop ebx
pop ebp
ret
mov ebp, dword [ecx]
movzx eax, byte [ebp]
test al, 1
je 0x4a5611
mov eax, dword [ebp + 4]
mov ebp, dword [ebp + 8]
jmp case.0x4a5564.1
mov ebp, dword [ecx]
test ebp, ebp
je 0x4a5619
push ebp
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
jmp case.0x4a5564.1
inc ebp
shr eax, 1
jmp case.0x4a5564.1
xor eax, eax
xor ebp, ebp
jmp case.0x4a5564.1
Function at 0x4a70d0
Capabilities:
Get common file path

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x214
lea edi, [esp + 0xc]
mov dword [esp], edi
mov dword [esp + 4], 0
mov dword [esp + 8], 0x104
mov eax, 0x104
xor ecx, ecx
mov ebp, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov esi, esp
cmp ecx, eax
je 0x4a7121
ja 0x4a711b
cmp dword [esp + 8], eax
jae 0x4a711b
mov ecx, esi
push 2
push eax
push edi
mov ebx, eax
call fcn.0046e2c0
mov eax, ebx
mov dword [esp + 4], eax
mov ecx, eax
push dword [esp]
push ecx
call ebp
test eax, eax
je 0x4a716a
mov ecx, dword [esp + 4]
cmp eax, ecx
ja 0x4a7100
mov dword [esp + 4], eax
mov edx, dword [esp]
mov ecx, 0xfde9
mov esi, dword [esp + 0x228]
push esi
push eax
call fcn.004ab0c0
add esp, 8
test eax, eax
jne 0x4a7179
push 0
push esi
call fcn.004a3e30
add esp, 8
call fcn.00504d20
mov edx, eax
xor eax, eax
jmp 0x4a7179
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004b0bb0
add esp, 4
mov ecx, dword [esp]
cmp ecx, edi
je 0x4a7191
push ecx
mov esi, edx
mov edi, eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov eax, edi
mov edx, esi
add esp, 4
add esp, 0x214
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x4a7340
Capabilities:
Create directory

Disassembly:
push edi
push esi
sub esp, 0x10c
mov eax, dword [esp + 0x118]
lea esi, [esp + 0xc]
mov dword [esp], esi
mov dword [esp + 4], 0
mov dword [esp + 8], 0x80
mov ecx, esp
push 0xf8
push ecx
push eax
call fcn.004a7d20
add esp, 0xc
test eax, eax
jne 0x4a73ab
push 0
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4a73a2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4a73cc
cmp byte [esp + 0x11c], 0
je 0x4a73cc
call fcn.00504d20
mov edx, eax
xor eax, eax
mov ecx, dword [esp]
cmp ecx, esi
je 0x4a73c3
push ecx
mov esi, edx
mov edi, eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov eax, edi
mov edx, esi
add esp, 4
add esp, 0x10c
pop esi
pop edi
ret
push eax
call fcn.004b0bb0
add esp, 4
mov ecx, dword [esp]
cmp ecx, esi
jne 0x4a73b2
jmp 0x4a73c3

Function at 0x4a75a0
Capabilities:
Read file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
mov edi, edx
mov ebx, ecx
push 0x1000
call sub.libc.dll_operator_new___unsigned_int_
add esp, 4
mov esi, eax
push 0x1000
push eax
nop dword [eax]
push ebx
call sub.api_ms_win_crt_stdio_l1_1_0.dll__read
add esp, 0xc
mov ebp, eax
test eax, eax
jle 0x4a75ea
push ebp
push esi
push edi
call sub.api_ms_win_crt_stdio_l1_1_0.dll__write
add esp, 0xc
test eax, eax
js 0x4a7600
sub ebp, eax
jne 0x4a75cf
push 0x1000
push esi
jmp 0x4a75c0
push esi
call sub.libc.dll_operator_delete___void_
add esp, 4
test ebp, ebp
js 0x4a7609
xor esi, esi
call fcn.00504d20
jmp 0x4a7616
push esi
call sub.libc.dll_operator_delete___void_
add esp, 4
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov esi, dword [eax]
call fcn.00504e40
mov edx, eax
mov eax, esi
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x4a7670
Capabilities:
Read file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0xa0
mov esi, dword [esp + 0xb4]
mov ebp, dword [esp + 0xb8]
lea ecx, [esp + 8]
call fcn.004c6e80
push 0x1000
call sub.libc.dll_operator_new_unsigned_int_
add esp, 4
mov edi, eax
push 0x1000
push 0
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
push 0x1000
push edi
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll__read
add esp, 0xc
test eax, eax
jle 0x4a76ff
lea ebx, [esp + 8]
nop word [eax + eax]
mov dword [esp], edi
mov dword [esp + 4], eax
sub esp, 8
movsd xmm0, qword [esp + 8]
movsd qword [esp], xmm0
mov ecx, ebx
call fcn.004c6ea0
push 0x1000
push edi
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll__read
add esp, 0xc
test eax, eax
jg 0x4a76d0
test eax, eax
js 0x4a7713
lea ecx, [esp + 8]
push esi
call fcn.004c7040
and byte [esi + 0x10], 0xfe
jmp 0x4a7729
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ebx, dword [eax]
call fcn.00504e40
or byte [esi + 0x10], 1
mov dword [esi], ebx
mov dword [esi + 4], eax
push edi
call sub.libc.dll_operator_delete_void_
add esp, 4
mov eax, esi
add esp, 0xa0
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x4a7bb0
Capabilities:
Read file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x14
mov ebp, dword [esp + 0x34]
mov edi, dword [esp + 0x30]
mov eax, dword [edi + 4]
lea ecx, [edi + 0xc]
mov dword [esp + 4], ecx
mov ebx, eax
lea esi, [ebx + ebp]
cmp eax, esi
je 0x4a7bf8
nop word cs:[eax + eax]
ja 0x4a7bf5
cmp dword [edi + 8], esi
jae 0x4a7bf5
mov ecx, edi
push 1
push esi
push dword [esp + 0xc]
call fcn.0046e2c0
mov dword [edi + 4], esi
mov eax, dword [edi]
add eax, ebx
mov dword [esp], 0
push 0
lea ecx, [esp + 4]
push ecx
push ebp
push eax
push dword [esp + 0x3c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4a7c30
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
je 0x4a7c30
cmp eax, 0x26
jne 0x4a7c58
nop word [eax + eax]
mov eax, dword [esp]
test eax, eax
je 0x4a7c45
add ebx, eax
mov eax, dword [edi + 4]
lea esi, [ebx + ebp]
cmp eax, esi
jne 0x4a7be0
jmp 0x4a7bf8
xor ecx, ecx
mov eax, dword [esp + 0x28]
mov dword [eax], ecx
mov dword [edi + 4], ebx
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret
push eax
call fcn.004b0bb0
add esp, 4
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
sub esp, 0xc
movsd xmm0, qword [esp + 0x18]
movsd qword [esp + 4], xmm0
lea eax, [esp + 0x14]
mov dword [esp], eax
call fcn.0049cf90
add esp, 0xc
mov ecx, dword [esp + 8]
jmp 0x4a7c47
Function at 0x4a84c0
Capabilities:
Set current directory

Disassembly:
push edi
push esi
sub esp, 0x10c
mov eax, dword [esp + 0x118]
lea esi, [esp + 0xc]
mov dword [esp], esi
mov dword [esp + 4], 0
mov dword [esp + 8], 0x80
mov ecx, esp
push 0x104
push ecx
push eax
call fcn.004a7d20
add esp, 0xc
test eax, eax
jne 0x4a8511
push dword [esp]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x4a8532
call fcn.00504d20
mov edx, eax
xor eax, eax
mov ecx, dword [esp]
cmp ecx, esi
je 0x4a8529
push ecx
mov esi, edx
mov edi, eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov eax, edi
mov edx, esi
add esp, 4
add esp, 0x10c
pop esi
pop edi
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004b0bb0
add esp, 4
mov ecx, dword [esp]
cmp ecx, esi
jne 0x4a8518
jmp 0x4a8529

Function at 0x4a88e0
Capabilities:
Get disk information

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x110
mov dword [esp], edx
mov edi, ecx
lea eax, [esp + 0x10]
mov dword [esp + 4], eax
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0x80
mov esi, 0x80
mov ebp, dword [sym.imp.KERNEL32.dll_GetVolumePathNameW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [eax + eax]
mov eax, dword [esp + 8]
cmp eax, esi
je 0x4a8963
ja 0x4a895f
cmp dword [esp + 0xc], esi
jae 0x4a8945
lea ecx, [esp + 4]
push 2
push esi
lea eax, [esp + 0x18]
push eax
call fcn.0046e2c0
mov eax, dword [esp + 8]
mov ecx, esi
sub ecx, eax
je 0x4a895f
add eax, eax
add eax, dword [esp + 4]
add ecx, ecx
push ecx
push 0
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
mov dword [esp + 8], esi
push esi
push dword [esp + 8]
push dword [edi]
call ebp
test eax, eax
jne 0x4a8994
call ebx
add esi, esi
cmp eax, 0x7a
je 0x4a8920
push eax
call fcn.004b0bb0
add esp, 4
mov esi, eax
mov edi, edx
mov eax, dword [esp + 4]
lea ecx, [esp + 0x10]
cmp eax, ecx
jne 0x4a89fc
jmp 0x4a8a05
mov ecx, dword [esp + 8]
lea eax, [ecx + 1]
cmp eax, dword [esp + 0xc]
ja 0x4a8a20
mov eax, dword [esp + 4]
mov word [eax + ecx*2], 0
inc dword [esp + 8]
mov esi, dword [esp + 4]
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_wcslen
add esp, 4
mov dword [esp + 8], eax
push esi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
lea ecx, [eax - 4]
cmp ecx, 3
jb 0x4a89e1
cmp eax, 2
je 0x4a89e1
cmp eax, 3
jne 0x4a8a14
mov eax, dword [esp]
mov byte [eax], 1
jmp 0x4a89e7
mov eax, dword [esp]
mov byte [eax], 0
xor esi, esi
call fcn.00504d20
mov edi, eax
mov eax, dword [esp + 4]
lea ecx, [esp + 0x10]
cmp eax, ecx
je 0x4a8a05
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
mov eax, esi
mov edx, edi
add esp, 0x110
pop esi
pop edi
pop ebx
pop ebp
ret
mov esi, 2
call fcn.00504e40
jmp 0x4a89ee
lea ecx, [esp + 4]
push 2
push eax
lea eax, [esp + 0x18]
push eax
call fcn.0046e2c0
mov ecx, dword [esp + 8]
jmp 0x4a89a1
Function at 0x4a9310
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push edi
push esi
sub esp, 0x10c
mov eax, dword [esp + 0x118]
lea edi, [esp + 0xc]
mov dword [esp], edi
mov dword [esp + 4], 0
mov dword [esp + 8], 0x80
mov ecx, esp
push 0x104
push ecx
push eax
call fcn.004a7d20
add esp, 0xc
test eax, eax
je 0x4a934f
mov esi, eax
jmp 0x4a93b6
push dword [esp]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4a9386
mov ecx, dword [esp + 0x11c]
cmp ecx, 1
jne 0x4a9370
mov edx, eax
and edx, 1
jne 0x4a937a
cmp ecx, 2
jne 0x4a93ad
and eax, 0x10
je 0x4a93ad
mov esi, 0xd
call fcn.00504e40
jmp 0x4a93b4
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [eax - 4]
cmp ecx, 0xfffffffd
ja 0x4a93a1
push eax
call fcn.004b0bb0
add esp, 4
mov esi, eax
jmp 0x4a93b6
mov esi, 2
call fcn.00504e40
jmp 0x4a93b4
xor esi, esi
call fcn.00504d20
mov edx, eax
mov eax, dword [esp]
cmp eax, edi
je 0x4a93ca
push eax
mov edi, edx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov edx, edi
add esp, 4
mov eax, esi
add esp, 0x10c
pop esi
pop edi
ret

Function at 0x4a9710
Capabilities:
Check if file exists

Disassembly:
push esi
mov esi, dword [esp + 0xc]
push dword [esp + 8]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__get_osfhandle]
add esp, 4
mov ecx, eax
mov edx, esi
pop esi
jmp fcn.004a9510

Function at 0x4a9730
Capabilities:
Check if file exists

Disassembly:
mov ecx, dword [esp + 4]
mov edx, dword [esp + 8]
jmp fcn.004a9510
Function at 0x4a9aa0
Capabilities:
Parse pe header

Disassembly:
mov eax, dword [ecx + 4]
test eax, eax
je 0x4a9b43
push ebx
push edi
push esi
sub esp, 0x11c
mov esi, ecx
mov ecx, dword [ecx]
cmp ecx, 2
jae 0x4a9b44
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [esi + 0xc], 1
jne 0x4a9b31
mov byte [esp], 0
lea edi, [esp + 0x1c]
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0x80
mov ecx, dword [esi + 8]
lea edx, [esp + 0x10]
push 0
call fcn.004a8ac0
add esp, 4
mov bl, 1
test eax, eax
jne 0x4a9b13
lea ecx, [esp + 0x10]
mov edx, esp
call fcn.004a88e0
cmp byte [esp], 0
sete bl
mov eax, dword [esp + 0x10]
cmp eax, edi
je 0x4a9b24
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
test bl, bl
je 0x4a9b31
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 0x11c
pop esi
pop edi
pop ebx
ret
movzx edi, word [eax]
xor edx, edx
cmp edi, 0x5a4d
setne bl
cmp ecx, 0x40
jb 0x4a9ac1
mov dl, bl
test edx, edx
jne 0x4a9ac1
mov edx, dword [eax + 0x3c]
cmp ecx, edx
cmovb edx, ecx
sub ecx, edx
cmp ecx, 4
jb 0x4a9ac1
cmp dword [eax + edx], 0x4550
jne 0x4a9ac1
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [esi + 0xc], 1
jne 0x4a9b31
movzx eax, byte [0x533438]
test al, al
je 0x4a9bab
cmp byte [0x5347c4], 0
jne 0x4a9b28
jmp 0x4a9ace
push 0x533438
call sub.libc.dll___cxa_guard_acquire
add esp, 4
test eax, eax
je 0x4a9b9d
lea edi, [esp + 0x10]
push edi
call fcn.004afbf0
add esp, 4
movaps xmm0, xmmword [0x515c20]
movups xmmword [esp], xmm0
mov eax, esp
push eax
push edi
call fcn.004ac740
add esp, 8
mov byte [0x5347c4], al
push 0x533438
call sub.libc.dll___cxa_guard_release
add esp, 4
jmp 0x4a9b9d

Function at 0x4a9c10
Capabilities:
Get system information on windows

Disassembly:
sub esp, 0x24
mov eax, esp
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [esp + 0x1c]
add esp, 0x24
ret
Function at 0x4aa440
Capabilities:
Timestomp file

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x34
mov esi, dword [esp + 0x48]
mov ebx, dword [esp + 0x58]
mov edx, dword [esp + 0x54]
mov ecx, dword [esp + 0x4c]
mov eax, 4
test bl, 4
jne 0x4aa46c
mov eax, dword [esp + 0x50]
mov eax, dword [eax*4 + 0x515eb4]
movzx edx, dl
bswap edx
mov edi, edx
shl edi, 7
shl edx, 5
and edx, 0x40000000
or edx, edi
mov edi, ebx
and edi, 8
shl edi, 0xd
or edi, edx
mov edx, ebx
and edx, 0x20
lea edi, [edi + edx*8]
mov ebp, ebx
and ebp, 0x10
shr ebp, 4
mov edx, esp
push ebp
push 0x80
push edi
push eax
call fcn.004aa580
add esp, 0x10
test eax, eax
je 0x4aa4e3
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], edx
sub esp, 0xc
movsd xmm0, qword [esp + 0x20]
movsd qword [esp + 4], xmm0
lea eax, [esp + 0x14]
mov dword [esp], eax
call fcn.0049cf90
add esp, 0xc
or byte [esi + 4], 1
mov eax, dword [esp + 8]
mov dword [esi], eax
jmp 0x4aa521
test bl, 0x20
jne 0x4aa4ed
mov ebx, dword [esp]
jmp 0x4aa51b
lea ebx, [esp + 0x24]
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
lea edi, [esp + 0x1c]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
mov ebx, dword [esp]
test eax, eax
je 0x4aa52b
push 0
push edi
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
test eax, eax
je 0x4aa52b
and byte [esi + 4], 0xfe
mov dword [esi], ebx
mov eax, esi
add esp, 0x34
pop esi
pop edi
pop ebx
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.004b0bb0
add esp, 4
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
sub esp, 0xc
movsd xmm0, qword [esp + 0x18]
movsd qword [esp + 4], xmm0
lea eax, [esp + 0x10]
mov dword [esp], eax
call fcn.0049cf90
add esp, 0xc
or byte [esi + 4], 1
mov eax, dword [esp + 4]
jmp 0x4aa4df

Function at 0x4aa9a0
Capabilities:
Read file on windows

Disassembly:
push ebx
push edi
push esi
sub esp, 0x24
mov esi, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
movsd xmm0, qword [esp + 0x44]
xorps xmm1, xmm1
movups xmmword [esp + 0x10], xmm1
mov dword [esp + 0x20], 0
movsd qword [esp + 0x18], xmm0
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
mov dword [esp], 0
lea edi, [esp + 0x10]
mov ebx, esp
push edi
push ebx
push edx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4aaa00
and byte [esi + 4], 0xfe
mov eax, dword [esp]
mov dword [esi], eax
mov eax, esi
add esp, 0x24
pop esi
pop edi
pop ebx
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
je 0x4aa9ee
cmp eax, 0x26
je 0x4aa9ee
push eax
call fcn.004b0bb0
add esp, 4
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
sub esp, 0xc
movsd xmm0, qword [esp + 0x14]
movsd qword [esp + 4], xmm0
lea eax, [esp + 0x10]
mov dword [esp], eax
call fcn.0049cf90
add esp, 0xc
or byte [esi + 4], 1
mov eax, dword [esp + 4]
jmp 0x4aa9f5