joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4cb4d0
Capabilities:
Get common file path
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x414
mov eax, dword [0x594584]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x20c]
push edi
push 0x208
push 0
push eax
call fcn.0050f150
mov bl, byte [ebp + 0xc]
lea eax, [ebp - 0x20c]
add esp, 0xc
mov ecx, 0x23
test bl, bl
push eax
push 0
mov eax, 0x1a
cmove eax, ecx
push 0
or eax, 0x8000
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x4cb586
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4cb537
sub ecx, edx
lea eax, [ebp - 0x20c]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.0040f730
cmp dword [esi + 0x14], 8
mov eax, esi
mov ecx, dword [esi + 0x10]
jb 0x4cb562
mov eax, dword [esi]
cmp word [eax + ecx*2 - 2], 0x5c
je 0x4cb573
push 0x5c
mov ecx, esi
call fcn.004c79b0
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004cc1ce
mov esp, ebp
pop ebp
ret
test bl, bl
je 0x4cb555
push 0x208
lea eax, [ebp - 0x414]
push 0
push eax
call fcn.0050f150
add esp, 0xc
lea eax, [ebp - 0x414]
push 0x104
push eax
push str._appdata_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov edi, eax
test edi, edi
je 0x4cb64d
cmp edi, 0x104
jb 0x4cb629
xor ecx, ecx
lea eax, [edi + 1]
mov edx, 2
mul edx
push 0x59b6d0
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004cc2b2
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x4cb64d
lea ecx, [edi*2 + 2]
push ecx
push 0
push ebx
call fcn.0050f150
add esp, 0xc
lea eax, [edi + 1]
push eax
push ebx
push str._appdata_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push ebx
mov ecx, esi
call fcn.00415060
push ebx
call fcn.004cc2ad
add esp, 4
jmp 0x4cb555
lea ecx, [ebp - 0x414]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4cb632
sub ecx, edx
lea eax, [ebp - 0x414]
sar ecx, 1
push ecx
jmp 0x4cb54d
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004cc1ce
mov esp, ebp
pop ebp
ret
Function at 0x4cb6d0
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5495e8
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x594584]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edx, dword [ebp + 8]
test edx, edx
jne 0x4cb709
xor al, al
jmp 0x4cb8f5
mov ecx, edx
mov dword [ebp - 0x30], 0
xor eax, eax
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4cb722
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x40]
call fcn.0040f730
mov dword [ebp - 4], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
lea eax, [ebp - 0x4c]
mov byte [ebp - 4], 1
push eax
push 0x5518a4
lea ecx, [ebp - 0x40]
call fcn.004cb990
test eax, eax
je 0x4cb78c
lea eax, [ebp - 0x4c]
push eax
push 0x55c880
lea ecx, [ebp - 0x40]
call fcn.004cb990
test eax, eax
je 0x4cb78c
xor bl, bl
jmp 0x4cb8b5
mov ecx, dword [ebp - 0x48]
mov eax, 0x2aaaaaab
mov esi, dword [ebp - 0x4c]
sub ecx, esi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 1
jne 0x4cb7b1
mov bl, al
jmp 0x4cb8b5
push esi
lea ecx, [ebp - 0x28]
call fcn.004c69a0
mov ecx, dword [ebp - 0x48]
mov eax, 0x2aaaaaab
sub ecx, dword [ebp - 0x4c]
mov edi, 1
imul ecx
mov byte [ebp - 4], 2
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, edi
jbe 0x4cb85f
lea esi, [edi + 0x17]
push 1
push 0x5518a4
lea ecx, [ebp - 0x28]
call fcn.0040f4c0
mov eax, dword [ebp - 0x4c]
add eax, esi
cmp dword [eax + 0x14], 8
mov ecx, dword [eax + 0x10]
jb 0x4cb804
mov eax, dword [eax]
push ecx
push eax
lea ecx, [ebp - 0x28]
call fcn.0040f4c0
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call fcn.004cb2d0
add esp, 4
cmp eax, 2
je 0x4cb840
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call fcn.005276f6
add esp, 4
cmp eax, 0xffffffff
je 0x4cb893
mov ecx, dword [ebp - 0x48]
mov eax, 0x2aaaaaab
sub ecx, dword [ebp - 0x4c]
inc edi
imul ecx
add esi, 0x18
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jb 0x4cb7e5
mov bl, 1
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x4cb8a1
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4cb897
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4cb911
jmp 0x4cb897
xor bl, bl
jmp 0x4cb861
push edx
push ecx
call fcn.004cbf26
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
lea ecx, [ebp - 0x4c]
call fcn.00449070
mov edx, dword [ebp - 0x2c]
cmp edx, 8
jb 0x4cb8f3
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4cb8e9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4cb916
push edx
push ecx
call fcn.004cbf26
add esp, 8
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004cc1ce
mov esp, ebp
pop ebp
ret
call fcn.005127d9
call fcn.005127d9
int3
Function at 0x4cf3b1
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateThread]
pop ebp
ret
Function at 0x4e5950
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x54a811
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x594584]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], 0
mov dword [ebp - 4], 1
mov dword [ebp - 0x1c], 0
mov dword [edi], 0
call fcn.0040c4c0
mov ecx, eax
test ecx, ecx
je 0x4e5ae4
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [edi], eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x24], 1
push eax
push 0xf003f
push 0
push dword [ebp + 0x10]
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4e5aa5
lea eax, [ebp - 0x14]
xorps xmm0, xmm0
push eax
push 0
lea eax, [ebp - 0x18]
movlpd qword [ebp - 0x18], xmm0
push eax
push 0
push ebx
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4e5a97
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4e5aa5
add eax, 0x10
push 0x59b6d0
push eax
mov dword [ebp - 0x20], eax
call fcn.004cc2b2
mov esi, eax
add esp, 8
test esi, esi
je 0x4e5aa5
push dword [ebp - 0x20]
push 0
push esi
call fcn.0050f150
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
push esi
push 0
push 0
push ebx
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x4e5a5a
push esi
call fcn.004cc2ad
add esp, 4
jmp 0x4e5aa5
mov ecx, esi
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4e5a60
sub ecx, edx
sar ecx, 1
je 0x4e5a8e
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4e5a76
sub ecx, edx
sar ecx, 1
push ecx
push esi
mov ecx, edi
call fcn.004122c0
push esi
call fcn.004cc2ad
add esp, 4
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x4e5aa5
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [ebp + 0x10]
or eax, 0xffffffff
mov byte [ebp - 4], 0
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4e5ac4
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004cc1ce
mov esp, ebp
pop ebp
ret 0x10
push 0x80004005
call fcn.00409540
int3
Function at 0x4e5af0
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x594584]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x14]
mov esi, edi
mov dword [ebp - 0xc], eax
lea edx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4e5b14
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push 0xf003f
push 0
push dword [ebp + 0xc]
sub esi, edx
push ecx
sar esi, 1
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
xor ebx, ebx
test eax, eax
sete bl
test eax, eax
jne 0x4e5b76
lea eax, [esi*2 + 2]
push eax
push edi
push 1
push 0
push dword [ebp - 0xc]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
neg eax
sbb ebx, ebx
mov eax, dword [ebp - 8]
inc ebx
test eax, eax
je 0x4e5b76
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp + 0xc]
or ecx, 0xffffffff
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x4e5b91
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004cc1ce
mov esp, ebp
pop ebp
ret 0x10

