Function at 0x406600
Capabilities:
Encode data using xor
Get file size
Hash data using sha256
Inspect section memory permissions
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xdc
push ebx
push esi
mov ebx, ecx
push edi
mov dword [ebp - 8], ebx
call fcn.00406450
test al, al
je 0x406b86
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
lea eax, [eax*2 + 0x80]
push eax
push 8
push dword [0x42a8e0]
mov dword [ebp - 4], eax
call esi
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
mov ebx, eax
mov dword [ebp - 0x10], ebx
test ebx, ebx
jne 0x40666d
nop
push 0x80
call edi
push dword [ebp - 4]
push 8
push dword [0x42a8e0]
call esi
mov ebx, eax
mov dword [ebp - 0x10], eax
test ebx, ebx
je 0x406650
push dword [ebp - 8]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push str..Lattice
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push 9
push ebx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x4066af
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 8]
push str.Unable_To_Rename_File:__s____lu
call fcn.00404ca0
add esp, 0xc
jmp 0x406b6a
push 0
push 0x48000000
push 3
push 0
push 0
push 0xc0000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x14], eax
cmp eax, 0xffffffff
je 0x406b6a
lea ecx, [ebp - 0x20]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x406b60
mov ecx, dword [ebp - 0x20]
mov eax, ecx
mov edx, dword [ebp - 0x1c]
or eax, edx
mov dword [ebp - 4], ecx
je 0x406b60
test edx, edx
jl 0x406710
jg 0x406708
cmp ecx, 0x100000
jb 0x406710
mov ecx, 0x100000
mov dword [ebp - 4], ecx
lea eax, [ecx + 0x168]
push eax
push 8
push dword [0x42a8e0]
mov dword [ebp - 0x18], eax
call esi
mov ebx, eax
mov dword [ebp - 0xc], ebx
test ebx, ebx
jne 0x40674d
nop dword [eax]
push 0x80
call edi
push dword [ebp - 0x18]
push 8
push dword [0x42a8e0]
call esi
mov ebx, eax
mov dword [ebp - 0xc], eax
test ebx, ebx
je 0x406730
mov eax, dword [ebp - 4]
mov dword [ebx + 0x160], eax
mov eax, dword [ebp - 0x14]
mov dword [ebx + 0x9c], eax
mov eax, dword [0x4297ec]
cmp eax, 3
ja case.0x406769.0
jmp dword [eax*4 + 0x406b90]
mov eax, dword [0x429800]
shl eax, 0x14
cdq
mov dword [ebx + 0xb0], 3
mov dword [ebx + 0xa8], eax
mov dword [ebx + 0xac], edx
jmp 0x4067d7
push dword [ebp - 8]
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
cmp word [eax], 0
je case.0x406769.2
lea edi, [eax + 2]
xor esi, esi
nop word [eax + eax]
push dword [esi + 0x4245e8]
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x406a2e
add esi, 4
cmp esi, 0x68
jb 0x4067b0
mov dword [ebx + 0xb0], 2
mov edx, 0x20
lea ecx, [ebp - 0x64]
call fcn.00405db0
mov edx, 8
lea ecx, [ebx + 0xe8]
call fcn.00405db0
lea edi, [ebx + 0xc8]
push 0x425138
lea edx, [ebp - 0x64]
mov ecx, edi
call fcn.00404b00
add esp, 4
lea edx, [ebp - 0x64]
lea ecx, [ebp - 0x44]
push 0x42a888
call fcn.00404b00
add esp, 4
mov dword [ebp - 0xd0], 0x6a09e667
xorps xmm0, xmm0
mov dword [ebp - 0xcc], 0xbb67ae85
lea edx, [ebp - 0x44]
movlpd qword [ebp - 0xd8], xmm0
lea ecx, [ebp - 0xd8]
mov dword [ebp - 0xc8], 0x3c6ef372
push 0x20
mov dword [ebp - 0xc4], 0xa54ff53a
mov dword [ebp - 0xc0], 0x510e527f
mov dword [ebp - 0xbc], 0x9b05688c
mov dword [ebp - 0xb8], 0x1f83d9ab
mov dword [ebp - 0xb4], 0x5be0cd19
mov dword [ebp - 0xb0], 0
call fcn.00407e20
add esp, 4
lea edx, [ebp - 0x44]
lea ecx, [ebp - 0xd8]
call fcn.00407ea0
push 0x70
lea eax, [ebp - 0xd8]
push 0
push eax
call fcn.00409030
add esp, 0xc
lea eax, [ebx + 0x18]
lea edx, [ebx + 0xe8]
lea ecx, [ebp - 0x44]
push eax
call fcn.004012d0
mov eax, dword [ebx + 0xb0]
lea esi, [ebp - 0x44]
mov ecx, dword [ebx + 0xac]
add esp, 4
mov dword [ebx + 0xb8], eax
or edx, 0xffffffff
mov eax, dword [ebx + 0xa8]
mov dword [ebx + 0xc0], eax
mov dword [ebx + 0xc4], ecx
mov ebx, 0x20
nop dword [eax]
movzx eax, byte [esi]
lea esi, [esi + 1]
mov ecx, edx
shl edx, 8
shr ecx, 0x18
xor ecx, eax
xor edx, dword [ecx*4 + 0x422d60]
sub ebx, 1
jne 0x406900
mov ebx, dword [ebp - 0xc]
or esi, 0xffffffff
mov dword [ebx + 0xf0], edx
mov edx, 0x20
nop dword [eax]
movzx eax, byte [edi]
lea edi, [edi + 1]
mov ecx, esi
shl esi, 8
shr ecx, 0x18
xor ecx, eax
xor esi, dword [ecx*4 + 0x422d60]
sub edx, 1
jne 0x406930
mov dword [ebx + 0xf4], esi
lea edi, [ebx + 0xf8]
mov ecx, 0x19
lea edx, [ebx + 0xb8]
mov esi, 0x42a868
rep movsd dword es:[edi], dword [esi]
push 0x10
push edx
lea ecx, [ebx + 0x18]
call fcn.00401710
add esp, 8
lea eax, [ebp - 0x64]
mov ecx, 0x20
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x406980
mov ecx, 0x20
lea eax, [ebp - 0x44]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x406993
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 4], eax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 8], 0x42a8d8
mov esi, dword [0x42a8d8]
mov ebx, esi
mov edi, dword [0x42a8dc]
add ebx, eax
mov ecx, edi
mov dword [ebp - 0x24], edi
adc ecx, dword [ebp - 0x18]
mov edx, edi
mov edi, dword [ebp - 8]
mov eax, esi
lock cmpxchg8b qword [edi]
mov edi, dword [ebp - 0x24]
cmp eax, esi
mov eax, dword [ebp - 4]
jne 0x4069b1
cmp edx, edi
jne 0x4069b1
mov ebx, dword [ebp - 0x14]
push 0
push 0
push dword [0x42a8cc]
push ebx
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov esi, dword [ebp - 0xc]
test eax, eax
je 0x406b30
push esi
push 0
push 0
push dword [0x42a8cc]
call dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
je 0x406b30
lock inc dword [0x42a8d0]
mov ebx, dword [ebp - 0x10]
mov esi, 1
jmp 0x406b6c
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
test ecx, ecx
jg 0x406a80
jl case.0x406769.1
cmp eax, 0x1000000
ja 0x406a50
mov dword [ebx + 0xb0], 1
jmp 0x4067d7
test ecx, ecx
jg 0x406a80
jl 0x406a5d
cmp eax, 0x20000000
ja 0x406a80
mov dword [ebx + 0xb0], 3
mov dword [ebx + 0xa8], 0x40000
mov dword [ebx + 0xac], 0
jmp 0x4067d7
cmp ecx, 2
jg 0x406aae
jl 0x406a8b
test eax, eax
jne 0x406aae
mov dword [ebx + 0xb0], 3
mov dword [ebx + 0xa8], 0x400000
mov dword [ebx + 0xac], 0
jmp 0x4067d7
cmp ecx, 0x20
jg 0x406adc
jl 0x406ab9
test eax, eax
jne 0x406adc
mov dword [ebx + 0xb0], 3
mov dword [ebx + 0xa8], 0x4000000
mov dword [ebx + 0xac], 0
jmp 0x4067d7
cmp ecx, 0x200
jg 0x406b0d
jl 0x406aea
test eax, eax
jne 0x406b0d
mov dword [ebx + 0xb0], 3
mov dword [ebx + 0xa8], 0x40000000
mov dword [ebx + 0xac], 0
jmp 0x4067d7
mov dword [ebx + 0xb0], 3
mov dword [ebx + 0xa8], 0
mov dword [ebx + 0xac], 4
jmp 0x4067d7
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
push 0
push dword [0x42a8e0]
call edi
mov ebx, dword [ebp - 0x10]
xor esi, esi
push ebx
push esi
push dword [0x42a8e0]
call edi
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push ebx
push 0
push dword [0x42a8e0]
call edi
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret