joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1010eec1
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x1010ef5e
push ebx
push esi
call fcn.1010ee8a
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.1010a95f
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x1010ef0b
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1010ef5d
push edi
push eax
call fcn.1010a7bf
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x1010ef2b
call fcn.10107dab
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1010ef5c
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.1010a95f
add esp, 0x20
test eax, eax
jne 0x1010ef4a
push edi
call fcn.10107dab
jmp 0x1010ef52
push ebx
call fcn.10107dab
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x1010ef61
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x1010ef72
pop esi
ret
push ebx
push edi
push esi
call fcn.1010ee8a
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.1010a7bf
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x1010ef9a
push ebx
push esi
push edi
call fcn.100f63c0
add esp, 0xc
push 0
call fcn.10107dab
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x1010f36a
Capabilities:
Set environment variable

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

Function at 0x10111914
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.10107a63
mov esi, dword [ebp + 8]
mov edi, eax
push 2
lea eax, [ebp - 4]
mov ecx, esi
push eax
and ecx, 0x3ff
push 0x20000001
or ecx, 0x400
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x10111983
cmp esi, dword [ebp - 4]
je 0x1011197e
cmp dword [ebp + 0xc], 0
je 0x1011197e
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x1011195b
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.10111466
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x10111985
xor eax, eax
inc eax
jmp 0x10111985
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x101119ea
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x10156440]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x18], eax
call fcn.10107a63
add eax, 0x50
lea edi, [ebp - 0x10]
mov dword [ebp - 0x14], eax
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.10107a63
lea ecx, [ebp - 0x10]
xor edx, edx
mov dword [eax + 0x34c], ecx
lea ecx, [esi + 0x80]
mov eax, dword [ebp - 0x14]
mov dword [eax], esi
lea edi, [eax + 4]
mov dword [edi], ecx
test ecx, ecx
je 0x10111a61
cmp word [ecx], dx
je 0x10111a61
mov eax, dword [0x10139d84]
push edi
dec eax
push eax
push 0x10139c70
call fcn.10111989
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x10111ad4
cmp word [eax], dx
je 0x10111ad4
mov eax, dword [edi]
test eax, eax
je 0x10111a85
cmp word [eax], dx
je 0x10111a85
lea eax, [ebp - 0x10]
push eax
call fcn.1011136c
jmp 0x10111a8e
lea eax, [ebp - 0x10]
push eax
call fcn.10111407
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x10111afe
mov eax, dword [0x10139c6c]
push dword [ebp - 0x14]
dec eax
push eax
push 0x10139960
call fcn.10111989
add esp, 0xc
test al, al
je 0x10111afe
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x10111ac9
cmp word [eax], di
je 0x10111ac9
lea eax, [ebp - 0x10]
push eax
call fcn.1011136c
pop ecx
jmp 0x10111b00
lea eax, [ebp - 0x10]
push eax
call fcn.10111407
jmp 0x10111ac6
mov eax, dword [edi]
test eax, eax
je 0x10111aeb
cmp word [eax], dx
je 0x10111aeb
lea eax, [ebp - 0x10]
push eax
call fcn.10111321
pop ecx
jmp 0x10111afe
mov dword [ebp - 0x10], 0x104
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
xor edi, edi
cmp dword [ebp - 0x10], 0
je 0x10111bc9
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.1011180e
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x10111bc9
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x10111bc9
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x10111bc9
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x10111b56
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.1010845d
test ebx, ebx
je 0x10111bc4
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.1010845d
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x10111bc9
push 0x40
lea eax, [ebx + 0x80]
push eax
push 0x1002
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x10111bc9
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.10114979
add esp, 0x10
xor eax, eax
inc eax
jmp 0x10111bcb
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100f46b4
leave
ret
Function at 0x10115fd0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x10115ffd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x10115ffd
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x302e058
Capabilities:
Decompress data using aplib

