joyce8/EMBER2024-capa huggingface dataset:
Function at 0x514700
Capabilities:
Contain obfuscated stackstrings

Disassembly:
sub esp, 0x20
push ebx
mov ebx, dword [esp + 0x2c]
xor edx, edx
xor eax, eax
mov dword [esp + 4], 0x310030
mov dword [esp + 8], 0x330032
mov dword [esp + 0xc], 0x350034
mov dword [esp + 0x10], 0x370036
mov dword [esp + 0x14], 0x390038
mov dword [esp + 0x18], 0x420041
mov dword [esp + 0x1c], 0x440043
mov dword [esp + 0x20], 0x460045
test ebx, ebx
je 0x51478c
push esi
mov esi, dword [esp + 0x34]
push edi
mov edi, dword [esp + 0x30]
nop word [eax + eax]
movzx ecx, byte [eax + edi]
lea edx, [edx + 2]
shr ecx, 4
movzx ecx, word [esp + ecx*2 + 0xc]
mov word [esi + edx*2 - 4], cx
movsx ecx, byte [eax + edi]
inc eax
and ecx, 0xf
movzx ecx, word [esp + ecx*2 + 0xc]
mov word [esi + edx*2 - 2], cx
cmp eax, ebx
jne 0x514760
pop edi
pop esi
pop ebx
add esp, 0x20
ret

Function at 0x5147a0
Capabilities:
Create directory

Disassembly:
sub esp, 0x28
mov eax, dword [0x659af8]
xor eax, esp
mov dword [esp + 0x24], eax
push esi
mov esi, dword [esp + 0x30]
lea eax, [esp + 0x10]
push 1
push eax
mov byte [esp + 0x2c], 0
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x5147fb
push 0
push 0
push 1
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x5147fb
lea eax, [esp + 0x10]
mov dword [esp + 4], 0xc
mov dword [esp + 8], eax
mov dword [esp + 0xc], 0
mov byte [esp + 0x24], 0
lea eax, [esp + 4]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ecx, dword [esp + 0x28]
test eax, eax
pop esi
setne al
xor ecx, esp
call fcn.00608a00
add esp, 0x28
ret
Function at 0x515900
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x623edd
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x659af8]
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 + 0x14]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
mov edi, dword [ebp + 0x18]
mov dword [ebp - 0x24], edx
lea edx, [ebp - 0x1c]
push edx
push dword [0x65307c]
mov byte [ebp - 0x1d], 0
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x5159a2
mov esi, dword [ebp - 0x1c]
mov dword [ebp - 0x28], esi
mov dword [ebp - 4], eax
mov eax, dword [edi]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x24]
lea eax, [ebp - 0x18]
mov dword [edi], 0
push eax
push 0
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
sete bl
test eax, eax
jne 0x515990
mov eax, dword [ebp - 0x14]
mov dword [edi], eax
push esi
mov dword [ebp - 4], 1
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, bl
jmp 0x5159a5
mov al, byte [ebp - 0x1d]
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.00608a00
mov esp, ebp
pop ebp
ret
Function at 0x515a40
Capabilities:
Persist via run registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x623f1d
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x659af8]
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 eax, edi
mov dword [edi + 0x10], 0
cmp dword [edi + 0x14], 0x10
jb 0x515a7f
mov eax, dword [edi]
mov byte [eax], 0
lea eax, [ebp - 0x1c]
push eax
push dword [0x65307c]
push 0
push 0x499878
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x515b7a
mov esi, dword [ebp - 0x1c]
mov dword [ebp - 0x20], esi
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x14]
push eax
push 0
lea eax, [ebp - 0x18]
push eax
push 0
push 0x499864
push esi
call ebx
mov ecx, dword [ebp - 0x18]
cmp ecx, 1
je 0x515ada
cmp ecx, 2
jne 0x515b65
test eax, eax
jne 0x515b65
push eax
push dword [ebp - 0x14]
mov ecx, edi
call fcn.004c9e90
cmp dword [edi + 0x14], 0x10
mov eax, edi
jb 0x515af7
mov eax, dword [edi]
lea ecx, [ebp - 0x14]
push ecx
push eax
lea eax, [ebp - 0x18]
push eax
push 0
push 0x499864
push dword [ebp - 0x1c]
call ebx
test eax, eax
jne 0x515b65
mov ecx, dword [edi + 0x14]
mov eax, edi
cmp ecx, 0x10
jb 0x515b1c
mov eax, dword [edi]
mov edx, dword [edi + 0x10]
lea ebx, [edx - 1]
add ebx, eax
mov eax, edi
cmp ecx, 0x10
jb 0x515b2d
mov eax, dword [edi]
sub ebx, eax
mov ecx, 1
mov eax, edx
sub eax, ebx
cmp eax, ecx
cmovb ecx, eax
cmp dword [edi + 0x14], 0x10
mov dword [ebp - 0x20], ecx
mov eax, edi
jb 0x515b4a
mov eax, dword [edi]
lea ecx, [eax + ebx]
mov eax, dword [ebp - 0x20]
sub edx, eax
add eax, ecx
mov dword [edi + 0x10], edx
sub edx, ebx
inc edx
push edx
push eax
push ecx
call fcn.0060a150
add esp, 0xc
push esi
mov dword [ebp - 4], 1
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 4], 0xffffffff
cmp dword [edi + 0x10], 0
je 0x515baa
push 0x13
push 0x499a10
mov ecx, edi
call fcn.004c8070
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.00608a00
mov esp, ebp
pop ebp
ret
call sub.KERNEL32.dll_GetLastError
push eax
lea ecx, [ebp - 0x24]
call fcn.00512570
push 0
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x50]
call fcn.005125d0
push 0x63bcc4
lea eax, [ebp - 0x50]
push eax
call fcn.00609d27
int3
Function at 0x5168f0
Capabilities:
Clear file content
Get file size
Write file on windows

