Function at 0x406240
Capabilities:
Encode data using xor
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42bcf5
mov eax, dword fs:[0]
push eax
sub esp, 0x20c
mov eax, dword [0x44c00c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
mov ebx, 7
mov dword [ebp - 0x78], 0
xor eax, eax
mov dword [ebp - 0x74], ebx
mov word [ebp - 0x88], ax
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x40]
push 0xffffffffffffffff
push eax
mov dword [ebp - 0x30], eax
mov word [ebp - 0x40], ax
lea eax, [ebp + 8]
push eax
mov dword [ebp - 0x2c], ebx
call fcn.0040c660
xor eax, eax
mov byte [ebp - 4], 3
push 0xffffffffffffffff
push eax
mov word [ebp - 0x70], ax
lea ecx, [ebp - 0x70]
lea eax, [ebp + 8]
mov dword [ebp - 0x5c], ebx
push eax
mov dword [ebp - 0x60], 0
call fcn.0040c660
xor eax, eax
mov byte [ebp - 4], 4
push eax
push 0x435208
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.0040c5a0
sub esp, 0xc
mov byte [ebp - 4], 5
lea eax, [ebp + 8]
lea ecx, [ebp - 0x168]
push eax
call fcn.00409b60
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x168]
mov eax, dword [eax + 4]
cmp dword [ebp + eax - 0x15c], 0
je 0x406343
mov edx, str._
mov ecx, 0x44d7b0
call fcn.0040ea80
lea edx, [ebp + 8]
mov ecx, eax
call fcn.0040ee00
push eax
call fcn.0040f320
add esp, 4
jmp 0x406b85
push ecx
push 0
push 0
lea ecx, [ebp - 0x168]
call fcn.0040a8c0
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x168]
call fcn.0040a7e0
sub esp, 0x18
lea ecx, [ebp - 0x168]
xorps xmm0, xmm0
mov ebx, dword [eax + 8]
add ebx, dword [eax]
mov eax, esp
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
movq qword [eax + 0x10], xmm0
call fcn.0040a9c0
lea eax, [ebx - 8]
cmp eax, 0x17d7837
ja 0x406aee
cmp dword [ebp - 0x2c], 8
lea ecx, [ebp - 0x40]
mov eax, dword [ebp - 0x30]
cmovae ecx, dword [ebp - 0x40]
add eax, 0xfffffffc
lea eax, [ecx + eax*2]
mov ecx, str..R5A
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4063e7
test dx, dx
je 0x4063e3
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4063e7
add eax, 4
add ecx, 4
test dx, dx
jne 0x4063c1
xor eax, eax
jmp 0x4063ec
sbb eax, eax
or eax, 1
test eax, eax
jne 0x406b82
mov edi, dword [ebp - 0x8c]
xor esi, esi
nop dword [eax]
sub esp, 0x18
mov eax, ebx
mov ecx, esp
cdq
xorps xmm0, xmm0
mov dword [ecx], eax
mov dword [ecx + 4], edx
mov dword [ecx + 8], 0
mov dword [ecx + 0xc], 0
movq qword [ecx + 0x10], xmm0
lea ecx, [ebp - 0x168]
call fcn.0040a9c0
lea ecx, [ebp - 0x168]
call fcn.0040aad0
movzx ecx, ax
mov eax, 0xffff
cmp ax, cx
sete al
test al, al
jne 0x40644d
mov edi, ecx
mov eax, dword [ebp - 0x168]
lea ecx, [ebp - 0x168]
mov edx, 4
push 0
mov eax, dword [eax + 4]
add ecx, eax
xor eax, eax
cmp dword [ecx + 0x38], eax
cmove eax, edx
push eax
call fcn.00402970
lea eax, [esi + 1]
xor esi, esi
cmp di, 0x2a
cmove esi, eax
cmp esi, 2
je 0x40648a
dec ebx
jmp 0x406400
mov edi, 7
mov dword [ebp - 0x90], ebx
xor esi, esi
mov dword [ebp - 0x44], edi
xor eax, eax
mov dword [ebp - 0x48], esi
mov word [ebp - 0x58], ax
sub esp, 0x18
mov byte [ebp - 4], 7
mov ecx, esp
lea eax, [ebx + 2]
cdq
xorps xmm0, xmm0
mov dword [ecx], eax
mov dword [ecx + 4], edx
mov dword [ecx + 8], esi
mov dword [ecx + 0xc], esi
movq qword [ecx + 0x10], xmm0
lea ecx, [ebp - 0x168]
call fcn.0040a9c0
mov eax, dword [ebp - 0x168]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x15c], 1
jne 0x406534
mov esi, dword [ebp - 0x8c]
mov ebx, 0xffff
nop dword [eax]
lea ecx, [ebp - 0x168]
call fcn.0040aad0
movzx ecx, ax
cmp bx, cx
sete al
test al, al
jne 0x40650a
mov esi, ecx
push esi
push 1
lea ecx, [ebp - 0x58]
call fcn.0040c740
mov eax, dword [ebp - 0x168]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x15c], 1
je 0x4064f0
mov edi, dword [ebp - 0x44]
mov esi, dword [ebp - 0x48]
mov ebx, dword [ebp - 0x90]
lea ecx, [esi - 2]
cmp esi, ecx
jae 0x406545
push str.invalid_string_position
call fcn.00411a95
cmp edi, 8
mov dword [ebp - 0x48], ecx
lea eax, [ebp - 0x58]
cmovae eax, dword [ebp - 0x58]
xor edx, edx
mov dword [ebp - 0x94], edx
mov word [eax + ecx*2], dx
cmp dword [ebp - 0x48], edx
jbe 0x4065af
cmp dword [ebp - 0x44], 8
lea ebx, [ebp - 0x58]
lea edi, [ebp + 0x20]
mov eax, edx
cmovae ebx, dword [ebp - 0x58]
lea esi, [ebp - 0x58]
cmp dword [ebp + 0x34], 8
cmovae edi, dword [ebp + 0x20]
cmp dword [ebp - 0x44], 8
cmovae esi, dword [ebp - 0x58]
xor edx, edx
div dword [ebp + 0x30]
mov ax, word [edi + edx*2]
mov edx, dword [ebp - 0x94]
xor ax, word [ebx + edx*2]
mov word [esi + edx*2], ax
inc edx
mov dword [ebp - 0x94], edx
cmp edx, dword [ebp - 0x48]
jb 0x406563
mov ebx, dword [ebp - 0x90]
mov edi, dword [ebp - 0x30]
lea ecx, [edi - 1]
test ecx, ecx
jle 0x4065f8
mov edx, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x40]
nop
cmp edx, 8
lea eax, [ebp - 0x40]
cmovae eax, esi
cmp word [eax + ecx*2], 0x5c
je 0x4065d7
dec ecx
test ecx, ecx
jg 0x4065c0
jmp 0x4065f8
inc ecx
cmp edi, ecx
jae 0x4065e6
push str.invalid_string_position
call fcn.00411a95
cmp edx, 8
mov dword [ebp - 0x30], ecx
lea eax, [ebp - 0x40]
cmovae eax, esi
xor edx, edx
mov word [eax + ecx*2], dx
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x40]
call fcn.0040db40
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x44]
cmp eax, 8
jb 0x406621
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.0040d8b0
xor edi, edi
cmp dword [ebp + 0x30], edi
jbe 0x40666c
nop dword [eax + eax]
cmp dword [ebp + 0x34], 8
lea esi, [ebp + 0x20]
lea ecx, [ebp - 0x40]
mov eax, edi
cmovae esi, dword [ebp + 0x20]
cmp dword [ebp - 0x2c], 8
cmovae ecx, dword [ebp - 0x40]
xor edx, edx
div dword [ebp - 0x30]
mov ax, word [ecx + edx*2]
lea ecx, [ebp - 0x88]
xor ax, word [esi + edi*2]
movzx eax, ax
push eax
push 1
call fcn.0040c740
inc edi
cmp edi, dword [ebp + 0x30]
jb 0x406630
mov eax, dword [ebp - 0x168]
lea ecx, [ebp - 0x168]
mov edx, 4
push 0
mov eax, dword [eax + 4]
add ecx, eax
xor eax, eax
cmp dword [ecx + 0x38], eax
cmove eax, edx
push eax
call fcn.00402970
sub esp, 0x18
lea ecx, [ebp - 0x168]
mov eax, esp
xorps xmm0, xmm0
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
movq qword [eax + 0x10], xmm0
call fcn.0040a9c0
lea ecx, [ebp - 0x168]
call fcn.0040aad0
cmp ax, 0x4d
je 0x4066f0
mov edx, str.file_not_crypted
mov ecx, 0x44d860
call fcn.0040f670
push eax
call fcn.0040f920
jmp 0x406aeb
sub esp, 0x18
lea ecx, [ebp - 0x168]
mov eax, esp
xorps xmm0, xmm0
mov dword [eax], 1
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
movq qword [eax + 0x10], xmm0
call fcn.0040a9c0
mov eax, dword [ebp - 0x168]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x15c], 1
jne 0x40677f
mov esi, dword [ebp - 0x8c]
mov ebx, 0xffff
lea ecx, [ebp - 0x168]
call fcn.0040aad0
movzx ecx, ax
cmp bx, cx
sete al
test al, al
jne 0x40675b
mov esi, ecx
push esi
push 1
lea ecx, [ebp - 0x28]
call fcn.0040c740
mov eax, dword [ebp - 0x168]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x15c], 1
je 0x406741
mov ebx, dword [ebp - 0x90]
dec ebx
cmp dword [ebp - 0x18], ebx
jae 0x40678f
push str.invalid_string_position
call fcn.00411a95
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
mov dword [ebp - 0x18], ebx
cmovae eax, dword [ebp - 0x28]
xor ecx, ecx
mov word [eax + ebx*2], cx
mov esi, dword [ebp - 0x18]
mov ecx, esi
shr ecx, 1
mov eax, ecx
and eax, 0x80000001
jns 0x4067b8
dec eax
or eax, 0xfffffffe
inc eax
sub ecx, eax
mov eax, esi
cdq
idiv ecx
mov eax, esi
mov dword [ebp - 0xb0], ecx
sub eax, edx
cdq
idiv ecx
mov edi, eax
mov dword [ebp - 0x94], edi
test edi, edi
jle 0x40693b
mov eax, ecx
mov dword [ebp - 0x8c], 0xff
cdq
lea ebx, [ecx + ecx]
sub eax, edx
mov dword [ebp - 0x9c], ebx
mov edx, eax
xor esi, esi
sar edx, 1
xor eax, eax
mov dword [ebp - 0xac], edx
mov dword [ebp - 0x90], esi
mov dword [ebp - 0xa0], eax
lea ebx, [edx + edx]
mov dword [ebp - 0xa4], ebx
cmp edx, ecx
jge 0x40689a
lea eax, [esi + edx]
sub ecx, edx
mov dword [ebp - 0xa8], eax
lea ebx, [eax + eax]
mov dword [ebp - 0x98], ecx
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x28]
cdq
lea ebx, [ebx + 2]
cmovae ecx, dword [ebp - 0x28]
idiv dword [ebp - 0x8c]
lea eax, [ebp - 0x28]
xor dx, word [ebx + ecx - 2]
cmp dword [ebp - 0x14], 8
movzx ecx, dx
cmovae eax, dword [ebp - 0x28]
mov word [ebx + eax - 2], cx
mov eax, dword [ebp - 0xa8]
inc eax
sub dword [ebp - 0x98], 1
mov dword [ebp - 0xa8], eax
jne 0x406833
mov edx, dword [ebp - 0xac]
mov ecx, dword [ebp - 0xb0]
mov eax, dword [ebp - 0xa0]
mov ebx, dword [ebp - 0xa4]
mov esi, dword [ebp - 0x90]
mov edi, dword [ebp - 0x94]
test edx, edx
jle 0x406909
mov edi, eax
mov dword [ebp - 0x98], edx
mov esi, dword [ebp - 0x14]
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 0x28]
lea ecx, [ebp - 0x28]
cmp esi, 8
lea ebx, [ebx + 2]
lea edi, [edi + 2]
cmovae eax, edx
cmovae ecx, edx
mov ax, word [ebx + eax - 2]
xor ax, word [edi + ecx - 2]
cmp esi, 8
movzx ecx, ax
lea eax, [ebp - 0x28]
cmovae eax, edx
sub dword [ebp - 0x98], 1
mov word [edi + eax - 2], cx
jne 0x4068a6
mov edx, dword [ebp - 0xac]
mov ecx, dword [ebp - 0xb0]
mov eax, dword [ebp - 0xa0]
mov ebx, dword [ebp - 0xa4]
mov esi, dword [ebp - 0x90]
mov edi, dword [ebp - 0x94]
add eax, dword [ebp - 0x9c]
add esi, ecx
add ebx, dword [ebp - 0x9c]
sub edi, 1
mov dword [ebp - 0x90], esi
mov dword [ebp - 0xa0], eax
mov dword [ebp - 0xa4], ebx
mov dword [ebp - 0x94], edi
jne 0x406817
mov esi, dword [ebp - 0x18]
xor edx, edx
mov dword [ebp - 0x9c], edx
test esi, esi
je 0x40699e
nop word [eax + eax]
cmp dword [ebp - 0x14], 8
lea ebx, [ebp - 0x28]
lea edi, [ebp - 0x88]
mov eax, edx
cmovae ebx, dword [ebp - 0x28]
lea esi, [ebp - 0x28]
cmp dword [ebp - 0x74], 8
cmovae edi, dword [ebp - 0x88]
cmp dword [ebp - 0x14], 8
cmovae esi, dword [ebp - 0x28]
xor edx, edx
div dword [ebp - 0x78]
mov ax, word [edi + edx*2]
mov edx, dword [ebp - 0x9c]
xor ax, word [ebx + edx*2]
mov word [esi + edx*2], ax
inc edx
mov esi, dword [ebp - 0x18]
mov dword [ebp - 0x9c], edx
cmp edx, esi
jb 0x406950
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
lea esi, [esi - 1]
cmovae eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x28]
push 1
lea esi, [eax + esi*2]
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
sub esi, eax
sar esi, 1
push esi
call fcn.0040c4f0
sub esp, 0xc
lea eax, [ebp + 8]
lea ecx, [ebp - 0x218]
push eax
call fcn.00409780
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0x218]
mov eax, dword [eax + 4]
cmp dword [ebp + eax - 0x20c], 0
jne 0x406a74
lea edx, [ebp - 0x28]
lea ecx, [ebp - 0x218]
call fcn.0040ee00
cmp dword [ebp - 0x1c8], 0
lea esi, [ebp - 0x214]
jne 0x406a13
xor esi, esi
jmp 0x406a3a
lea ecx, [ebp - 0x214]
call fcn.0040ce30
push dword [ebp - 0x1c8]
xor ecx, ecx
test al, al
cmove esi, ecx
call fcn.0041a10e
xor ecx, ecx
add esp, 4
test eax, eax
cmovne esi, ecx
push 2
push 0
lea ecx, [ebp - 0x214]
call fcn.0040cfa0
test esi, esi
jne 0x406a74
mov eax, dword [ebp - 0x218]
lea ecx, [ebp - 0x218]
mov eax, dword [eax + 4]
add ecx, eax
mov eax, dword [ecx + 0xc]
or eax, 2
cmp dword [ecx + 0x38], esi
jne 0x406a6c
or eax, 4
push 0
push eax
call fcn.00402970
mov eax, dword [ebp - 0x218]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_ofstream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0x218]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x21c], eax
lea ecx, [ebp - 0x214]
call fcn.0040a5e0
mov eax, dword [ebp - 0x218]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0x218]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ebp + ecx - 0x21c], eax
lea eax, [ebp - 0x1b0]
mov byte [ebp - 4], 0xb
push eax
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.00411d62
mov byte [ebp - 4], 6
add esp, 4
cmp dword [ebp - 0x10c], 0
lea esi, [ebp - 0x158]
jne 0x406b01
xor esi, esi
jmp 0x406b28
lea ecx, [ebp - 0x158]
call fcn.0040ce30
push dword [ebp - 0x10c]
xor ecx, ecx
test al, al
cmove esi, ecx
call fcn.0041a10e
xor ecx, ecx
add esp, 4
test eax, eax
cmovne esi, ecx
push 2
push 0
lea ecx, [ebp - 0x158]
call fcn.0040cfa0
test esi, esi
jne 0x406b62
mov eax, dword [ebp - 0x168]
lea ecx, [ebp - 0x168]
mov eax, dword [eax + 4]
add ecx, eax
mov eax, dword [ecx + 0xc]
or eax, 2
cmp dword [ecx + 0x38], esi
jne 0x406b5a
or eax, 4
push 0
push eax
call fcn.00402970
cmp dword [ebp - 0x2c], 8
lea ecx, [ebp - 0x40]
lea eax, [ebp - 0x70]
cmovae ecx, dword [ebp - 0x40]
cmp dword [ebp - 0x5c], 8
push ecx
cmovae eax, dword [ebp - 0x70]
push eax
call fcn.00418514
add esp, 8
mov ebx, dword [ebp - 0x74]
push 0x96
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x168]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ifstream_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_ifstream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0x168]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [ebp + ecx - 0x16c], eax
lea ecx, [ebp - 0x158]
call fcn.0040a5e0
mov eax, dword [ebp - 0x168]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_istream_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_istream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0x168]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x18]
mov dword [ebp + ecx - 0x16c], eax
lea eax, [ebp - 0xf8]
mov byte [ebp - 4], 0xe
push eax
mov dword [ebp - 0xf8], vtable.std::ios_base.0
call fcn.00411d62
mov eax, dword [ebp - 0x14]
add esp, 4
cmp eax, 8
jb 0x406c1b
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.0040d8b0
xor eax, eax
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x18], 0
cmp eax, 8
jb 0x406c44
inc eax
lea ecx, [ebp - 0x70]
push eax
push dword [ebp - 0x70]
call fcn.0040d8b0
xor eax, eax
mov dword [ebp - 0x5c], 7
mov word [ebp - 0x70], ax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x60], 0
cmp eax, 8
jb 0x406c6d
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.0040d8b0
xor eax, eax
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
cmp ebx, 8
jb 0x406c9b
lea eax, [ebx + 1]
push eax
push dword [ebp - 0x88]
lea ecx, [ebp - 0x88]
call fcn.0040d8b0
mov eax, dword [ebp + 0x1c]
cmp eax, 8
jb 0x406cb0
inc eax
lea ecx, [ebp + 8]
push eax
push dword [ebp + 8]
call fcn.0040d8b0
xor eax, eax
mov dword [ebp + 0x1c], 7
mov word [ebp + 8], ax
mov eax, dword [ebp + 0x34]
mov dword [ebp + 0x18], 0
cmp eax, 8
jb 0x406cd9
inc eax
lea ecx, [ebp + 0x20]
push eax
push dword [ebp + 0x20]
call fcn.0040d8b0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041020c
mov esp, ebp
pop ebp
ret