joyce8/EMBER2024-capa huggingface dataset:
Function at 0x416a5c
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x450350]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x416aa2
cmp word [ebx], dx
jne 0x416aa2
or byte [eax + edi + 0x28], 4
jmp 0x416aa7
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x416c0a
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x416bea
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x416ae8
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x416b1e
cmp eax, edx
jae 0x416b2c
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x416ac3
jmp 0x416c0a
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x416be5
cmp dword [ebp - 0x18], 0
je 0x416be5
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x450350]
test byte [eax + edi + 0x28], 0x48
je 0x416bbb
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x416b7f
mov word [esi], cx
jmp 0x416bb6
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x450350]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x450350]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x450350]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x416c0a
pop eax
cmp word [ebp - 4], ax
jne 0x416bcb
cmp esi, ebx
jne 0x416bcb
mov word [esi], ax
jmp 0x416c07
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0041797b
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x416c0a
push 0xd
pop eax
jmp 0x416bc6
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x450350]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x416c04
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x416c0a
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4255a0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4255cd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4255cd
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x4039ae
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x84
mov eax, dword [0x40c090]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x40
lea eax, [ebp - 0x84]
push eax
push 0x4012ec
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x4039df
xor al, al
jmp 0x403a0e
movzx eax, word [ebp - 0x84]
lea edx, [ebp - 0x84]
test eax, eax
je 0x403a0c
mov ecx, dword [0x40c8b8]
and eax, 0x1f
lea edx, [edx + 2]
bts ecx, eax
movzx eax, word [edx]
test eax, eax
jne 0x4039f6
mov dword [0x40c8b8], ecx
mov al, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00409600
leave
ret
Function at 0x4059f2
Capabilities:
Print debug messages
Query or enumerate registry value
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x870
mov eax, dword [0x40c090]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov dword [ebp - 0x86c], edx
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebx, ebx
mov edi, eax
cmp dword [0x40c0c4], 0xffffffff
jne 0x405ac5
lea eax, [ebp - 0x868]
mov dword [0x40c0c4], ebx
push eax
push ecx
push ecx
mov edx, 0x4014f8
mov dword [ebp - 0x868], ebx
call fcn.00402f5e
add esp, 0xc
test eax, eax
jne 0x405ac5
lea eax, [ebp - 0x858]
mov dword [ebp - 0x860], 0x28
mov dword [ebp - 0x864], eax
lea eax, [ebp - 0x870]
push eax
lea eax, [ebp - 0x858]
mov dword [ebp - 0x870], 0x50
push eax
push ebx
push ebx
push 0x401554
push dword [ebp - 0x868]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x405aa4
mov eax, dword [ebp - 0x864]
mov eax, dword [eax]
and eax, 3
mov dword [0x40c0c4], eax
push dword [ebp - 0x868]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x860], 0x28
jle 0x405ac5
push dword [ebp - 0x864]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp dword [0x40c914], ebx
je 0x405b6b
cmp dword [ebp - 0x86c], ebx
je 0x405b6b
mov eax, 0x20006
mov dword [ebp - 0x868], ebx
cmp byte [0x40cd9a], bl
jne 0x405afd
cmp byte [0x40cab5], bl
je 0x405afd
mov eax, 0x20106
push ebx
lea ecx, [ebp - 0x868]
push ecx
push ebx
push eax
push ebx
push ebx
push ebx
push 0x401560
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x405b6b
push 4
lea eax, [ebp - 0x86c]
push eax
push 4
push ebx
push 0x4015d0
push dword [ebp - 0x868]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax*2 + 2]
push eax
push esi
push 1
push ebx
push 0x4015e4
push dword [ebp - 0x868]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0x868]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test dword [0x40c0c4], 3
je 0x405bda
push 0x802
lea eax, [ebp - 0x808]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x808]
push esi
cmp dword [ebp - 0x86c], ebx
je 0x405bb6
push dword [ebp - 0x86c]
push 0x401608
push 0x401
push eax
call fcn.00402e35
add esp, 0x14
jmp 0x405bc9
push 0x40162c
push 0x401
push eax
call fcn.00402e35
add esp, 0x10
test eax, eax
js 0x405bda
lea eax, [ebp - 0x808]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00409600
leave
ret
Function at 0x407d41
Capabilities:
Block operations on executable memory pages using arbitrary code guard
Terminate process