Disassembly:
sub esp, 0x3c
mov eax, dword [0x659af8]
xor eax, esp
mov dword [esp + 0x38], eax
push ebx
mov ebx, dword [ecx]
lea eax, [esp + 0x30]
push ebp
push esi
push edi
mov edi, dword [esp + 0x50]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x5169ad
mov ecx, dword [esp + 0x40]
xor edx, edx
cmp edx, ecx
jl 0x516991
mov eax, dword [esp + 0x3c]
jg 0x516930
cmp edi, eax
jbe 0x516991
push 0
push 0
push ecx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x5169ad
sub edi, dword [esp + 0x3c]
je 0x51697c
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, 0x200
cmp edi, 0x200
mov esi, edi
push 0
cmova esi, eax
lea eax, [esp + 0x48]
push eax
push esi
push 0x65fd58
push ebx
call ebp
cmp dword [esp + 0x44], esi
jne 0x5169ad
mov eax, 0x200
sub edi, esi
jne 0x516952
mov ecx, dword [esp + 0x48]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00608a00
add esp, 0x3c
ret 8
push 0
push 0
push edx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x5169ad
push ebx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x51697c
call sub.KERNEL32.dll_GetLastError
push eax
lea ecx, [esp + 0x40]
call fcn.00512570
push 0
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x18]
call fcn.005125d0
push 0x63bcc4
lea eax, [esp + 0x14]
push eax
call fcn.00609d27
int3
Function at 0x516d50
Capabilities:
Get system information on windows