Function at 0x4e75c0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp fcn.004e71a0
Function at 0x4e87f0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x54aaf3
mov eax, dword fs:[0]
push eax
sub esp, 0x84
mov eax, dword [0x594584]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x80], 0
mov dword [edi], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x7c], 0
lea eax, [ebp - 0x7c]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x80]
push eax
call fcn.0044edf0
mov eax, dword [ebp - 0x80]
add esp, 8
test eax, eax
je 0x4e8a03
mov esi, dword [sym.imp.OLEAUT32.dll_VariantInit]
push eax
call esi
test eax, eax
je 0x4e8a03
mov eax, dword [ebp - 0x7c]
test eax, eax
je 0x4e8a03
push eax
call esi
test eax, eax
je 0x4e8a03
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x8c], 0
mov dword [ebp - 0x88], 0
push 0x201
push dword [ebp - 0x80]
lea ecx, [ebp - 0x90]
mov byte [ebp - 4], 2
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.0044e4d0
mov esi, dword [ebp - 0x90]
test eax, eax
jne 0x4e89f4
push 0x64
lea eax, [ebp - 0x74]
push 0
push eax
call fcn.0050f150
add esp, 0xc
mov dword [ebp - 0x78], 0x64
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x84]
push eax
push 0
push dword [ebp - 0x7c]
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4e89f4
mov eax, dword [ebp - 0x84]
cmp eax, 1
je 0x4e891b
cmp eax, 2
jne 0x4e89f4
mov ecx, dword [ebp - 0x78]
test ecx, ecx
je 0x4e893c
test cl, 1
jne 0x4e89f4
mov eax, ecx
shr eax, 1
cmp word [ebp + eax*2 - 0x76], 0
je 0x4e8942
jmp 0x4e89f4
xor eax, eax
mov word [ebp - 0x74], ax
shr ecx, 1
cmp ecx, 0x2d
jne 0x4e89f4
lea ecx, [ebp - 0x78]
call fcn.0042ae90
lea eax, [ebp - 0x74]
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0x78]
call fcn.004e6ce0
lea eax, [ebp - 0x84]
mov dword [ebp - 0x84], 0
push eax
lea eax, [ebp - 0x20]
push 0x5681dc
push eax
call fcn.004e8e00
push 0x2a
push dword [ebp - 0x78]
call fcn.004e71a0
movzx eax, al
add esp, 0x14
cmp dword [ebp - 0x84], eax
jne 0x4e89ec
lea edx, [ebp - 0x74]
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x4e89a2
sub edx, ecx
lea eax, [ebp - 0x74]
sar edx, 1
mov ecx, ebx
push edx
push eax
call fcn.004e6aa0
push dword [0x594680]
lea eax, [ebp - 0x74]
push dword [0x59467c]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCmpNIW]
test eax, eax
jne 0x4e89dd
mov dword [edi], 1
lea ecx, [ebp - 0x78]
call fcn.00407860
mov edi, 1
jmp 0x4e89f6
lea ecx, [ebp - 0x78]
call fcn.00407860
xor edi, edi
test esi, esi
je 0x4e8a05
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4e8a05
xor edi, edi
push dword [ebp - 0x7c]
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
call esi
push dword [ebp - 0x80]
call esi
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004cc1ce
mov esp, ebp
pop ebp
ret
Function at 0x4e8a40
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
push esi
mov esi, ecx
test edx, edx
jne 0x4e8a55
lea eax, [edx + 0xd]
pop esi
pop ebp
ret 0xc
mov eax, edx
push edi
lea edi, [eax + 2]
nop dword [eax + eax]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4e8a60
sub eax, edi
sar eax, 1
lea eax, [eax*2 + 2]
push eax
push edx
push dword [ebp + 0x10]
push 0
push dword [ebp + 8]
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
pop edi
pop esi
pop ebp
ret 0xc
Function at 0x4ebca0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
mov eax, dword [edi]
add eax, eax
mov dword [edi], 0
mov dword [ebp + 0x10], eax
lea eax, [ebp + 0x10]
push eax
push esi
lea eax, [ebp + 0xc]
push eax
push 0
push dword [ebp + 8]
push dword [ecx]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4ebd11
mov eax, dword [ebp + 0xc]
cmp eax, 1
je 0x4ebcdf
cmp eax, 2
jne 0x4ebcfb
mov ecx, dword [ebp + 0x10]
test esi, esi
je 0x4ebd0b
test ecx, ecx
je 0x4ebd06
test cl, 1
jne 0x4ebcfb
mov eax, ecx
shr eax, 1
cmp word [esi + eax*2 - 2], 0
je 0x4ebd0b
pop edi
mov eax, 0xd
pop esi
pop ebp
ret 0xc
xor eax, eax
mov word [esi], ax
shr ecx, 1
xor eax, eax
mov dword [edi], ecx
pop edi
pop esi
pop ebp
ret 0xc
Function at 0x531e33
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 8]
and eax, 0x3f
mov edx, dword [ebp + 0xc]
push ebx
sar ecx, 6
push esi
push edi
imul edi, eax, 0x30
mov eax, dword [ecx*4 + 0x5a20c8]
mov dword [ebp - 0xc], ecx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x531e74
cmp byte [edx], 0xa
jne 0x531e74
or byte [eax + edi + 0x28], 4
jmp 0x531e79
and byte [eax + edi + 0x28], 0xfb
lea eax, [edx + ecx]
mov ebx, edx
mov dword [ebp - 8], eax
mov esi, edx
cmp edx, eax
jae 0x531f6a
mov al, byte [ebx]
cmp al, 0x1a
je 0x531f4b
cmp al, 0xd
je 0x531ea2
mov byte [esi], al
inc esi
inc ebx
jmp 0x531f40
lea eax, [ebx + 1]
cmp eax, dword [ebp - 8]
jae 0x531ec2
cmp byte [eax], 0xa
jne 0x531eb7
push 2
mov byte [esi], 0xa
pop eax
jmp 0x531ebd
xor eax, eax
mov byte [esi], 0xd
inc eax
add ebx, eax
inc esi
jmp 0x531f40
push 0
mov ebx, eax
lea eax, [ebp - 0x14]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x531f39
cmp dword [ebp - 0x14], 0
je 0x531f39
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x5a20c8]
test byte [eax + edi + 0x28], 0x48
je 0x531f10
mov dl, byte [ebp - 1]
cmp dl, 0xa
jne 0x531f00
mov byte [esi], dl
jmp 0x531f3c
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x5a20c8]
mov byte [eax + edi + 0x2a], dl
jmp 0x531f3c
cmp byte [ebp - 1], 0xa
jne 0x531f22
mov edx, dword [ebp + 0xc]
cmp esi, edx
jne 0x531f22
mov byte [esi], 0xa
jmp 0x531ebf
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.005234d7
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x531f3d
mov byte [esi], 0xd
inc esi
mov edx, dword [ebp + 0xc]
cmp ebx, dword [ebp - 8]
jb 0x531e8b
jmp 0x531f6a
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x5a20c8]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x531f65
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x531f6a
mov cl, byte [ebx]
mov byte [esi], cl
inc esi
sub esi, edx
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x531f75
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 8]
and eax, 0x3f
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
sar ecx, 6
imul edi, eax, 0x30
mov dword [ebp - 8], ecx
push 0xa
mov eax, dword [ecx*4 + 0x5a20c8]
pop ebx
mov edx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], edx
mov edx, dword [ebp + 0xc]
test esi, esi
je 0x531fb9
cmp word [edx], bx
jne 0x531fb9
or byte [edi + eax + 0x28], 4
jmp 0x531fbe
and byte [edi + eax + 0x28], 0xfb
lea eax, [edx + esi*2]
mov ebx, edx
mov dword [ebp - 0xc], eax
mov esi, edx
cmp edx, eax
jae 0x532112
mov dword [ebp - 0x10], 0xd
movzx eax, word [ebx]
cmp eax, 0x1a
je 0x5320f2
cmp ax, word [ebp - 0x10]
je 0x531ff7
mov word [esi], ax
add esi, 2
add ebx, 2
jmp 0x5320e7
lea eax, [ebx + 2]
cmp eax, dword [ebp - 0xc]
jae 0x53201d
push 0xa
pop ecx
cmp word [eax], cx
jne 0x53200d
push ecx
pop eax
push 4
jmp 0x532012
push 0xd
pop eax
push 2
mov word [esi], ax
pop eax
add ebx, eax
jmp 0x5320e1
push 0
mov ebx, eax
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5320d8
cmp dword [ebp - 0x18], 0
je 0x5320d8
mov ecx, dword [ebp - 8]
push 0xa
mov eax, dword [ecx*4 + 0x5a20c8]
test byte [edi + eax + 0x28], 0x48
pop eax
je 0x5320a4
mov dx, word [ebp - 4]
cmp dx, ax
jne 0x532068
mov word [esi], ax
jmp 0x53209c
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ecx*4 + 0x5a20c8]
mov word [ebp - 0x20], dx
push 0xa
mov byte [edi + eax + 0x2a], dl
mov ecx, dword [ecx*4 + 0x5a20c8]
mov al, byte [ebp - 0x1f]
pop edx
mov byte [edi + ecx + 0x2b], al
mov ecx, dword [ebp - 8]
mov eax, dword [ecx*4 + 0x5a20c8]
mov byte [edi + eax + 0x2c], dl
mov edx, dword [ebp + 0xc]
add esi, 2
jmp 0x5320e7
cmp word [ebp - 4], ax
jne 0x5320b9
mov edx, dword [ebp + 0xc]
cmp esi, edx
jne 0x5320b9
mov word [esi], ax
add esi, 2
jmp 0x5320e7
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.005234d7
mov edx, dword [ebp + 0xc]
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x5320e4
jmp 0x5320db
mov edx, dword [ebp + 0xc]
push 0xd
pop eax
mov word [esi], ax
add esi, 2
mov ecx, dword [ebp - 8]
cmp ebx, dword [ebp - 0xc]
jb 0x531fd7
jmp 0x532112
mov ecx, dword [ecx*4 + 0x5a20c8]
mov al, byte [edi + ecx + 0x28]
test al, 0x40
jne 0x532109
or al, 2
mov byte [edi + ecx + 0x28], al
jmp 0x532112
mov cx, word [ebx]
mov word [esi], cx
add esi, 2
sub esi, edx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x5352b5
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00535132

Function at 0x5363e0
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00536082

Function at 0x53bf30
Capabilities:
Check if file exists
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x54ccc0
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x594584]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, dword [ebp + 8]
test edi, edi
je 0x53c079
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x53c079
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x53c079
push edi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x53c079
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 5
push SysReAllocStringLen
push edi
mov dword [ebp - 0x14], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x18], edi
cmp edi, 0xffffffff
je 0x53c065
lea eax, [ebp - 0x20]
xorps xmm0, xmm0
push eax
push edi
movq qword [ebp - 0x20], xmm0
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x53c05e
cmp dword [ebp - 0x1c], ebx
jne 0x53c05e
mov ecx, dword [esi + 0x10]
mov eax, dword [ebp - 0x20]
mov dword [ebp - 4], ebx
cmp eax, ecx
ja 0x53bffd
mov dword [esi + 0x10], eax
mov ecx, esi
cmp dword [esi + 0x14], 0x10
jb 0x53bff7
mov ecx, dword [esi]
mov byte [ecx + eax], 0
jmp 0x53c009
sub eax, ecx
mov ecx, esi
push 0
push eax
call fcn.0040f050
push 0
lea eax, [ebp + 8]
mov dword [ebp + 8], 0
push eax
push dword [ebp - 0x20]
mov ecx, esi
push 0
call fcn.004345ce
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp + 8]
jne 0x53c05e
push edi
mov ebx, 1
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4060cb
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x40d448]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.00405466
and dword [ebp - 0x14], 0
cmp dword [0x43c0d8], 0
mov dword [ebp - 0x18], eax
jne 0x40617e
push 0x401de0
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x406226
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x401dd4
push ebx
call edi
test eax, eax
je 0x406226
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push 0x401dc4
push ebx
mov dword [0x43c0d8], eax
call edi
push eax
call esi
push 0x401db0
push ebx
mov dword [0x43c0dc], eax
call edi
push eax
call esi
push 0x401d94
push ebx
mov dword [0x43c0e0], eax
call edi
push eax
call esi
mov dword [0x43c0e8], eax
test eax, eax
je 0x40617e
push 0x401d7c
push ebx
call edi
push eax
call esi
mov dword [0x43c0e4], eax
mov eax, dword [0x43c0e4]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x4061d7
cmp dword [0x43c0e8], ecx
je 0x4061d7
push eax
call esi
push dword [0x43c0e8]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x4061d7
test ebx, ebx
je 0x4061d7
call edi
test eax, eax
je 0x4061ce
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x4061ce
test byte [ebp - 8], 1
jne 0x4061d7
or dword [ebp + 0x10], 0x200000
jmp 0x40620a
mov eax, dword [0x43c0dc]
cmp eax, dword [ebp - 0x18]
je 0x40620a
push eax
call esi
test eax, eax
je 0x40620a
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x40620a
mov eax, dword [0x43c0e0]
cmp eax, dword [ebp - 0x18]
je 0x40620a
push eax
call esi
test eax, eax
je 0x40620a
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x43c0d8]
call esi
test eax, eax
je 0x406226
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x406228
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406436
leave
ret

Function at 0x406436
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x40d448]
jne 0x406440
repz ret
jmp fcn.0040853d
Function at 0x409f80
Capabilities:
Copy file
Get uefi variable

Disassembly:
sub esp, 0xe3c
cmp dword [0x4b7c60], 0x37
jne 0x40a005
push 0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CopyFileExW]
push 0x402a48
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
lea eax, [esp + 0x18]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCPInfoExW]
push 0
lea ecx, [esp + 0x23c]
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetFirmwareEnvironmentVariableW]
lea edx, [esp]
push edx
push 0
lea eax, [esp + 0xc]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_ReadConsoleInputW]
push 0
call dword [sym.imp.KERNEL32.dll_PulseEvent]
push 0
lea ecx, [esp + 0x63c]
push ecx
push 0x402a6c
call dword [sym.imp.KERNEL32.dll_FindFirstVolumeMountPointW]
mov edx, dword [0x4b7c64]
mov ecx, dword [0x4b7344]
mov al, byte [edx + esi + 0x38d6]
mov byte [ecx + esi], al
add esp, 0xe3c
ret