Disassembly:
push 0x28
push 0x40a2f0
call fcn.00409f08
mov dword [ebp - 0x38], 8
mov dword [ebp - 0x34], 0x20
and dword [ebp - 0x28], 0
call fcn.00407d1b
and dword [ebp - 4], 0
lea eax, [ebp - 0x38]
push eax
mov esi, dword [0x40b030]
mov ecx, esi
call dword [0x40d210]
call esi
and dword [ebp - 0x1c], 0
mov dword [ebp - 0x1c], 1
push 4
lea eax, [ebp - 0x1c]
push eax
push 0x10
call dword [sym.imp.KERNEL32.dll_SetProcessMitigationPolicy]
mov ecx, dword [ebp + 8]
call fcn.004063e3
mov dword [ebp - 0x28], eax
jmp 0x407dd3
mov dword [ebp - 4], 0xfffffffe
call fcn.00408f7a
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x409c44
Capabilities:
Parse pe header

Disassembly:
push 0xc
push 0x40a370
call fcn.00409f08
xor ecx, ecx
mov eax, dword [ebp + 8]
test eax, eax
je 0x409ca4
cmp eax, 0xffffffff
je 0x409ca4
mov dword [ebp - 4], ecx
mov edx, 0x5a4d
cmp word [eax], dx
jne 0x409c9d
mov edx, dword [eax + 0x3c]
test edx, edx
js 0x409c9d
cmp edx, 0x10000000
jae 0x409c9d
add eax, edx
mov dword [ebp - 0x1c], eax
mov ecx, dword [eax]
sub ecx, 0x4550
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
jmp 0x409c9a
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 4], 0xfffffffe
mov eax, ecx
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x409d10
Capabilities:
Enumerate pe sections

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
xor edx, edx
push ebx
push esi
push edi
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
movzx ebx, word [ecx + 6]
add eax, 0x18
add eax, ecx
test ebx, ebx
je 0x409d4e
mov edi, dword [ebp + 0xc]
mov esi, dword [eax + 0xc]
cmp edi, esi
jb 0x409d46
mov ecx, dword [eax + 8]
add ecx, esi
cmp edi, ecx
jb 0x409d50
inc edx
add eax, 0x28
cmp edx, ebx
jb 0x409d36
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x409e20
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
mov eax, 0x5a4d
cmp word [ecx], ax
jne 0x409e51
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x409e51
mov ecx, 0x10b
cmp word [eax + 0x18], cx
jne 0x409e51
mov eax, 1
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x402bff
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
push edi
push esi
lea eax, [ebp - 4]
push ebx
push eax
mov eax, dword [0x434f90]
or al, 8
xor edi, edi
push eax
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, edi
jne 0x402c93
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
mov ebx, 0x105
jmp 0x402c50
cmp dword [ebp + 0x10], edi
jne 0x402c87
lea eax, [ebp - 0x210]
push edi
push eax
push dword [ebp - 4]
call fcn.00402bff
test eax, eax
jne 0x402c62
lea eax, [ebp - 0x210]
push ebx
push eax
push edi
push dword [ebp - 4]
call esi
test eax, eax
je 0x402c37
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 3
call fcn.0040642a
cmp eax, edi
je 0x402c9a
push edi
push dword [0x434f90]
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
jmp 0x402c93
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
inc eax
pop ebx
pop esi
pop edi
leave
ret 0xc
cmp dword [0x434f90], edi
jne 0x402c90
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, eax
jne 0x402c90
jmp 0x402c93
Function at 0x403027
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
push edi
push esi
mov esi, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 8], esi
test ebx, ebx
jne 0x403047
mov dword [ebp - 8], 0x8000
and dword [ebp - 4], 0
mov dword [ebp - 0xc], ebx
test ebx, ebx
jne 0x403059
mov dword [ebp - 0xc], 0x41aa00
mov eax, dword [ebp + 8]
test eax, eax
jl 0x40306e
mov ecx, dword [0x434f38]
add ecx, eax
push ecx
call fcn.00403258
lea eax, [ebp + 0x14]
push 4
push eax
call fcn.00403242
test eax, eax
je 0x403230
test byte [ebp + 0x17], 0x80
je 0x4031db
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call edi
and dword [0x40d364], 0
and dword [0x40d360], 0
and dword [ebp + 0x14], 0x7fffffff
mov dword [ebp - 0x10], eax
mov eax, 0x40e9e8
mov dword [0x40ce48], 8
mov dword [0x4169f0], eax
mov dword [0x4169ec], eax
mov eax, dword [ebp + 0x14]
mov dword [0x4169e8], 0x4169e8
mov dword [ebp + 8], eax
jle 0x403238
mov esi, 0x4000
cmp dword [ebp + 0x14], esi
jge 0x4030e7
mov esi, dword [ebp + 0x14]
mov ebx, 0x416a00
push esi
push ebx
call fcn.00403242
test eax, eax
je 0x403230
sub dword [ebp + 0x14], esi
mov dword [0x40ce38], ebx
mov dword [0x40ce3c], esi
mov ebx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
push 0x40ce38
mov dword [0x40ce40], ebx
mov dword [0x40ce44], eax
call fcn.00406549
test eax, eax
mov dword [ebp - 0x14], eax
jl 0x4031d3
mov esi, dword [0x40ce40]
sub esi, ebx
call edi
test byte [0x434f94], 1
mov ebx, eax
je 0x40318e
sub eax, dword [ebp - 0x10]
cmp eax, 0xc8
ja 0x403155
cmp dword [ebp + 0x14], 0
jne 0x40318e
mov eax, dword [ebp + 8]
push dword [ebp + 8]
sub eax, dword [ebp + 0x14]
push 0x64
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
push eax
lea eax, [ebp - 0x94]
push str....__d__
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [ebp - 0x94]
push eax
push 0
call fcn.004051af
mov dword [ebp - 0x10], ebx
test esi, esi
je 0x4031c7
cmp dword [ebp + 0x10], 0
jne 0x4031ad
push esi
push dword [ebp - 0xc]
push dword [ebp + 0xc]
call fcn.00405cd7
test eax, eax
je 0x4031d7
add dword [ebp - 4], esi
jmp 0x4031bb
mov eax, dword [0x40ce40]
add dword [ebp - 4], esi
sub dword [ebp - 8], esi
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0x14], 1
jne 0x40310a
jmp 0x403238
cmp dword [ebp + 0x14], 0
jg 0x4030da
jmp 0x403238
push 0xfffffffffffffffc
jmp 0x403232
push 0xfffffffffffffffe
jmp 0x403232
test ebx, ebx
jne 0x40321d
cmp dword [ebp + 0x14], ebx
jle 0x403238
mov edi, dword [ebp - 8]
cmp dword [ebp + 0x14], edi
mov esi, dword [ebp + 0x14]
jl 0x4031f1
mov esi, edi
mov ebx, 0x416a00
push esi
push ebx
call fcn.00403242
test eax, eax
je 0x403230
push esi
push ebx
push dword [ebp + 0xc]
call fcn.00405cd7
test eax, eax
je 0x4031d7
add dword [ebp - 4], esi
sub dword [ebp + 0x14], esi
cmp dword [ebp + 0x14], 0
jg 0x4031e7
jmp 0x403238
cmp dword [ebp + 0x14], esi
jge 0x403225
mov esi, dword [ebp + 0x14]
push esi
push ebx
call fcn.00403242
test eax, eax
jne 0x403235
push 0xfffffffffffffffd
pop eax
jmp 0x40323b
mov dword [ebp - 4], esi
mov eax, dword [ebp - 4]
pop ebx
pop esi
pop edi
leave
ret 0x10
Function at 0x40567e
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
mov eax, 0x4083f8
and byte [ebp - 0x1f], 0
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x20]
and dword [ebp - 0x14], 0
and dword [ebp - 4], 0
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push esi
push eax
mov byte [ebp - 0x20], 1
push dword [ebp + 8]
mov word [ebp - 0x1e], 4
mov dword [ebp - 0x10], 0x4083e8
mov dword [ebp - 0xc], 0xc
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x4056cf
xor eax, eax
jmp 0x4056f6
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0xb7
jne 0x4056f6
lea eax, [ebp - 0x20]
push eax
push 0x80000007
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
test eax, eax
jne 0x4056cb
call esi
pop esi
leave
ret 4

Function at 0x405730
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
lea eax, [ebp - 0x10]
mov dword [0x430250], 0x44
push eax
xor eax, eax
push 0x430250
push eax
push eax
push 0x4000000
push eax
push eax
push eax
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x40576f
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
leave
ret 4

Function at 0x4057f9
Capabilities:
Delete directory
Delete file
Set file attributes

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
push esi
call fcn.00405c00
mov edi, eax
cmp edi, 0xffffffff
je 0x40583a
test byte [esp + 0x10], 1
push esi
je 0x40581c
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x405822
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x40582b
xor eax, eax
inc eax
jmp 0x40583c
test byte [esp + 0x10], 4
jne 0x40583a
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
xor eax, eax
pop edi
pop esi
ret 8
Function at 0x405841
Capabilities:
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x258
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, ebx
and eax, 4
push edi
mov dword [ebp - 4], eax
call fcn.00405b0c
test bl, 8
mov dword [ebp - 8], eax
je 0x405880
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
neg eax
sbb eax, eax
inc eax
add dword [0x434f68], eax
jmp 0x4059fd
mov dword [ebp + 8], ebx
and dword [ebp + 8], 1
je 0x40589a
test eax, eax
je 0x4059ab
test bl, 2
je 0x4059ab
mov esi, 0x42f250
push edi
push esi
call fcn.00406050
cmp dword [ebp + 8], 0
je 0x4058b9
push str..
push esi
call sub.KERNEL32.dll_lstrcatW
jmp 0x4058bf
push edi
call fcn.00405a50
cmp word [edi], 0
jne 0x4058cf
cmp word [0x42f250], 0x5c
jne 0x4058da
push 0x40a014
push edi
call sub.KERNEL32.dll_lstrcatW
push edi
call sub.KERNEL32.dll_lstrlenW
lea ebx, [edi + eax*2]
lea eax, [ebp - 0x258]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4059a0
cmp word [ebp - 0x22c], 0x2e
jne 0x405924
cmp word [ebp - 0x22a], 0
je 0x405983
cmp word [ebp - 0x22a], 0x2e
jne 0x405924
cmp word [ebp - 0x228], 0
je 0x405983
lea eax, [ebp - 0x22c]
push eax
push ebx
call fcn.00406050
test byte [ebp - 0x258], 0x10
je 0x40594f
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x405983
push dword [ebp + 0xc]
push edi
call fcn.00405841
jmp 0x405983
push dword [ebp - 4]
push edi
call fcn.004057f9
test eax, eax
jne 0x40597b
cmp dword [ebp - 4], eax
je 0x405973
push edi
push 0xfffffffffffffff1
call fcn.004051af
push 0
push edi
call fcn.00405ef1
jmp 0x405983
inc dword [0x434f68]
jmp 0x405983
push edi
push 0xfffffffffffffff2
call fcn.004051af
lea eax, [ebp - 0x258]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x4058fc
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 0
je 0x4059ab
and word [ebx - 2], 0
xor esi, esi
cmp dword [ebp + 8], esi
je 0x4059fd
cmp dword [ebp - 8], esi
jne 0x4059bf
inc dword [0x434f68]
jmp 0x4059fd
push edi
call fcn.00406393
or eax, eax
je 0x4059fd
push edi
call fcn.00405a04
mov eax, dword [ebp - 4]
or al, 1
push eax
push edi
call fcn.004057f9
test eax, eax
jne 0x4059f5
cmp dword [ebp - 4], esi
je 0x4059b7
push edi
push 0xfffffffffffffff1
call fcn.004051af
push esi
push edi
call fcn.00405ef1
jmp 0x4059fd
push edi
push 0xffffffffffffffe5
call fcn.004051af
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x405b0c
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x42fa50
push esi
call fcn.00406050
push esi
call fcn.00405aaf
mov edi, eax
test edi, edi
jne 0x405b2d
xor eax, eax
jmp 0x405b85
push edi
call fcn.004062e4
test byte [0x434ef8], 0x80
je 0x405b4a
mov ax, word [edi]
or ax, ax
je 0x405b29
cmp ax, 0x5c
je 0x405b29
sub edi, esi
sar edi, 1
jmp 0x405b64
call fcn.00406393
test eax, eax
je 0x405b5e
test byte [eax], 0x10
je 0x405b29
push esi
call fcn.00405a50
push esi
call sub.KERNEL32.dll_lstrlenW
cmp eax, edi
push esi
jg 0x405b50
call fcn.00405a04
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop edi
pop esi
ret 4

Function at 0x405c00
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push ebp
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x405c1f
and al, 0xfe
push eax
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, ebp
pop ebp
ret 4

Function at 0x405c25
Capabilities:
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, eax
push 0
inc ecx
neg ecx
sbb ecx, ecx
and ecx, eax
push ecx
push dword [esp + 0x14]
push 0
push 1
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
ret 0xc

Function at 0x405c54
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push edi
push 0x64
pop edi
mov esi, dword [ebp + 8]
dec edi
mov eax, dword [0x40a550]
mov dword [ebp - 8], eax
mov eax, dword [0x40a554]
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
push 0x1a
pop ecx
push esi
push 0
div ecx
lea eax, [ebp - 8]
push eax
push dword [ebp + 0xc]
add word [ebp - 4], dx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x405ca4
test edi, edi
jne 0x405c61
and word [esi], di
pop edi
pop esi
leave
ret 8
mov eax, esi
jmp 0x405c9e
Function at 0x405d7f
Capabilities:
Get file size

Disassembly:
push ebx
push ebp
push esi
push edi
mov ebx, 0x4308e8
push 0x40a574
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov esi, dword [esp + 0x18]
mov ebp, dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
test esi, esi
mov edi, 0x400
je 0x405dcd
push 1
push 0
push esi
call fcn.00405c25
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebx
push esi
call ebp
test eax, eax
je 0x405eec
cmp eax, edi
jg 0x405eec
mov esi, 0x4310e8
push edi
push esi
push dword [esp + 0x1c]
call ebp
test eax, eax
je 0x405eec
cmp eax, edi
jg 0x405eec
push esi
push ebx
push str._ls_ls_r_n
push 0x4304e8
call dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, eax
mov eax, dword [0x434ef0]
add esp, 0x10
push dword [eax + 0x128]
push esi
call fcn.00406072
push 4
push 0xc0000000
push esi
call fcn.00405c25
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x18], ebp
je 0x405eec
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea eax, [edi + ebx + 0xa]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
je 0x405ee5
push edi
push esi
push ebp
call fcn.00405ca8
test eax, eax
je 0x405ee5
push str._Rename__r_n
push esi
call fcn.00405b8a
test eax, eax
jne 0x405e83
lea eax, [esi + edi]
push str._Rename__r_n
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
add edi, 0xa
jmp 0x405eb8
sub eax, 0xfffffff6
push 0x40a558
push eax
call fcn.00405b8a
mov ebp, eax
test ebp, ebp
je 0x405eb4
lea ecx, [esi + edi]
lea eax, [ecx + ebx]
jmp 0x405ea5
mov dl, byte [ecx]
mov byte [eax], dl
dec eax
dec ecx
cmp ecx, ebp
ja 0x405e9f
sub ebp, esi
inc ebp
mov eax, ebp
mov ebp, dword [esp + 0x18]
jmp 0x405eba
mov ebp, dword [esp + 0x18]
mov eax, edi
push ebx
add eax, esi
push 0x4304e8
push eax
call fcn.00405be0
xor eax, eax
push eax
push eax
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
add edi, ebx
push edi
push esi
push ebp
call fcn.00405cd7
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x405ef1
Capabilities:
Move file

Disassembly:
push 5
push dword [esp + 0xc]
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
or eax, eax
jne 0x405f14
push dword [esp + 8]
push dword [esp + 8]
call fcn.00405d7f
pop ecx
pop ecx
inc dword [0x434f70]
ret 8
Function at 0x405f1d
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push edi
lea eax, [ebp + 0x18]
push esi
push eax
mov eax, dword [ebp + 0x18]
xor esi, esi
neg eax
sbb eax, eax
mov edi, dword [ebp + 0x14]
and eax, 0x100
or eax, 0x20019
mov word [edi], si
push eax
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x405f91
lea eax, [ebp + 0xc]
mov dword [ebp + 0xc], 0x800
push eax
lea eax, [ebp + 0x14]
push edi
push eax
push esi
push dword [ebp + 0x10]
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x405f7e
cmp dword [ebp + 0x14], 1
je 0x405f81
cmp dword [ebp + 0x14], 2
je 0x405f81
mov word [edi], si
push dword [ebp + 0x18]
mov word [edi + 0x7fe], si
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop edi
pop ebp
ret 0x14