joyce8/EMBER2024-capa huggingface dataset:
Function at 0x407320
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
cmp dword [ecx + 0x38], 0
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
je 0x4073ec
mov esi, dword [ebp + 0x10]
mov ebx, esi
mov edx, dword [ebp + 0xc]
mov edi, edx
mov eax, dword [ebp + 8]
mov dword [ebp + 8], eax
test esi, esi
jl 0x4073db
jg 0x407358
test edx, edx
je 0x4073db
call fcn.004044d0
mov esi, eax
mov eax, edx
mov dword [ebp - 8], eax
test eax, eax
jl 0x4073a6
jg 0x40736e
test esi, esi
je 0x4073a6
cmp ebx, eax
jg 0x40737d
jl 0x407378
cmp edi, esi
jae 0x40737d
mov esi, edi
mov dword [ebp - 8], ebx
mov ecx, dword [ebp - 4]
mov eax, dword [ebp + 8]
push esi
push eax
mov eax, dword [ecx + 0x20]
push dword [eax]
call fcn.0042ebf0
mov ecx, dword [ebp - 4]
add esp, 0xc
sub edi, esi
sbb ebx, dword [ebp - 8]
mov eax, dword [ecx + 0x30]
sub dword [eax], esi
mov eax, dword [ecx + 0x20]
add dword [eax], esi
jmp 0x4073c8
mov ecx, dword [ebp - 4]
mov eax, dword [ebp + 8]
mov edx, dword [ecx]
movzx eax, byte [eax]
push eax
call dword [edx + 0xc]
cmp eax, 0xffffffff
je 0x4073d5
mov ecx, dword [ebp - 4]
add edi, 0xffffffff
mov esi, 1
adc ebx, 0xffffffff
add dword [ebp + 8], esi
test ebx, ebx
jg 0x407358
jl 0x4073d5
test edi, edi
jne 0x407358
mov edx, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
sub edx, edi
pop edi
sbb esi, ebx
mov eax, edx
mov edx, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ecx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x14], esi
mov edx, dword [eax]
lea eax, [ecx + 0x30]
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x10], edx
mov dword [ebp - 0xc], eax
test edx, edx
je 0x407410
mov eax, dword [eax]
mov edx, dword [eax]
jmp 0x407415
xor edx, edx
mov dword [ebp - 0xc], eax
mov eax, edx
cdq
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], edx
test edi, edi
jl 0x407474
jg 0x407428
test esi, esi
je 0x407474
test edx, edx
jl 0x40746f
jg 0x407432
test eax, eax
je 0x40746f
cmp edi, edx
jg 0x407444
jl 0x40743c
cmp esi, eax
jae 0x407444
mov eax, esi
mov dword [ebp + 0x10], esi
mov dword [ebp - 8], edi
mov ebx, dword [ebp + 8]
push eax
push ebx
push dword [ebp - 0x10]
call fcn.0042ebf0
mov eax, dword [ebp - 0xc]
add esp, 0xc
mov edx, dword [ebp + 0x10]
add ebx, edx
mov ecx, dword [ebp - 4]
sub esi, edx
mov eax, dword [eax]
sbb edi, dword [ebp - 8]
sub dword [eax], edx
mov eax, dword [ecx + 0x20]
add dword [eax], edx
jmp 0x407477
mov ebx, dword [ebp + 8]
jmp 0x407481
mov ebx, dword [ebp + 8]
test edi, edi
jl 0x40749a
jg 0x407481
test esi, esi
je 0x40749a
mov eax, dword [ecx + 0x4c]
test eax, eax
je 0x40749a
push eax
push esi
push 1
push ebx
call fcn.0043322a
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x409630
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp fcn.0040dfc0

Function at 0x409640
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp fcn.0040e0d0
Function at 0x410b90
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
lea eax, [esi + 4]
push eax
push 0
push dword [ebp + 8]
push 0x410bd0
push 0
push 0
call fcn.00434aaa
add esp, 0x18
mov dword [esi], eax
mov eax, esi
pop esi
pop ebp
ret 4

Function at 0x42e371
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x42e3b0
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x42e3b0
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x42e3b0
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x42e3b0
cmp dword [ecx + 0x74], 0xe
jbe 0x42e3b0
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x441c8c
Capabilities:
Read file on windows

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

Function at 0x44a67d
Capabilities:
Set environment variable

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

Function at 0x451d60
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x451d8d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x451d8d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x401ac0
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
mov dword [esp], 0x407044
call sym._EnterCriticalSection_4
mov ebx, dword [0x40703c]
sub esp, 4
test ebx, ebx
je 0x401b0b
nop
mov eax, dword [ebx]
mov dword [esp], eax
call sym._TlsGetValue_4
sub esp, 4
mov esi, eax
call sym._GetLastError_0
test eax, eax
jne 0x401b04
test esi, esi
je 0x401b04
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x401ae0
mov dword [esp], 0x407044
call sym._LeaveCriticalSection_4
sub esp, 4
add esp, 0x14
pop ebx
pop esi
ret

Function at 0x401cf0
Capabilities:
Write file on windows

Disassembly:
push esi
push ebx
sub esp, 0x14
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x17
mov dword [esp + 4], 1
lea esi, [esp + 0x24]
mov dword [esp], str.Mingw_runtime_failure:_n
lea ebx, [eax + 0x40]
mov dword [esp + 0xc], ebx
call sym._fwrite
mov eax, dword [esp + 0x20]
mov dword [esp + 8], esi
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._vfprintf
call sym._abort
lea esi, [esi]

Function at 0x401d40
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
push edi
mov edi, ecx
push esi
push ebx
mov ebx, eax
mov esi, edx
sub esp, 0x4c
lea eax, [esp + 0x24]
mov dword [esp + 8], 0x1c
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._VirtualQuery_12
sub esp, 0xc
test eax, eax
je 0x401e18
mov eax, dword [esp + 0x38]
cmp eax, 0x40
je 0x401d7e
cmp eax, 4
jne 0x401da0
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
call sym._memcpy
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x30]
lea ebp, [esp + 0x20]
mov dword [esp + 8], 0x40
mov dword [esp + 0xc], ebp
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sym._VirtualProtect_16
sub esp, 0x10
mov edx, dword [esp + 0x38]
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
mov dword [esp + 0x1c], edx
call sym._memcpy
mov edx, dword [esp + 0x1c]
cmp edx, 0x40
je 0x401d8e
cmp edx, 4
je 0x401d8e
mov eax, dword [esp + 0x20]
mov dword [esp + 0xc], ebp
mov dword [esp + 8], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sym._VirtualProtect_16
sub esp, 0x10
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x1c
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
call fcn.00401cf0
Function at 0x402a4c
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push ebx
push esi
lea eax, [ebp - 4]
push edi
push eax
mov eax, dword [0x42ed30]
or al, 8
xor ebx, ebx
push eax
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x402ae0
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov edi, 0x105
jmp 0x402a9d
cmp dword [ebp + 0x10], ebx
jne 0x402ad4
lea eax, [ebp - 0x10c]
push ebx
push eax
push dword [ebp - 4]
call fcn.00402a4c
test eax, eax
jne 0x402aaf
lea eax, [ebp - 0x10c]
push edi
push eax
push ebx
push dword [ebp - 4]
call esi
test eax, eax
je 0x402a84
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 4
call fcn.004060a9
cmp eax, ebx
je 0x402ae7
push ebx
push dword [0x42ed30]
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
jmp 0x402ae0
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 [0x42ed30], ebx
jne 0x402add
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
jne 0x402add
jmp 0x402ae0
Function at 0x402f50
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor edi, edi
cmp eax, edi
jl 0x402f7d
mov ecx, dword [0x42ecd8]
push edi
add eax, ecx
push edi
push eax
mov dword [0x420c8c], eax
push dword [0x409018]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 4
pop esi
push esi
call fcn.0040307b
cmp eax, edi
jl 0x403074
lea eax, [ebp - 4]
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
push eax
lea eax, [ebp + 8]
push esi
push eax
push dword [0x409018]
call ebx
test eax, eax
je 0x403071
cmp dword [ebp - 4], esi
jne 0x403071
push dword [ebp + 8]
add dword [0x420c8c], esi
call fcn.0040307b
cmp eax, edi
mov dword [ebp - 8], eax
jl 0x403074
cmp dword [ebp + 0x10], edi
jne 0x403040
cmp dword [ebp + 8], edi
jle 0x40306c
mov esi, 0x41cc88
mov edi, 0x4000
cmp dword [ebp + 8], edi
jge 0x402ff0
mov edi, dword [ebp + 8]
lea eax, [ebp - 4]
push 0
push eax
push edi
push esi
push dword [0x409018]
call ebx
test eax, eax
je 0x403071
cmp edi, dword [ebp - 4]
jne 0x403071
lea eax, [ebp + 0x14]
push 0
push eax
push dword [ebp - 4]
push esi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40303c
cmp dword [ebp + 0x14], edi
jne 0x40303c
mov eax, dword [ebp - 4]
add dword [ebp - 8], eax
sub dword [ebp + 8], eax
add dword [0x420c8c], eax
cmp dword [ebp + 8], 0
jg 0x402fe3
jmp 0x40306c
push 0xfffffffffffffffe
jmp 0x403073
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0x14]
jl 0x40304b
mov eax, dword [ebp + 0x14]
lea ecx, [ebp - 4]
push edi
push ecx
push eax
push dword [ebp + 0x10]
push dword [0x409018]
call ebx
test eax, eax
je 0x403071
mov eax, dword [ebp - 4]
add dword [0x420c8c], eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x403074
push 0xfffffffffffffffd
pop eax
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x40307b
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, dword [0x420c8c]
sub esi, dword [0x40b0c0]
push edi
add esi, dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor ebx, ebx
add eax, 0x1f4
cmp esi, ebx
mov dword [0x42ec8c], eax
jle 0x4031e5
push dword [0x428c9c]
call fcn.00403229
push ebx
push ebx
push dword [0x40b0c0]
push dword [0x409018]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [0x428c98], esi
mov dword [0x420c88], ebx
mov ebp, 0x414c88
mov eax, dword [0x420c90]
mov edi, 0x4000
sub eax, dword [0x428c9c]
cmp eax, edi
jg 0x4030f0
mov edi, eax
mov esi, 0x41cc88
push edi
push esi
call fcn.004031f7
test eax, eax
je 0x4031d7
add dword [0x428c9c], edi
mov dword [0x40b0c8], esi
mov dword [0x40b0cc], edi
cmp dword [0x42ec90], ebx
je 0x403147
cmp dword [0x42ed20], ebx
jne 0x403147
mov eax, dword [0x428c98]
push ebx
sub eax, dword [0x420c8c]
sub eax, dword [esp + 0x1c]
add eax, dword [0x40b0c0]
mov dword [0x420c88], eax
call fcn.00402be9
pop ecx
push 0x40b0c8
mov dword [0x40b0d0], ebp
mov dword [0x40b0d4], 0x8000
call fcn.00406186
test eax, eax
jl 0x4031e0
mov esi, dword [0x40b0d0]
sub esi, ebp
je 0x4031a1
lea eax, [esp + 0x10]
push ebx
push eax
push esi
push ebp
push dword [0x409018]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4031dc
cmp esi, dword [esp + 0x10]
jne 0x4031dc
add dword [0x40b0c0], esi
cmp dword [0x40b0cc], ebx
jne 0x403116
jmp 0x4031ad
cmp dword [0x40b0cc], ebx
jne 0x4031e0
cmp edi, ebx
je 0x4031e0
mov eax, dword [0x420c8c]
mov ecx, eax
sub ecx, dword [0x40b0c0]
add ecx, dword [esp + 0x18]
test ecx, ecx
jg 0x4030da
push ebx
push ebx
push eax
push dword [0x409018]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x4031e5
or eax, 0xffffffff
jmp 0x4031ef
push 0xfffffffffffffffe
jmp 0x4031e2
push 0xfffffffffffffffd
pop eax
jmp 0x4031ef
push 1
call fcn.00402be9
pop ecx
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 4
Function at 0x4054cb
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, 0x407310
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], 0x407300
mov dword [ebp - 0xc], 0xc
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x40551c
xor eax, eax
jmp 0x405543
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0xb7
jne 0x405543
lea eax, [ebp - 0x20]
push eax
push 0x80000007
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityA]
test eax, eax
jne 0x405518
call esi
pop esi
leave
ret 4

