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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0xc], edi
test eax, eax
jg 0x421072
jl 0x421065
test ecx, ecx
jne 0x421072
xor eax, eax
xor edx, edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x421132
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], eax
mov ecx, ebx
call fcn.00423d20
mov esi, eax
mov eax, edx
mov dword [esp + 0x14], eax
test eax, eax
jl 0x4210de
jg 0x42109d
test esi, esi
je 0x4210de
mov ecx, dword [esp + 0xc]
cmp ecx, eax
jg 0x4210b5
mov eax, dword [esp + 0x10]
jl 0x4210af
cmp eax, esi
jae 0x4210b5
mov esi, eax
mov dword [esp + 0x14], ecx
mov eax, dword [ebx + 0x1c]
push esi
push dword [eax]
push edi
call fcn.0042aeb0
mov eax, dword [ebx + 0x2c]
add esp, 0xc
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
sub ecx, esi
sbb edx, dword [esp + 0x14]
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
jmp 0x4210ff
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x1c]
mov edx, dword [esp + 0xc]
cmp eax, 0xffffffff
je 0x42111b
mov ecx, dword [esp + 0x10]
mov esi, 1
add ecx, 0xffffffff
mov byte [edi], al
adc edx, 0xffffffff
add edi, esi
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], ecx
test edx, edx
jg 0x421084
jl 0x42111b
test ecx, ecx
jne 0x421084
mov eax, dword [ebp + 0xc]
sub eax, dword [esp + 0x10]
mov ecx, dword [ebp + 0x10]
sbb ecx, edx
mov edx, ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
mov edi, ecx
mov edx, dword [eax]
test edx, edx
je 0x421171
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax]
test eax, eax
je 0x421171
mov edi, dword [esp + 0xc]
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push edx
push edi
call fcn.0042aeb0
mov eax, dword [ebx + 0x2c]
add edi, esi
mov dword [esp + 0x18], edi
add esp, 0xc
mov edi, dword [ebp + 0xc]
sub edi, esi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
cmp dword [ebx + 0x4c], 0
mov ecx, edi
je 0x4211e0
mov esi, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [esi], eax
jne 0x421197
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [esi], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebx + 0x2c]
mov dword [eax], edx
mov esi, dword [esp + 0xc]
mov ecx, edi
cmp edi, 0xfff
jbe 0x4211c9
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call fcn.00431d6c
sub edi, eax
add esp, 0x10
add esi, eax
mov ecx, edi
cmp eax, 0xfff
jne 0x4211f4
cmp edi, eax
ja 0x4211a5
test ecx, ecx
je 0x4211e0
push dword [ebx + 0x4c]
push edi
push 1
push esi
call fcn.00431d6c
mov ecx, edi
add esp, 0x10
sub ecx, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, ecx
sbb edx, 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x421560
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x465124]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x421590
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004297a0
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x4215cc
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x4215cc
lea ecx, [edi - 1]
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004297a0
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x4216b4
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x4215f4
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x421627
push dword [esi + 0x4c]
movsx eax, bl
push eax
call fcn.0042ddc1
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004297a0
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x25], bl
mov edx, dword [ecx]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x25]
push eax
lea eax, [esi + 0x40]
push eax
call dword [edx + 0x1c]
sub eax, 0
je 0x421687
sub eax, 1
je 0x421687
sub eax, 2
jne 0x4216b4
push dword [esi + 0x4c]
movsx eax, byte [ebp - 0x25]
push eax
call fcn.0042ddc1
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004297a0
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x4216a4
push dword [esi + 0x4c]
push edi
push 1
push eax
call fcn.00430c86
add esp, 0x10
cmp edi, eax
jne 0x4216b4
lea eax, [ebp - 0x25]
mov byte [esi + 0x3d], 1
cmp dword [ebp - 0x30], eax
jne 0x4215b7
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004297a0
mov esp, ebp
pop ebp
ret 4
Function at 0x4238c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x465124]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x42397a
cmp byte [esi + 0x3d], 0
je 0x42397a
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x423968
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
mov edx, dword [ecx]
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [edx + 0x20]
sub eax, 0
je 0x423930
sub eax, 1
je 0x423934
sub eax, 2
jne 0x423968
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004297a0
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x423951
push dword [esi + 0x4c]
push edi
push 1
push eax
call fcn.00430c86
add esp, 0x10
cmp edi, eax
jne 0x423968
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004297a0
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004297a0
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.004297a0
mov esp, ebp
pop ebp
ret