Disassembly:
sub esp, 0x3c
mov eax, dword [0x659af8]
xor eax, esp
mov dword [esp + 0x38], eax
push ebx
mov ebx, ecx
mov eax, dword [ebx + 0xc]
test eax, eax
jne 0x516d92
mov eax, dword [0x65ff58]
test eax, eax
jne 0x516d80
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [esp + 0x2c]
mov ecx, 1
cmp ecx, eax
sbb eax, eax
and eax, 0xffffffe0
add eax, 0x20
mov dword [ebx + 0xc], eax
cmp eax, 8
jb 0x516eb5
cmp eax, 0x20
jae 0x516db5
pause
inc dword [ebx + 0xc]
pop ebx
mov ecx, dword [esp + 0x38]
xor ecx, esp
call fcn.00608a00
add esp, 0x3c
ret
jne 0x516e9a
push 7
call fcn.00515220
add esp, 4
lea ecx, [esp + 0xc]
push ecx
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x1c]
push ecx
call eax
push 0xa
call fcn.00515220
add esp, 4
lea ecx, [esp + 4]
push ecx
call eax
test eax, eax
jne 0x516dfe
mov ecx, dword [esp + 0xc]
mov eax, 0xd1b71759
lea ecx, [ecx - 1]
mul ecx
shr edx, 0xd
jmp 0x516e3f
mov eax, dword [esp + 0xc]
mov ecx, 0x5f5e100
push esi
push edi
push dword [esp + 0x10]
mul ecx
push dword [esp + 0x10]
mov edi, eax
mov esi, edx
push 0x38d7e
sub edi, 1
push 0xa4c67fff
sbb esi, 0
call fcn.00608c60
add eax, 1
adc edx, 0
push edx
push eax
push esi
push edi
call fcn.00608c60
pop edi
mov edx, eax
pop esi
lea eax, [edx + 1]
push 9
mov dword [ebx + 8], eax
call fcn.00515220
add esp, 4
lea ecx, [esp + 4]
push ecx
call eax
test eax, eax
jne 0x516e7a
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor ecx, ecx
mov dword [ebx], eax
inc dword [ebx + 0xc]
mov dword [ebx + 4], ecx
pop ebx
mov ecx, dword [esp + 0x38]
xor ecx, esp
call fcn.00608a00
add esp, 0x3c
ret
mov ecx, dword [esp + 8]
mov eax, dword [esp + 4]
inc dword [ebx + 0xc]
mov dword [ebx], eax
mov dword [ebx + 4], ecx
pop ebx
mov ecx, dword [esp + 0x38]
xor ecx, esp
call fcn.00608a00
add esp, 0x3c
ret
cmp dword [ebx + 8], 0
jne 0x516ec8
and al, 1
je 0x516f06
call dword [sym.imp.KERNEL32.dll_SwitchToThread]
test eax, eax
jne 0x516eb5
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
inc dword [ebx + 0xc]
mov ecx, dword [esp + 0x3c]
pop ebx
xor ecx, esp
call fcn.00608a00
add esp, 0x3c
ret
push 9
call fcn.00515220
add esp, 4
lea ecx, [esp + 4]
push ecx
call eax
test eax, eax
jne 0x516ee7
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor ecx, ecx
jmp 0x516eef
mov ecx, dword [esp + 8]
mov eax, dword [esp + 4]
sub eax, dword [ebx]
sbb ecx, dword [ebx + 4]
test ecx, ecx
jb 0x516ea4
ja 0x516eff
cmp eax, dword [ebx + 8]
jb 0x516ea4
mov dword [ebx + 8], 0
push 1
jmp 0x516eaf
Function at 0x519ff0
Capabilities:
Check for peb beingdebugged flag

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x62457d
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x659af8]
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 esi, ecx
mov eax, dword [ebp + 0xc]
push dword [esi]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], eax
call fcn.00535bc0
mov ebx, dword [esi]
add esp, 4
add ebx, 0xa
add ebx, eax
mov eax, 7
mov word [edi], ax
mov eax, dword [ebp - 0x24]
mov dword [edi + 2], ebx
add eax, 0xfffffffa
mov ecx, dword [esi + 0x30]
add edi, 6
push eax
push edi
call fcn.0051ab00
mov ecx, dword [esi + 0x2c]
add edi, eax
mov eax, dword [esi]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x20], edi
test ecx, ecx
je 0x51a0f8
mov eax, dword [ecx]
lea edx, [ebp - 0x14]
push edx
lea edx, [ebp - 0x20]
push edx
call dword [eax + 8]
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0
push eax
mov eax, dword [ebp - 0x24]
sub eax, edi
add eax, dword [ebp - 0x28]
push eax
push dword [esi]
push edi
call fcn.00535a90
mov ecx, dword [esi + 0x30]
lea eax, [ebp - 0x3c]
add esp, 0x10
push eax
call fcn.0051a8b0
mov esi, dword [ebp - 0x1c]
lea ecx, [ebp - 0x18]
push eax
mov dword [ebp - 4], 0
call fcn.00509130
push esi
push edi
lea ecx, [ebp - 0x18]
call fcn.0051ae40
mov edx, dword [ebp - 0x38]
test edx, edx
je 0x51a0d8
mov ecx, dword [ebp - 0x30]
sub ecx, edx
push ecx
push edx
lea ecx, [ebp - 0x3c]
call fcn.004dc030
mov eax, ebx
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.00608a00
mov esp, ebp
pop ebp
ret 8
call fcn.005f382a
int3
Function at 0x51a100
Capabilities:
Check for peb beingdebugged flag

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x62457d
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x659af8]
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 esi, ecx
mov eax, dword [ebp + 0xc]
push dword [esi]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], eax
call fcn.00535bc0
mov ebx, dword [esi]
add esp, 4
add ebx, 0x12
add ebx, eax
mov eax, 3
mov word [edi], ax
mov eax, dword [ebp - 0x24]
mov dword [edi + 2], ebx
add eax, 0xfffffffa
mov ecx, dword [esi + 0x30]
add edi, 6
push eax
push edi
call fcn.0051ab20
mov ecx, dword [esi + 0x2c]
add edi, eax
mov eax, dword [esi]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x20], edi
test ecx, ecx
je 0x51a208
mov eax, dword [ecx]
lea edx, [ebp - 0x14]
push edx
lea edx, [ebp - 0x20]
push edx
call dword [eax + 8]
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0
push eax
mov eax, dword [ebp - 0x24]
sub eax, edi
add eax, dword [ebp - 0x28]
push eax
push dword [esi]
push edi
call fcn.00535a90
mov ecx, dword [esi + 0x30]
lea eax, [ebp - 0x3c]
add esp, 0x10
push eax
call fcn.0051a8b0
mov esi, dword [ebp - 0x1c]
lea ecx, [ebp - 0x18]
push eax
mov dword [ebp - 4], 0
call fcn.00509130
push esi
push edi
lea ecx, [ebp - 0x18]
call fcn.0051ae40
mov edx, dword [ebp - 0x38]
test edx, edx
je 0x51a1e8
mov ecx, dword [ebp - 0x30]
sub ecx, edx
push ecx
push edx
lea ecx, [ebp - 0x3c]
call fcn.004dc030
mov eax, ebx
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.00608a00
mov esp, ebp
pop ebp
ret 8
call fcn.005f382a
int3
Function at 0x51b0a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x624765
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x659af8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x14], ecx
mov al, byte [ecx]
xorps xmm0, xmm0
mov esi, dword [ebp + 8]
xor edx, edx
movups xmmword [ebp - 0x24], xmm0
mov byte [ebp - 0x24], al
xor edi, edi
mov eax, dword [ecx + 4]
mov ecx, dword [ecx + 8]
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x30], ecx
cmp eax, ecx
je 0x51b128
mov esi, ecx
lea ecx, [ebp - 0x24]
sub esi, eax
push esi
call fcn.004dbe40
mov edi, dword [ebp - 0x20]
push esi
mov esi, dword [ebp - 0x2c]
push esi
push edi
call fcn.0060a150
mov edx, dword [ebp - 0x20]
sub edi, esi
mov esi, dword [ebp - 0x28]
add esp, 0xc
add edi, dword [ebp - 0x30]
mov dword [ebp - 0x1c], edi
lea eax, [ebp - 0x24]
mov dword [ebp - 4], 0
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x14]
mov byte [ebp - 4], 1
mov ecx, dword [ecx + 0x10]
mov eax, ecx
not eax
add eax, eax
xor eax, ecx
xor ecx, ecx
mov dword [ebp - 0x14], eax
sub edi, edx
je 0x51b161
mov eax, ecx
and eax, 3
mov al, byte [ebp + eax - 0x14]
xor byte [edx + ecx], al
inc ecx
cmp ecx, edi
jb 0x51b150
mov ecx, dword [esi + 0x24]
test ecx, ecx
je 0x51b1fc
mov eax, dword [ecx]
lea edx, [ebp - 0x24]
push edx
call dword [eax + 8]
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
sub ecx, eax
je 0x51b18e
nop
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x51b180
mov eax, dword [ebp - 0x20]
mov dword [ebp - 4], 0xffffffff
test eax, eax
je 0x51b1da
mov esi, dword [ebp - 0x18]
sub esi, eax
mov edx, esi
je 0x51b1af
mov ecx, eax
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub edx, 1
jne 0x51b1a4
mov dword [ebp - 4], 2
cmp esi, 0x1000
jb 0x51b1d0
mov ecx, dword [eax - 4]
add esi, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x51b1f7
mov eax, ecx
push esi
push eax
call fcn.006084e7
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00608a00
mov esp, ebp
pop ebp
ret 4
call fcn.00540ccc
call fcn.005f382a
int3
Function at 0x5211e0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
sub esp, 8
push ebx
push esi
mov esi, dword [esp + 0x14]
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x5211f3
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x52121b
push dword [esp + 0x18]
lea eax, [esp + 0xc]
push esi
push eax
call fcn.005210d0
add esp, 0xc
mov eax, dword [eax]
pop esi
pop ebx
add esp, 8
ret
push edi
mov edi, dword [esp + 0x1c]
test edi, edi
je 0x521232
mov dword [edi], 0
call fcn.0051c4f0
mov dword [edi + 4], eax
pop edi
test ebx, 0x400
je 0x521269
push esi
call fcn.00520ea0
add esp, 4
test al, al
je 0x52125e
test bl, 0x10
mov eax, 4
mov ecx, 0xb
pop esi
cmovne eax, ecx
pop ebx
add esp, 8
ret
pop esi
mov eax, 9
pop ebx
add esp, 8
ret
and ebx, 0x10
or ebx, 0x20
shr ebx, 4
pop esi
mov eax, ebx
pop ebx
add esp, 8
ret