Function at 0x40557d
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
lea eax, [ebp - 0x10]
mov dword [0x42c0f0], 0x44
push eax
xor eax, eax
push 0x42c0f0
push eax
push eax
push eax
push eax
push eax
push eax
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x4055b8
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
leave
ret 4
Function at 0x405642
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x148
push esi
push edi
mov edi, dword [ebp + 8]
push edi
call fcn.004058f1
test byte [ebp + 0xc], 8
mov dword [ebp - 8], eax
je 0x405676
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
inc eax
add dword [0x42ed08], eax
jmp 0x40580a
push ebx
mov ebx, dword [ebp + 0xc]
and ebx, 1
mov dword [ebp - 4], ebx
je 0x405694
test eax, eax
je 0x4057b5
test byte [ebp + 0xc], 2
je 0x4057b5
mov esi, 0x42b0f0
push edi
push esi
call fcn.00405d1d
test ebx, ebx
je 0x4056b1
push str..
push esi
call sub.KERNEL32.dll_lstrcatA
jmp 0x4056b7
push edi
call fcn.00405857
cmp byte [edi], 0
jne 0x4056c5
cmp byte [0x42b0f0], 0x5c
jne 0x4056d0
push 0x409010
push edi
call sub.KERNEL32.dll_lstrcatA
push edi
call sub.KERNEL32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x148]
push eax
push esi
add ebx, edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
je 0x4057ab
lea eax, [ebp - 0x11c]
push 0x3f
push eax
lea esi, [ebp - 0x11c]
call fcn.0040583b
cmp byte [eax], 0
je 0x405716
cmp byte [ebp - 0x18], 0
je 0x405716
lea esi, [ebp - 0x18]
cmp byte [esi], 0x2e
jne 0x40572c
mov al, byte [esi + 1]
test al, al
je 0x40578a
cmp al, 0x2e
jne 0x40572c
cmp byte [esi + 2], 0
je 0x40578a
push esi
push ebx
call fcn.00405d1d
test byte [ebp - 0x148], 0x10
je 0x405751
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x40578a
push dword [ebp + 0xc]
push edi
call fcn.00405642
jmp 0x40578a
push edi
call fcn.004059d5
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x405782
test byte [ebp + 0xc], 4
je 0x40577a
push edi
push 0xfffffffffffffff1
call fcn.00405009
push 0
push edi
call fcn.00405a6b
jmp 0x40578a
inc dword [0x42ed08]
jmp 0x40578a
push edi
push 0xfffffffffffffff2
call fcn.00405009
lea eax, [ebp - 0x148]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4056f4
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 4], 0
je 0x4057b5
and byte [ebx - 1], 0
xor esi, esi
pop ebx
cmp dword [ebp - 4], esi
je 0x40580a
cmp dword [ebp - 8], esi
jne 0x4057ca
inc dword [0x42ed08]
jmp 0x40580a
push edi
call fcn.00406018
test eax, eax
je 0x40580a
push edi
call fcn.00405810
push edi
call fcn.004059d5
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x405802
test byte [ebp + 0xc], 4
je 0x4057c2
push edi
push 0xfffffffffffffff1
call fcn.00405009
push esi
push edi
call fcn.00405a6b
jmp 0x40580a
push edi
push 0xffffffffffffffe5
call fcn.00405009
pop edi
pop esi
leave
ret 8
Function at 0x4058f1
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x42b4f0
push esi
call fcn.00405d1d
push esi
call fcn.004058a4
mov edi, eax
test edi, edi
jne 0x405912
xor eax, eax
jmp 0x405964
push edi
call fcn.00405f7f
test byte [0x42ec98], 0x80
je 0x40592b
mov al, byte [edi]
test al, al
je 0x40590e
cmp al, 0x5c
je 0x40590e
sub edi, esi
jmp 0x405943
call fcn.00406018
test eax, eax
je 0x40593d
test byte [eax], 0x10
je 0x40590e
push esi
call fcn.00405857
push esi
call sub.KERNEL32.dll_lstrlenA
cmp eax, edi
push esi
jg 0x40592f
call fcn.00405810
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop edi
pop esi
ret 4

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

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4059f1
and al, 0xfe
push eax
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
ret 4

Function at 0x4059f4
Capabilities:
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
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_CreateFileA]
ret 0xc

Function at 0x405a23
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
push 0x64
pop edi
dec edi
mov dword [ebp + 8], 0x61736e
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 byte [ebp + 0xa], dl
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x405a67
test edi, edi
jne 0x405a2e
and byte [esi], 0
pop edi
pop esi
pop ebp
ret 8
mov eax, esi
jmp 0x405a61
Function at 0x405a6b
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebx
push ebp
push esi
push edi
push 2
call fcn.004060a9
test eax, eax
mov esi, dword [esp + 0x18]
je 0x405a8f
push 5
push esi
push dword [esp + 0x1c]
call eax
test eax, eax
jne 0x405bc8
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov dword [0x42c278], 0x4c554e
test esi, esi
mov edi, 0x400
mov ebp, 0x42c278
je 0x405ad3
push 1
push 0
push esi
call fcn.004059f4
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebp
push esi
call ebx
test eax, eax
je 0x405bce
cmp eax, edi
jg 0x405bce
mov esi, 0x42bcf0
push edi
push esi
push dword [esp + 0x1c]
call ebx
test eax, eax
je 0x405bce
cmp eax, edi
jg 0x405bce
push esi
push ebp
push str._s_s_r_n
push 0x42b8f0
call dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, eax
mov eax, dword [0x42ec90]
add esp, 0x10
push dword [eax + 0x128]
push esi
call fcn.00405d3f
push 4
push 0xc0000000
push esi
call fcn.004059f4
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x14], ebp
je 0x405bc8
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 0x405bc1
lea eax, [esp + 0x18]
push 0
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x405bc1
cmp edi, dword [esp + 0x18]
jne 0x405bc1
push str._Rename__r_n
push esi
call fcn.00405969
test eax, eax
jne 0x405bd5
lea eax, [esi + edi]
push str._Rename__r_n
push eax
call fcn.00405d1d
add edi, 0xa
mov eax, edi
push ebx
add eax, esi
push 0x42b8f0
push eax
call fcn.004059b5
xor eax, eax
push eax
push eax
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esp + 0x18]
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]
inc dword [0x42ed10]
pop edi
pop esi
pop ebp
pop ebx
ret 8
add eax, 0xa
push 0x409424
push eax
call fcn.00405969
test eax, eax
je 0x405b8c
inc eax
lea ecx, [esi + edi]
cmp eax, ecx
mov ebp, eax
jae 0x405bfc
mov dl, byte [ebp]
mov byte [ebx + ebp], dl
inc ebp
cmp ebp, ecx
jb 0x405bf1
mov ebp, dword [esp + 0x14]
sub eax, esi
jmp 0x405b8e
Function at 0x405c04
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
lea eax, [ebp + 0x18]
push esi
push eax
mov eax, dword [ebp + 0x18]
xor ebx, ebx
neg eax
sbb eax, eax
mov esi, dword [ebp + 0x14]
and eax, 0x100
or eax, 0x20019
mov byte [esi], bl
push eax
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405c75
lea eax, [ebp + 0xc]
mov dword [ebp + 0xc], 0x400
push eax
lea eax, [ebp + 0x14]
push esi
push eax
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405c64
cmp dword [ebp + 0x14], 1
je 0x405c66
cmp dword [ebp + 0x14], 2
je 0x405c66
mov byte [esi], bl
push dword [ebp + 0x18]
mov byte [esi + 0x3ff], bl
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
pop ebp
ret 0x14
Function at 0x40603f
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
push esi
mov esi, 0x104
lea eax, [ebp - 0x120]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
cmp eax, esi
pop esi
jbe 0x406063
xor eax, eax
test eax, eax
je 0x406075
cmp byte [ebp + eax - 0x121], 0x5c
je 0x406075
xor ecx, ecx
jmp 0x406078
xor ecx, ecx
inc ecx
push dword [ebp + 8]
lea ecx, [ecx + 0x409010]
lea eax, [ebp + eax - 0x120]
push ecx
push str._s_s.dll
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
leave
ret 4

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

Disassembly:
cmp dword [0x42c67c], 0
push esi
jne 0x40614f
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 0x406129
mov dword [ecx*4 + 0x42c678], eax
inc ecx
cmp ecx, 0x100
jl 0x406124
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x406180
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 + 0x42c678]
xor eax, esi
inc ecx
dec edx
jne 0x406162
pop edi
not eax
pop esi
ret 0xc