Function at 0x4241f0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44bfa0
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x465124]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x10], eax
push 8
mov dword [eax], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
call fcn.00429b95
mov esi, eax
xorps xmm0, xmm0
movq qword [esi], xmm0
push 1
mov dword [ebp - 4], 0
call fcn.0042862e
mov dword [esi + 4], eax
add esp, 8
mov eax, dword [ebp - 0x10]
lea edi, [eax + 0x14]
lea ecx, [eax + 0x18]
lea edx, [eax + 0x24]
mov dword [eax + 0x34], esi
lea ebx, [eax + 4]
mov dword [eax + 0xc], ebx
lea esi, [eax + 8]
mov dword [eax + 0x10], esi
mov dword [eax + 0x1c], edi
mov dword [eax + 0x20], ecx
mov dword [eax + 0x2c], edx
add eax, 0x28
mov dword [ebp - 0x14], ebx
mov ebx, dword [ebp - 0x10]
mov dword [ebx + 0x30], eax
mov ebx, dword [ebp - 0x14]
mov dword [esi], 0
mov dword [ecx], 0
mov dword [eax], 0
mov eax, dword [ebp - 0x10]
mov dword [ebx], 0
mov dword [edi], 0
mov dword [edx], 0
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 0x43893f
Capabilities:
Read file on windows

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