Function at 0x521590
Capabilities:
Check if file exists
Delete directory
Delete file

Disassembly:
mov eax, dword [esp + 8]
push esi
push edi
cmp eax, 1
jne 0x5215ba
mov esi, dword [esp + 0x14]
test esi, esi
je 0x521643
mov dword [esi], 0
call fcn.0051c4f0
mov dword [esi + 4], eax
xor al, al
pop edi
pop esi
ret
cmp eax, 3
je 0x5215db
cmp eax, 0xb
je 0x5215db
mov esi, dword [esp + 0xc]
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x5215d2
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x5215f0
mov esi, dword [esp + 0xc]
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x5215e9
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x52162a
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 2
je 0x52162a
cmp eax, 3
je 0x52162a
cmp eax, 0x7b
je 0x52162a
cmp eax, 0xf
je 0x52162a
cmp eax, 0x15
je 0x52162a
cmp eax, 0x57
je 0x52162a
cmp eax, 0xa1
je 0x52162a
cmp eax, 0x35
je 0x52162a
call edi
jmp 0x52162c
xor eax, eax
push 0x49a18c
push dword [esp + 0x18]
push esi
push eax
call fcn.00520d20
add esp, 0x10
test al, al
je 0x521648
pop edi
xor al, al
pop esi
ret
pop edi
mov al, 1
pop esi
ret
Function at 0x5216d0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6251a5
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x659af8]
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 eax, edi
mov esi, dword [ebp + 0x10]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x2c], esi
cmp dword [edi + 0x14], 8
jb 0x521711
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x30], eax
cmp eax, 0xffffffff
jne 0x521730
push esi
push edi
push ebx
call fcn.005210d0
add esp, 0xc
jmp 0x521890
test eax, 0x400
je 0x52185f
cmp dword [edi + 0x14], 8
mov edx, edi
jb 0x521745
mov edx, dword [edi]
mov ecx, edx
mov dword [ebp - 0x18], 0
xor eax, eax
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
lea esi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x521760
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x28]
call fcn.00507040
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
push 0
cmovae eax, dword [ebp - 0x28]
push 0x2000000
push 3
push 0
push 7
push 0
push eax
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x34], esi
mov edx, dword [ebp - 0x14]
mov byte [ebp - 4], 2
cmp edx, 8
jb 0x5217ec
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
mov byte [ebp - 4], 3
cmp edx, 0x1000
jb 0x5217de
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x5218ae
push edx
push ecx
call fcn.006084e7
add esp, 8
mov byte [ebp - 4], 2
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
cmp esi, 0xffffffff
jne 0x521814
push dword [ebp - 0x2c]
push edi
push ebx
call fcn.005210d0
add esp, 0xc
jmp 0x521890
push edi
call fcn.00520ea0
add esp, 4
test al, al
jne 0x521847
mov eax, dword [ebp - 0x30]
push eax
push edi
call fcn.00520fa0
add esp, 8
mov dword [ebx], 9
mov dword [ebx + 4], eax
push esi
mov dword [ebp - 4], 5
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x521890
push esi
mov dword [ebp - 4], 6
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x2c]
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x521871
mov dword [esi], 0
call fcn.0051c4f0
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x30]
mov esi, eax
push eax
push edi
call fcn.00520fa0
xor ecx, ecx
mov dword [ebx + 4], eax
add esp, 8
and esi, 0x10
setne cl
add ecx, 2
mov dword [ebx], ecx
mov eax, ebx
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.00608a00
mov esp, ebp
pop ebp
ret
call fcn.00540ccc
int3
Function at 0x5224f0
Capabilities:
Parse pe header