Disassembly:
call 0x302e1a8
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, pe_nt_image_headers32
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0x302e07e
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x302e06a
add dl, dl
jne 0x302e089
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x302e0dc
xor eax, eax
add dl, dl
jne 0x302e096
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x302e17d
add dl, dl
jne 0x302e0a5
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x302e0b0
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x302e0bb
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x302e0c6
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x302e0d2
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x302e075
mov eax, 1
add dl, dl
jne 0x302e0ea
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x302e0f5
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x302e0e1
sub eax, ebx
mov ebx, 1
jne 0x302e128
mov ecx, 1
add dl, dl
jne 0x302e10e
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x302e119
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x302e105
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x302e075
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x302e13f
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x302e14a
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x302e136
cmp eax, 0x7d00
jae 0x302e16d
cmp eax, 0x500
jb 0x302e168
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x302e075
cmp eax, 0x7f
ja 0x302e170
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x302e075
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x302e19e
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x302e075
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10
Function at 0x402b7a
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
push ebx
push esi
lea eax, [ebp - 4]
push edi
push eax
mov eax, dword [0x429270]
or al, 8
sub ebx, ebx
push eax
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x402c0e
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
mov edi, 0x105
jmp 0x402bcb
cmp dword [ebp + 0x10], ebx
jne 0x402c02
lea eax, [ebp - 0x210]
push ebx
push eax
push dword [ebp - 4]
call fcn.00402b7a
or eax, eax
jne 0x402bdd
lea eax, [ebp - 0x210]
push edi
push eax
push ebx
push dword [ebp - 4]
call esi
or eax, eax
je 0x402bb2
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 3
call fcn.00406183
cmp eax, ebx
je 0x402c15
push ebx
push dword [0x429270]
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
jmp 0x402c0e
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 0xc
cmp dword [0x429270], ebx
jne 0x402c0b
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
or eax, eax
jne 0x402c0b
jmp 0x402c0e
Function at 0x402fa2
Capabilities:
Check for time delay via gettickcount
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
push ebx
push esi
mov esi, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 8], esi
or edi, edi
jne 0x402fc2
mov dword [ebp - 8], GetSystemMetrics
and dword [ebp - 4], 0
mov ebx, edi
test edi, edi
jne 0x402fd1
mov ebx, 0x40fe60
mov eax, dword [ebp + 8]
test eax, eax
jl 0x402fe6
mov ecx, dword [0x429218]
add ecx, eax
push ecx
call fcn.004031b4
lea eax, [ebp + 0x14]
push 4
push eax
call fcn.0040319e
or eax, eax
je 0x403149
test byte [ebp + 0x17], 0x80
je 0x403132
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
mov ecx, 0x40bdd0
mov dword [ebp - 0xc], eax
call fcn.0040629f
and dword [ebp + 0x14], 0x7fffffff
mov eax, dword [ebp + 0x14]
mov dword [ebp + 8], eax
jle 0x403194
mov esi, 0x4000
cmp dword [ebp + 0x14], esi
jge 0x403036
mov esi, dword [ebp + 0x14]
mov edi, 0x40be60
push esi
push edi
call fcn.0040319e
or eax, eax
je 0x403149
sub dword [ebp + 0x14], esi
mov dword [0x40bde8], edi
mov dword [0x40bdec], esi
mov eax, dword [ebp - 8]
mov ecx, 0x40bdd0
mov dword [0x40bdf0], ebx
mov dword [0x40bdf4], eax
call fcn.004062bf
or eax, eax
mov dword [ebp - 0x10], eax
jl 0x40312a
mov esi, dword [0x40bdf0]
sub esi, ebx
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
test byte [0x429274], 1
mov edi, eax
je 0x4030de
sub eax, dword [ebp - 0xc]
cmp eax, 0xc8
ja 0x4030a5
cmp dword [ebp + 0x14], 0
jne 0x4030de
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.004050c1
mov dword [ebp - 0xc], edi
sub eax, eax
cmp esi, eax
je 0x40311f
cmp dword [ebp + 0x10], eax
jne 0x403107
push eax
lea eax, [ebp - 0x14]
push eax
push esi
push ebx
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x40312e
cmp dword [ebp - 0x14], esi
jne 0x40312e
add dword [ebp - 4], esi
jmp 0x403113
add dword [ebp - 4], esi
sub dword [ebp - 8], esi
mov ebx, dword [0x40bdf0]
cmp dword [ebp - 0x10], 1
jne 0x403059
jmp 0x403194
cmp dword [ebp + 0x14], eax
jg 0x403029
jmp 0x403194
push 0xfffffffffffffffc
jmp 0x40314b
push 0xfffffffffffffffe
jmp 0x40314b
or edi, edi
je 0x403189
cmp dword [ebp + 0x14], esi
jge 0x40313e
mov esi, dword [ebp + 0x14]
push esi
push edi
call fcn.0040319e
test eax, eax
jne 0x403191
push 0xfffffffffffffffd
pop eax
jmp 0x403197
mov esi, dword [ebp - 8]
cmp dword [ebp + 0x14], esi
jge 0x403159
mov esi, dword [ebp + 0x14]
mov edi, 0x40be60
push esi
push edi
call fcn.0040319e
test eax, eax
je 0x403149
lea eax, [ebp + 0x10]
push 0
push eax
push esi
push edi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x40312e
cmp esi, dword [ebp + 0x10]
jne 0x40312e
add dword [ebp - 4], esi
sub dword [ebp + 0x14], esi
cmp dword [ebp + 0x14], 0
jg 0x40314e
jmp 0x403194
mov dword [ebp - 4], esi
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x405590
Capabilities:
Create process on windows

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

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

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
push esi
call fcn.00405a60
mov edi, eax
cmp edi, 0xffffffff
je 0x40569a
test byte [esp + 0x10], 1
push esi
je 0x40567c
call dword [sym.imp.KERNEL32.DLL_RemoveDirectoryW]
jmp 0x405682
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
test eax, eax
je 0x40568b
xor eax, eax
inc eax
jmp 0x40569c
test byte [esp + 0x10], 4
jne 0x40569a
push edi
push esi
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
xor eax, eax
pop edi
pop esi
ret 8
Function at 0x4056a1
Capabilities:
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
push esp
pop ebp
sub esp, 0x258
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
push ebx
pop eax
and eax, 4
push edi
mov dword [ebp - 4], eax
call fcn.0040596c
test bl, 8
mov dword [ebp - 8], eax
je 0x4056e0
push edi
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
neg eax
sbb eax, eax
inc eax
add dword [0x429248], eax
jmp 0x40585d
mov dword [ebp + 8], ebx
and dword [ebp + 8], 1
je 0x4056fa
test eax, eax
je 0x40580b
test bl, 2
je 0x40580b
mov esi, 0x4246b8
push edi
push esi
call fcn.00405e19
cmp dword [ebp + 8], 0
je 0x405719
push str..
push esi
call sub.KERNEL32.DLL_lstrcatW
jmp 0x40571f
push edi
call fcn.004058b0
cmp word [edi], 0
jne 0x40572f
cmp word [0x4246b8], 0x5c
jne 0x40573a
push 0x409014
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 0x405800
cmp word [ebp - 0x22c], 0x2e
jne 0x405784
cmp word [ebp - 0x22a], 0
je 0x4057e3
cmp word [ebp - 0x22a], 0x2e
jne 0x405784
cmp word [ebp - 0x228], 0
je 0x4057e3
lea eax, [ebp - 0x22c]
push eax
push ebx
call fcn.00405e19
test byte [ebp - 0x258], 0x10
je 0x4057af
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x4057e3
push dword [ebp + 0xc]
push edi
call fcn.004056a1
jmp 0x4057e3
push dword [ebp - 4]
push edi
call fcn.00405659
or eax, eax
jne 0x4057db
cmp dword [ebp - 4], eax
je 0x4057d3
push edi
push 0xfffffffffffffff1
call fcn.004050c1
push 0
push edi
call fcn.00405cb3
jmp 0x4057e3
inc dword [0x429248]
jmp 0x4057e3
push edi
push 0xfffffffffffffff2
call fcn.004050c1
lea eax, [ebp - 0x258]
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_FindNextFileW]
test eax, eax
jne 0x40575c
push esi
call dword [sym.imp.KERNEL32.DLL_FindClose]
cmp dword [ebp + 8], 0
je 0x40580b
and word [ebx - 2], 0
sub esi, esi
cmp dword [ebp + 8], esi
je 0x40585d
cmp dword [ebp - 8], esi
jne 0x40581f
inc dword [0x429248]
jmp 0x40585d
push edi
call fcn.0040615c
or eax, eax
je 0x40585d
push edi
call fcn.00405864
mov eax, dword [ebp - 4]
or al, 1
push eax
push edi
call fcn.00405659
test eax, eax
jne 0x405855
cmp dword [ebp - 4], esi
je 0x405817
push edi
push 0xfffffffffffffff1
call fcn.004050c1
push esi
push edi
call fcn.00405cb3
jmp 0x40585d
push edi
push 0xffffffffffffffe5
call fcn.004050c1
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x40596c
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x424eb8
push esi
call fcn.00405e19
push esi
call fcn.0040590f
mov edi, eax
or edi, edi
jne 0x40598d
sub eax, eax
jmp 0x4059e5
push edi
call fcn.004060ad
test byte [0x4291d8], 0x80
je 0x4059aa
mov ax, word [edi]
test ax, ax
je 0x405989
cmp ax, 0x5c
je 0x405989
sub edi, esi
sar edi, 1
jmp 0x4059c4
call fcn.0040615c
test eax, eax
je 0x4059be
test byte [eax], 0x10
je 0x405989
push esi
call fcn.004058b0
push esi
call sub.KERNEL32.DLL_lstrlenW
cmp eax, edi
push esi
jg 0x4059b0
call fcn.00405864
push esi
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
push ecx
pop eax
pop edi
pop esi
ret 4

Function at 0x405a60
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]
push eax
pop esi
cmp esi, 0xffffffff
je 0x405a7f
and al, 0xfe
push eax
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
push esi
pop eax
pop esi
ret 4

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

Disassembly:
push ebp
push esp
pop ebp
push ecx
push ecx
push esi
mov esi, dword [ebp + 8]
push edi
push 0x64
pop edi
mov eax, dword [0x409528]
dec edi
mov dword [ebp - 8], eax
mov eax, dword [0x40952c]
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
push 0x1a
sub 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 0x405b04
test edi, edi
jne 0x405ac1
and word [esi], di
pop edi
pop esi
leave
ret 8
mov eax, esi
jmp 0x405afe
Function at 0x405b37
Capabilities:
Get file size
Write file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov ebx, 0x425d50
push 0x40954c
push ebx
call dword [sym.imp.KERNEL32.DLL_lstrcpyW]
mov esi, dword [esp + 0x1c]
mov ebp, dword [sym.imp.KERNEL32.DLL_GetShortPathNameW]
or esi, esi
mov edi, 0x400
je 0x405b86
push 1
push 0
push esi
call fcn.00405a85
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push edi
push ebx
push esi
call ebp
test eax, eax
je 0x405cad
cmp eax, edi
jg 0x405cad
mov esi, 0x426550
push edi
push esi
push dword [esp + 0x20]
call ebp
or eax, eax
je 0x405cad
cmp eax, edi
jg 0x405cad
push esi
push ebx
push str._ls_ls_r_n
push 0x425950
call dword [sym.imp.USER32.dll_wsprintfA]
push eax
pop ebx
mov eax, dword [0x4291d0]
add esp, 0x10
push dword [eax + 0x128]
push esi
call fcn.00405e3b
push 4
push 0xc0000000
push esi
call fcn.00405a85
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x1c], ebp
je 0x405cad
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
or esi, esi
je 0x405ca6
push edi
push esi
push ebp
call fcn.00405b08
or eax, eax
je 0x405ca6
push str._Rename__r_n
push esi
call fcn.004059ea
test eax, eax
jne 0x405c3c
lea eax, [esi + edi]
push str._Rename__r_n
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpyA]
add edi, 0xa
jmp 0x405c71
add eax, 0xa
push 0x409530
push eax
call fcn.004059ea
push eax
pop ebp
or ebp, ebp
je 0x405c6d
lea ecx, [esi + edi]
lea eax, [ecx + ebx]
jmp 0x405c5e
mov dl, byte [ecx]
mov byte [eax], dl
dec eax
dec ecx
cmp ecx, ebp
ja 0x405c58
sub ebp, esi
inc ebp
push ebp
pop eax
mov ebp, dword [esp + 0x1c]
jmp 0x405c73
mov ebp, dword [esp + 0x1c]
push edi
pop eax
push ebx
add eax, esi
push 0x425950
push eax
call fcn.00405a40
xor eax, eax
push eax
push eax
push eax
push ebp
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
lea eax, [esp + 0x10]
push 0
add edi, ebx
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.DLL_WriteFile]
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
pop ecx
ret

Function at 0x405ce6
Capabilities:
Query or enumerate registry value

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