Function at 0x4402fa
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0043fe4d
Function at 0x402ea9
Capabilities:
Delete registry key
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, esi
lea eax, [ebp - 4]
and esi, 0x300
push eax
mov eax, esi
and edi, 1
or al, 9
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004064db
xor ebx, ebx
cmp eax, ebx
jne 0x402f8c
test byte [ebp + 0x10], 2
je 0x402f0a
push ebx
push ebx
push ebx
lea eax, [ebp - 8]
push ebx
push eax
lea eax, [ebp - 0x214]
mov dword [ebp - 8], ebx
push eax
push ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
cmp eax, 0x103
jne 0x402f71
lea eax, [ebp - 0x214]
push 0x105
push eax
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
jmp 0x402f46
test edi, edi
jne 0x402f71
push dword [ebp + 0x10]
lea eax, [ebp - 0x214]
push eax
push dword [ebp - 4]
call fcn.00402ea9
test eax, eax
jne 0x402f4f
lea eax, [ebp - 0x214]
push 0x105
push eax
push edi
push dword [ebp - 4]
call ebx
test eax, eax
je 0x402f1f
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 3
call fcn.00406a3b
test eax, eax
jne 0x402f81
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
jmp 0x402f8c
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 0x3eb
jmp 0x402f8c
push 0
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x403377
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 8]
push ebx
push esi
xor esi, esi
cmp eax, esi
jl 0x4033a2
mov ecx, dword [0x7a8af8]
push esi
add eax, ecx
push esi
push eax
mov dword [0x79f734], eax
push dword [0x40a01c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 4
call fcn.0040347f
cmp eax, esi
jl 0x403479
lea eax, [ebp + 8]
push 4
push eax
push dword [0x40a01c]
call fcn.004061e1
test eax, eax
je 0x403469
push dword [ebp + 8]
add dword [0x79f734], 4
call fcn.0040347f
mov ebx, eax
cmp ebx, esi
jl 0x403477
cmp dword [ebp + 0x10], esi
jne 0x403445
cmp dword [ebp + 8], esi
jle 0x403477
mov esi, 0x793730
cmp dword [ebp + 8], 0x4000
mov eax, dword [ebp + 8]
jl 0x403407
mov eax, 0x4000
push eax
push esi
push dword [0x40a01c]
mov dword [ebp - 4], eax
call fcn.004061e1
test eax, eax
je 0x403469
push dword [ebp - 4]
push esi
push dword [ebp + 0xc]
call fcn.00406210
test eax, eax
je 0x403441
mov eax, dword [ebp - 4]
sub dword [ebp + 8], eax
add dword [0x79f734], eax
add ebx, eax
cmp dword [ebp + 8], 0
jg 0x4033f6
jmp 0x403477
push 0xfffffffffffffffe
jmp 0x40346b
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0x14]
jl 0x403450
mov eax, dword [ebp + 0x14]
lea ecx, [ebp - 4]
push esi
push ecx
push eax
push dword [ebp + 0x10]
push dword [0x40a01c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40346e
push 0xfffffffffffffffd
pop eax
jmp 0x403479
mov ebx, dword [ebp - 4]
add dword [0x79f734], ebx
mov eax, ebx
pop esi
pop ebx
leave
ret 0x10
Function at 0x405b9f
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
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 0x405bf0
xor eax, eax
jmp 0x405c17
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0xb7
jne 0x405c17
lea eax, [ebp - 0x20]
push eax
push 0x80000007
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
test eax, eax
jne 0x405bec
call esi
pop esi
leave
ret 4

Function at 0x405c51
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
lea eax, [ebp - 0x10]
mov dword [0x7a4f90], 0x44
push eax
xor eax, eax
push 0x7a4f90
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 0x405c90
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
leave
ret 4

Function at 0x405c94
Capabilities:
Create process on windows

Disassembly:
mov eax, dword [esp + 4]
push eax
and dword [eax + 0x24], 0
mov dword [eax], 0x3c
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
ret 4

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

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
push esi
call fcn.00406139
mov edi, eax
cmp edi, 0xffffffff
je 0x405d73
test byte [esp + 0x10], 1
push esi
je 0x405d55
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x405d5b
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x405d64
xor eax, eax
inc eax
jmp 0x405d75
test byte [esp + 0x10], 4
jne 0x405d73
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
xor eax, eax
pop edi
pop esi
ret 8
Function at 0x405d7a
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.00406045
test bl, 8
mov dword [ebp - 8], eax
je 0x405db9
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
neg eax
sbb eax, eax
inc eax
add dword [0x7a8b28], eax
jmp 0x405f36
mov dword [ebp + 8], ebx
and dword [ebp + 8], 1
je 0x405dd3
test eax, eax
je 0x405ee4
test bl, 2
je 0x405ee4
mov esi, 0x7a3f90
push edi
push esi
call fcn.0040666e
cmp dword [ebp + 8], 0
je 0x405df2
push str..
push esi
call sub.KERNEL32.dll_lstrcatW
jmp 0x405df8
push edi
call fcn.00405f89
cmp word [edi], 0
jne 0x405e08
cmp word [0x7a3f90], 0x5c
jne 0x405e13
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 0x405ed9
cmp word [ebp - 0x22c], 0x2e
jne 0x405e5d
cmp word [ebp - 0x22a], 0
je 0x405ebc
cmp word [ebp - 0x22a], 0x2e
jne 0x405e5d
cmp word [ebp - 0x228], 0
je 0x405ebc
lea eax, [ebp - 0x22c]
push eax
push ebx
call fcn.0040666e
test byte [ebp - 0x258], 0x10
je 0x405e88
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x405ebc
push dword [ebp + 0xc]
push edi
call fcn.00405d7a
jmp 0x405ebc
push dword [ebp - 4]
push edi
call fcn.00405d32
test eax, eax
jne 0x405eb4
cmp dword [ebp - 4], eax
je 0x405eac
push edi
push 0xfffffffffffffff1
call fcn.004056d0
push 0
push edi
call fcn.0040642e
jmp 0x405ebc
inc dword [0x7a8b28]
jmp 0x405ebc
push edi
push 0xfffffffffffffff2
call fcn.004056d0
lea eax, [ebp - 0x258]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x405e35
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 0
je 0x405ee4
and word [ebx - 2], 0
xor esi, esi
cmp dword [ebp + 8], esi
je 0x405f36
cmp dword [ebp - 8], esi
jne 0x405ef8
inc dword [0x7a8b28]
jmp 0x405f36
push edi
call fcn.004069a4
test eax, eax
je 0x405f36
push edi
call fcn.00405f3d
mov eax, dword [ebp - 4]
or al, 1
push eax
push edi
call fcn.00405d32
test eax, eax
jne 0x405f2e
cmp dword [ebp - 4], esi
je 0x405ef0
push edi
push 0xfffffffffffffff1
call fcn.004056d0
push esi
push edi
call fcn.0040642e
jmp 0x405f36
push edi
push 0xffffffffffffffe5
call fcn.004056d0
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x406045
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x7a4790
push esi
call fcn.0040666e
push esi
call fcn.00405fe8
mov edi, eax
test edi, edi
jne 0x406066
xor eax, eax
jmp 0x4060be
push edi
call fcn.004068f5
test byte [0x7a8ab8], 0x80
je 0x406083
mov ax, word [edi]
test ax, ax
je 0x406062
cmp ax, 0x5c
je 0x406062
sub edi, esi
sar edi, 1
jmp 0x40609d
call fcn.004069a4
test eax, eax
je 0x406097
test byte [eax], 0x10
je 0x406062
push esi
call fcn.00405f89
push esi
call sub.KERNEL32.dll_lstrlenW
cmp eax, edi
push esi
jg 0x406089
call fcn.00405f3d
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 0x406139
Capabilities:
Check if file exists
Get file attributes
Set file attributes

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

Function at 0x40615e
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 0x40618d
Capabilities:
Get common file path

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

Disassembly:
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
push ebp
push esi
mov esi, dword [esp + 0x14]
push edi
test esi, esi
mov dword [0x7a5628], 0x55004e
mov dword [0x7a562c], 0x4c
mov edi, 0x400
mov ebp, 0x7a5628
je 0x40630a
push 1
push 0
push esi
call fcn.0040615e
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebp
push esi
call ebx
test eax, eax
je 0x406429
cmp eax, edi
jg 0x406429
mov esi, 0x7a5e28
push edi
push esi
push dword [esp + 0x1c]
call ebx
test eax, eax
je 0x406429
cmp eax, edi
jg 0x406429
push esi
push ebp
push str._ls_ls_r_n
push 0x7a5228
call dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, eax
mov eax, dword [0x7a8ab0]
add esp, 0x10
push dword [eax + 0x128]
push esi
call fcn.004066ab
push 4
push 0xc0000000
push esi
call fcn.0040615e
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x18], ebp
je 0x406429
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 0x406422
push edi
push esi
push ebp
call fcn.004061e1
test eax, eax
je 0x406422
push str._Rename__r_n
push esi
call fcn.004060c3
test eax, eax
jne 0x4063c0
lea eax, [esi + edi]
push str._Rename__r_n
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
add edi, 0xa
jmp 0x4063f5
add eax, 0xa
push 0x40a5b0
push eax
call fcn.004060c3
mov ebp, eax
test ebp, ebp
je 0x4063f1
lea ecx, [esi + edi]
lea eax, [ecx + ebx]
jmp 0x4063e2
mov dl, byte [ecx]
mov byte [eax], dl
dec eax
dec ecx
cmp ecx, ebp
ja 0x4063dc
sub ebp, esi
inc ebp
mov eax, ebp
mov ebp, dword [esp + 0x18]
jmp 0x4063f7
mov ebp, dword [esp + 0x18]
mov eax, edi
push ebx
add eax, esi
push 0x7a5228
push eax
call fcn.00406119
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.00406210
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 0x40642e
Capabilities:
Move file