Disassembly:
mov ecx, dword [ecx + 4]
xor edx, edx
push ebx
push esi
mov esi, 0x5a4d
mov eax, ecx
cmp si, word [ecx]
push edi
cmovne eax, edx
mov edi, 0xf8
mov edx, 0x20b
mov eax, dword [eax + 0x3c]
add ecx, eax
xor eax, eax
cmp dword [ecx], 0x4550
cmovne ecx, eax
mov eax, 0x108
cmp dx, word [ecx + 0x18]
movzx ebx, word [ecx + 6]
cmove edi, eax
or eax, 0xffffffff
add edi, ecx
xor esi, esi
test ebx, ebx
je 0x522559
nop word [eax + eax]
mov ecx, dword [edi + 0xc]
mov edx, eax
cmp ecx, eax
mov eax, ecx
cmovb esi, edi
add edi, 0x28
cmp ecx, edx
cmovae eax, edx
sub ebx, 1
jne 0x522540
pop edi
mov eax, esi
pop esi
pop ebx
ret

Function at 0x522620
Capabilities:
Parse pe header

Disassembly:
mov ecx, dword [ecx + 4]
xor edx, edx
push esi
mov esi, 0x5a4d
mov eax, ecx
cmp si, word [ecx]
pop esi
cmovne eax, edx
mov eax, dword [eax + 0x3c]
add eax, ecx
xor ecx, ecx
cmp dword [eax], 0x4550
cmovne eax, ecx
mov ecx, dword [esp + 4]
cmp ecx, dword [eax + 0x74]
jbe 0x52265d
mov ecx, dword [esp + 8]
xor eax, eax
mov edx, dword [eax + 4]
mov dword [ecx], edx
mov eax, dword [eax]
ret 8
lea eax, [eax + ecx*8]
mov ecx, dword [esp + 8]
add eax, 0x78
mov edx, dword [eax + 4]
mov dword [ecx], edx
mov eax, dword [eax]
ret 8

Function at 0x522680
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
push ebx
push ebp
mov ebp, ecx
xor ecx, ecx
push esi
mov esi, 0x5a4d
push edi
mov edx, dword [ebp + 4]
mov eax, edx
mov edi, dword [esp + 0x14]
cmp si, word [edx]
mov esi, 0x20b
cmovne eax, ecx
mov ecx, dword [eax + 0x3c]
xor eax, eax
add ecx, edx
mov edx, 0x108
cmp dword [ecx], 0x4550
cmovne ecx, eax
mov eax, 0xf8
cmp si, word [ecx + 0x18]
movzx ebx, word [ecx + 6]
cmove eax, edx
xor esi, esi
add eax, ecx
test ebx, ebx
je 0x5226e8
nop
mov edx, dword [eax + 0x14]
cmp edi, edx
jb 0x5226e0
mov ecx, dword [eax + 0x10]
add ecx, edx
cmp edi, ecx
jb 0x522701
inc esi
add eax, 0x28
cmp esi, ebx
jl 0x5226d0
mov ecx, ebp
call fcn.005224f0
test eax, eax
je 0x52270f
cmp edi, dword [eax + 0xc]
jae 0x52270f
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret 4
mov eax, dword [eax + 0xc]
sub eax, edx
add eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret 4