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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42bc51
mov eax, dword fs:[0]
push eax
sub esp, 0x2dc
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 - 0x17c], ecx
xor eax, eax
mov dword [ebp - 4], 1
push eax
push 0x435208
lea ecx, [ebp - 0x120]
mov dword [ebp - 0x10c], 7
mov dword [ebp - 0x110], 0
mov word [ebp - 0x120], ax
call fcn.0040c5a0
xor eax, eax
mov byte [ebp - 4], 2
push 0xffffffffffffffff
push eax
mov word [ebp - 0xf0], ax
lea ecx, [ebp - 0xf0]
lea eax, [ebp + 8]
mov dword [ebp - 0xdc], 7
push eax
mov dword [ebp - 0xe0], 0
call fcn.0040c660
xor eax, eax
mov byte [ebp - 4], 3
push 0xffffffffffffffff
push eax
mov word [ebp - 0x138], ax
lea ecx, [ebp - 0x138]
lea eax, [ebp + 8]
mov dword [ebp - 0x124], 7
push eax
mov dword [ebp - 0x128], 0
call fcn.0040c660
xor eax, eax
mov dword [ebp - 0xf4], 7
mov dword [ebp - 0xf8], 0
mov word [ebp - 0x108], ax
xor edi, edi
mov byte [ebp - 4], 5
cmp dword [ebp + 0x30], edi
jbe 0x4059b8
nop word [eax + eax]
cmp dword [ebp + 0x34], 8
lea esi, [ebp + 0x20]
lea ecx, [ebp - 0xf0]
mov eax, edi
cmovae esi, dword [ebp + 0x20]
cmp dword [ebp - 0xdc], 8
cmovae ecx, dword [ebp - 0xf0]
xor edx, edx
div dword [ebp - 0xe0]
mov ax, word [ecx + edx*2]
lea ecx, [ebp - 0x120]
xor ax, word [esi + edi*2]
movzx eax, ax
push eax
push 1
call fcn.0040c740
inc edi
cmp edi, dword [ebp + 0x30]
jb 0x405970
sub esp, 0xc
lea eax, [ebp + 8]
lea ecx, [ebp - 0x238]
push eax
call fcn.00409b60
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x238]
mov eax, dword [ecx + 4]
cmp dword [ebp + eax - 0x22c], 0
jne 0x406088
push ecx
push 0
push 0
lea ecx, [ebp - 0x238]
call fcn.0040a8c0
lea eax, [ebp - 0x150]
push eax
lea ecx, [ebp - 0x238]
call fcn.0040a7e0
sub esp, 0x18
xorps xmm0, xmm0
mov ecx, esp
mov esi, dword [eax + 8]
add esi, dword [eax]
mov dword [ecx], 0
mov dword [ecx + 4], 0
mov dword [ecx + 8], 0
mov dword [ecx + 0xc], 0
movq qword [ecx + 0x10], xmm0
lea ecx, [ebp - 0x238]
call fcn.0040a9c0
lea ecx, [ebp - 0x238]
call fcn.0040aad0
cmp ax, 0x4d
je 0x405fdc
mov eax, esi
lea ecx, [ebp - 0x238]
cdq
xorps xmm0, xmm0
add dword [0x44e6c0], eax
adc dword [0x44e6c4], edx
sub esp, 0x18
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
mov eax, dword [ebp - 0x238]
xor esi, esi
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x22c], 1
jne 0x405b20
mov edi, 0xffff
lea ecx, [ebp - 0x238]
call fcn.0040aad0
movzx ecx, ax
cmp di, cx
sete al
test al, al
jne 0x405ad0
mov eax, ecx
mov dword [ebp - 0x154], eax
cmp dword [ebp - 0x10c], 8
lea ecx, [ebp - 0x120]
mov eax, esi
cmovae ecx, dword [ebp - 0x120]
xor edx, edx
div dword [ebp - 0x110]
mov ax, word [ecx + edx*2]
lea ecx, [ebp - 0x108]
xor word [ebp - 0x154], ax
push dword [ebp - 0x154]
push 1
call fcn.0040c740
mov eax, dword [ebp - 0x238]
inc esi
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x22c], 1
je 0x405ab0
mov esi, dword [ebp - 0xf8]
mov edi, esi
shr edi, 1
mov ecx, edi
and ecx, 0x80000001
jns 0x405b39
dec ecx
or ecx, 0xfffffffe
inc ecx
mov eax, esi
sub edi, ecx
cdq
idiv edi
mov dword [ebp - 0x178], edi
sub esi, edx
mov eax, esi
cdq
idiv edi
mov esi, eax
mov dword [ebp - 0x16c], esi
test esi, esi
jle 0x405ce8
mov eax, edi
mov dword [ebp - 0x160], 0xff
cdq
lea ecx, [edi + edi]
sub eax, edx
mov dword [ebp - 0x15c], ecx
mov edx, eax
xor ebx, ebx
sar edx, 1
xor eax, eax
mov dword [ebp - 0x174], edx
mov dword [ebp - 0x154], ebx
mov dword [ebp - 0x164], eax
lea ecx, [edx + edx]
mov dword [ebp - 0x168], ecx
test edx, edx
jle 0x405c22
mov edi, eax
mov dword [ebp - 0x158], edx
mov ebx, ecx
nop word [eax + eax]
mov esi, dword [ebp - 0xf4]
lea eax, [ebp - 0x108]
mov edx, dword [ebp - 0x108]
lea ecx, [ebp - 0x108]
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 - 0x108]
cmovae eax, edx
sub dword [ebp - 0x158], 1
mov word [edi + eax - 2], cx
jne 0x405bb0
mov edx, dword [ebp - 0x174]
mov edi, dword [ebp - 0x178]
mov eax, dword [ebp - 0x164]
mov ecx, dword [ebp - 0x168]
mov ebx, dword [ebp - 0x154]
mov esi, dword [ebp - 0x16c]
cmp edx, edi
jge 0x405cb9
mov ecx, edi
lea eax, [ebx + edx]
sub ecx, edx
mov dword [ebp - 0x158], eax
lea ebx, [eax + eax]
mov dword [ebp - 0x170], ecx
cmp dword [ebp - 0xf4], 8
lea ecx, [ebp - 0x108]
cdq
lea ebx, [ebx + 2]
cmovae ecx, dword [ebp - 0x108]
idiv dword [ebp - 0x160]
lea eax, [ebp - 0x108]
xor dx, word [ebx + ecx - 2]
cmp dword [ebp - 0xf4], 8
movzx ecx, dx
cmovae eax, dword [ebp - 0x108]
mov word [ebx + eax - 2], cx
mov eax, dword [ebp - 0x158]
inc eax
sub dword [ebp - 0x170], 1
mov dword [ebp - 0x158], eax
jne 0x405c40
mov edx, dword [ebp - 0x174]
mov edi, dword [ebp - 0x178]
mov eax, dword [ebp - 0x164]
mov ecx, dword [ebp - 0x168]
mov ebx, dword [ebp - 0x154]
mov esi, dword [ebp - 0x16c]
add eax, dword [ebp - 0x15c]
add ebx, edi
add ecx, dword [ebp - 0x15c]
sub esi, 1
mov dword [ebp - 0x154], ebx
mov dword [ebp - 0x164], eax
mov dword [ebp - 0x168], ecx
mov dword [ebp - 0x16c], esi
jne 0x405b98
xor eax, eax
mov dword [ebp - 0x13c], 7
mov dword [ebp - 0x140], 0
mov word [ebp - 0x150], ax
mov byte [ebp - 4], 7
mov esi, dword [ebp - 0xe0]
lea ecx, [esi - 1]
test ecx, ecx
jle 0x405e64
mov edx, dword [ebp - 0xdc]
mov edi, dword [ebp - 0xf0]
nop word [eax + eax]
cmp edx, 8
lea eax, [ebp - 0xf0]
cmovae eax, edi
cmp word [eax + ecx*2], 0x5c
je 0x405d4d
dec ecx
test ecx, ecx
jg 0x405d30
jmp 0x405e64
inc ecx
xor eax, eax
mov ebx, ecx
mov dword [ebp - 0x160], ecx
mov dword [ebp - 0x15c], eax
cmp ebx, esi
jae 0x405dc1
cmp edx, 8
lea esi, [ebp - 0xf0]
lea ecx, [ebp + 0x20]
cmovae esi, edi
cmp dword [ebp + 0x34], 8
cmovae ecx, dword [ebp + 0x20]
xor edx, edx
div dword [ebp + 0x30]
mov ax, word [ecx + edx*2]
lea ecx, [ebp - 0x150]
xor ax, word [esi + ebx*2]
movzx eax, ax
push eax
push 1
call fcn.0040c740
mov eax, dword [ebp - 0x15c]
inc ebx
mov esi, dword [ebp - 0xe0]
inc eax
mov edx, dword [ebp - 0xdc]
mov edi, dword [ebp - 0xf0]
mov dword [ebp - 0x15c], eax
cmp ebx, esi
jb 0x405d62
mov ecx, dword [ebp - 0x160]
cmp esi, ecx
jae 0x405dcf
push str.invalid_string_position
call fcn.00411a95
cmp edx, 8
mov dword [ebp - 0xe0], ecx
lea eax, [ebp - 0xf0]
cmovae eax, edi
xor edx, edx
push 0xc8
push edx
mov word [eax + ecx*2], dx
lea eax, [ebp - 0xd8]
push eax
call fcn.004148f0
add esp, 0xc
lea eax, [ebp - 0xd8]
push 0xa
push eax
push dword [ebp - 0x17c]
call fcn.004184a8
add esp, 0xc
cmp word [ebp - 0xd8], 0
jne 0x405e21
xor ecx, ecx
jmp 0x405e3f
lea ecx, [ebp - 0xd8]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x405e30
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0xd8]
push eax
lea ecx, [ebp - 0xf0]
call fcn.0040da60
push 4
push str..R5A
lea ecx, [ebp - 0xf0]
call fcn.0040da60
sub esp, 0xc
lea eax, [ebp + 8]
lea ecx, [ebp - 0x2e8]
push eax
call fcn.00409780
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0x2e8]
mov eax, dword [eax + 4]
cmp dword [ebp + eax - 0x2dc], 0
jne 0x405f44
mov edx, 0x435f4c
lea ecx, [ebp - 0x2e8]
call fcn.0040e7c0
lea edx, [ebp - 0x108]
mov ecx, eax
call fcn.0040ee00
mov edx, 0x435f44
mov ecx, eax
call fcn.0040e7c0
lea edx, [ebp - 0x150]
mov ecx, eax
call fcn.0040ee00
push eax
call fcn.0040f320
add esp, 4
lea esi, [ebp - 0x2e4]
cmp dword [ebp - 0x298], 0
jne 0x405ee3
xor esi, esi
jmp 0x405f0a
lea ecx, [ebp - 0x2e4]
call fcn.0040ce30
push dword [ebp - 0x298]
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 - 0x2e4]
call fcn.0040cfa0
test esi, esi
jne 0x405f44
mov eax, dword [ebp - 0x2e8]
lea ecx, [ebp - 0x2e8]
mov eax, dword [eax + 4]
add ecx, eax
mov eax, dword [ecx + 0xc]
or eax, 2
cmp dword [ecx + 0x38], esi
jne 0x405f3c
or eax, 4
push 0
push eax
call fcn.00402970
mov eax, dword [ebp - 0x2e8]
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 - 0x2e8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x2ec], eax
lea ecx, [ebp - 0x2e4]
call fcn.0040a5e0
mov eax, dword [ebp - 0x2e8]
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 - 0x2e8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ebp + ecx - 0x2ec], eax
lea eax, [ebp - 0x280]
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
mov eax, dword [ebp - 0x13c]
cmp eax, 8
jb 0x405fdc
inc eax
lea ecx, [ebp - 0x150]
push eax
push dword [ebp - 0x150]
call fcn.0040d8b0
cmp dword [ebp - 0x1dc], 0
lea esi, [ebp - 0x228]
jne 0x405fef
xor esi, esi
jmp 0x406016
lea ecx, [ebp - 0x228]
call fcn.0040ce30
push dword [ebp - 0x1dc]
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 - 0x228]
call fcn.0040cfa0
test esi, esi
jne 0x406050
mov eax, dword [ebp - 0x238]
lea ecx, [ebp - 0x238]
mov eax, dword [eax + 4]
add ecx, eax
mov eax, dword [ecx + 0xc]
or eax, 2
cmp dword [ecx + 0x38], esi
jne 0x406048
or eax, 4
push 0
push eax
call fcn.00402970
cmp dword [ebp - 0xdc], 8
lea ecx, [ebp - 0xf0]
lea eax, [ebp - 0x138]
cmovae ecx, dword [ebp - 0xf0]
cmp dword [ebp - 0x124], 8
push ecx
cmovae eax, dword [ebp - 0x138]
push eax
call fcn.00418514
mov ecx, dword [ebp - 0x238]
add esp, 8
mov eax, dword [ecx + 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 - 0x238]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [ebp + ecx - 0x23c], eax
lea ecx, [ebp - 0x228]
call fcn.0040a5e0
mov eax, dword [ebp - 0x238]
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 - 0x238]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x18]
mov dword [ebp + ecx - 0x23c], eax
lea eax, [ebp - 0x1c8]
mov byte [ebp - 4], 0xe
push eax
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.00411d62
mov eax, dword [ebp - 0xf4]
add esp, 4
cmp eax, 8
jb 0x406116
inc eax
lea ecx, [ebp - 0x108]
push eax
push dword [ebp - 0x108]
call fcn.0040d8b0
xor eax, eax
mov dword [ebp - 0xf4], 7
mov word [ebp - 0x108], ax
mov eax, dword [ebp - 0x124]
mov dword [ebp - 0xf8], 0
cmp eax, 8
jb 0x406151
inc eax
lea ecx, [ebp - 0x138]
push eax
push dword [ebp - 0x138]
call fcn.0040d8b0
xor eax, eax
mov dword [ebp - 0x124], 7
mov word [ebp - 0x138], ax
mov eax, dword [ebp - 0xdc]
mov dword [ebp - 0x128], 0
cmp eax, 8
jb 0x40618c
inc eax
lea ecx, [ebp - 0xf0]
push eax
push dword [ebp - 0xf0]
call fcn.0040d8b0
xor eax, eax
mov dword [ebp - 0xdc], 7
mov word [ebp - 0xf0], ax
mov eax, dword [ebp - 0x10c]
mov dword [ebp - 0xe0], 0
cmp eax, 8
jb 0x4061c7
inc eax
lea ecx, [ebp - 0x120]
push eax
push dword [ebp - 0x120]
call fcn.0040d8b0
xor eax, eax
mov dword [ebp - 0x10c], 7
mov word [ebp - 0x120], ax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x110], 0
cmp eax, 8
jb 0x4061f9
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 0x406222
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