Disassembly:
push 5
push dword [esp + 0xc]
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x406451
push dword [esp + 8]
push dword [esp + 8]
call fcn.004062b4
pop ecx
pop ecx
inc dword [0x7a8b30]
ret 8
Function at 0x40653c
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
lea eax, [ebp + 0x18]
push esi
push eax
mov eax, dword [ebp + 0x18]
neg eax
sbb eax, eax
mov dword [ebp - 4], 0x800
and eax, 0x100
or eax, 0x20019
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004064db
mov esi, dword [ebp + 0x14]
test eax, eax
jne 0x4065ac
lea eax, [ebp - 4]
push edi
push eax
lea eax, [ebp + 0xc]
push esi
push eax
push 0
push dword [ebp + 0x10]
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp + 0x18]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
and word [esi + 0x7fe], 0
test edi, edi
pop edi
jne 0x4065ac
cmp dword [ebp + 0xc], 1
je 0x4065b0
cmp dword [ebp + 0xc], 2
je 0x4065b0
and word [esi], 0
pop esi
leave
ret 0x14
Function at 0x4069cb
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x23c
push esi
mov esi, 0x104
lea eax, [ebp - 0x23c]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp eax, esi
pop esi
jbe 0x4069ef
xor eax, eax
test eax, eax
je 0x406a02
cmp word [ebp + eax*2 - 0x23e], 0x5c
je 0x406a02
xor ecx, ecx
jmp 0x406a05
xor ecx, ecx
inc ecx
push dword [ebp + 8]
lea ecx, [ecx*2 + 0x40a014]
lea eax, [ebp + eax*2 - 0x23c]
push ecx
push str._s_S.dll
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x23c]
push 8
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
leave
ret 4

Function at 0x406b28
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x7a662c], 0
push esi
jne 0x406b5f
xor ecx, ecx
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x406b39
mov dword [ecx*4 + 0x7a6628], eax
inc ecx
cmp ecx, 0x100
jl 0x406b34
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x406b90
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x7a6628]
xor eax, esi
inc ecx
dec edx
jne 0x406b72
pop edi
not eax
pop esi
ret 0xc
Function at 0x404560
Capabilities:
Hash data using djb2

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x10
xor eax, eax
cmp dword [esp + 0x24], 0
je 0x404671
mov ebx, dword [esp + 0x28]
test ebx, ebx
je 0x404671
mov ebp, dword [esp + 0x2c]
test ebp, ebp
je 0x4045b4
mov ecx, 0x1505
xor edi, edi
nop
movzx edx, byte [ebx + edi]
test edx, edx
je 0x4045bb
mov esi, ecx
shl esi, 5
add esi, ecx
add esi, edx
mov ecx, edi
and ecx, 1
xor edi, 1
lea edi, [edi + ecx*2]
mov ecx, esi
cmp edi, ebp
jb 0x404590
jmp 0x4045bd
mov esi, 0x1505
jmp 0x4045bd
mov esi, ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + 0x20]
test edx, edx
je 0x404671
mov eax, edx
xor eax, 1
mov edi, edx
and edi, 0xfffffffe
add edi, edi
sub edi, eax
and edi, esi
mov dword [esp + 0xc], edi
lea eax, [edx - 1]
mov dword [esp + 8], eax
mov eax, dword [ecx + 4]
mov dword [esp + 4], eax
xor ebp, ebp
mov dword [esp], edx
jmp 0x40460f
mov eax, ebp
xor eax, 1
and ebp, 1
lea ebp, [eax + ebp*2]
cmp ebp, edx
jae 0x40466f
mov eax, dword [esp + 0xc]
add eax, ebp
and eax, dword [esp + 8]
mov edi, dword [esp + 4]
mov edi, dword [edi + eax*4]
cmp edi, 0xffffffff
je 0x40466f
mov eax, dword [ecx + 8]
cmp dword [eax + edi*4], esi
jne 0x404600
mov eax, dword [ecx + 0xc]
mov ebx, dword [eax + edi*4]
push ebx
call fcn.0040cc20
mov edx, dword [esp + 4]
mov ecx, dword [esp + 0x28]
add esp, 4
cmp eax, dword [esp + 0x2c]
jne 0x404600
push dword [esp + 0x2c]
push ebx
push dword [esp + 0x30]
call fcn.0040cc40
mov edx, dword [esp + 0xc]
mov ecx, dword [esp + 0x30]
add esp, 0xc
test eax, eax
jne 0x404600
mov eax, dword [ecx + 0x10]
mov eax, dword [eax + edi*4]
jmp 0x404671
xor eax, eax
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret