Function at 0x406a90
Capabilities:
Clear file content
Encode data using xor

Disassembly:
push ecx
push ecx
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x1c]
lea ecx, [eax - 0x55d]
push edi
lea edi, [eax - 0x716]
mov dword [esp + 0x2c], ecx
lea ecx, [eax + 0x809]
mov ebp, edx
lea ebx, [eax - 0xe9a]
mov dword [esp + 0x10], ecx
mov eax, edi
xor esi, 0x109c
xor ebp, 0xe9a
mov dword [esp + 0x20], esi
xor eax, 0x559
mov dword [esp + 0x30], ebp
cmp esi, eax
jg 0x406e97
lea eax, [ecx - 0xd66]
xor edx, 0x6ee
cmp edx, eax
jge 0x406e44
mov esi, dword [esp + 0x28]
add ebx, 0x784
mov dword [esp + 0x14], ebx
mov eax, dword [esi + 0x7c]
add eax, 0x7639adc7
add dword [esi + 0x80], eax
mov eax, dword [0x8b055c]
mov ecx, dword [0x8b0678]
cmp ecx, dword [eax + 0xf4]
jae 0x406b36
mov dword [esi + 0xb4], 0x5e2e88
jmp 0x406b47
mov eax, dword [esi + 0x118]
xor eax, dword [esi + 8]
add eax, 0xb267
xor dword [esi + 0x70], eax
xor ebx, ebx
mov eax, dword [esi + 0xb4]
push 0x37
mov ecx, dword [ebx + eax]
add ebx, 4
mov eax, dword [esi + 0x70]
imul eax, dword [0x8b05f0]
mov dword [esi + 0x70], eax
mov edx, dword [esi + 0x80]
mov eax, dword [esi + 0x108]
sub eax, dword [esi + 0xe8]
xor eax, 0xfffdbbad
imul edx, ecx
mov ecx, dword [0x8b055c]
add dword [ecx + 0x7c], eax
mov eax, dword [esi + 0x70]
dec eax
add dword [esi + 0x44], eax
mov ecx, dword [0x8b055c]
mov eax, dword [esi + 0x124]
sub eax, 0x1388de
imul eax, dword [ecx + 0x120]
mov dword [ecx + 0x120], eax
mov eax, dword [0x8b0618]
mov ecx, dword [esi + 0x84]
mov byte [eax + ecx], dl
inc dword [esi + 0x84]
mov ecx, dword [esi + 0xdc]
xor ecx, dword [esi + 0x10c]
pop eax
sub eax, ecx
add dword [esi + 0x90], eax
mov edx, dword [0x8b055c]
mov eax, dword [0x8b0594]
dec eax
add eax, dword [esi + 0x48]
imul eax, dword [edx + 0xdc]
push 0x1d
mov dword [edx + 0xdc], eax
mov eax, dword [esi + 0x124]
mov ecx, dword [esi + 0x114]
sub eax, 0x1388df
add dword [esi + 0xfc], eax
mov eax, ecx
xor eax, 0x1d
sub dword [esi + 0x118], eax
mov edx, dword [0x8b055c]
pop eax
sub eax, dword [edx + 0x20]
sub eax, ecx
add dword [0x8b0624], eax
mov eax, dword [edx + 0x70]
sub eax, dword [esi + 0xe8]
add eax, 0xb2d11
add dword [edx + 0xe0], eax
mov eax, dword [esi + 0xdc]
sub eax, 0x37
add dword [esi + 0xe8], eax
cmp ebx, 0x2bf5c0
jl 0x406b49
mov eax, dword [esi + 0x110]
xor eax, 0xc014a919
mov dword [esi + 0x80], eax
mov ecx, dword [0x8b055c]
mov eax, dword [0x8b05a4]
cmp eax, dword [ecx + 8]
jb 0x406c83
mov dword [0x8b0614], 0x5053e8
jmp 0x406c9b
mov eax, dword [esi + 0xf4]
sub eax, dword [ecx + 0xa0]
or dword [ecx + 0x98], eax
mov ecx, dword [0x8b055c]
xor ebp, ebp
mov eax, 0xb2d12
sub eax, dword [ecx + 0x20]
sub eax, dword [esi + 0xe8]
add dword [esi + 0x78], eax
mov eax, dword [0x8b0678]
add eax, 0xffe9f39d
imul eax, dword [esi + 0x48]
mov dword [esi + 0x48], eax
mov ecx, dword [0x8b055c]
mov eax, dword [ecx + 0xb4]
mov edx, dword [eax + ebp]
add ebp, 4
mov eax, dword [ecx + 0xfc]
sub dword [ecx + 0xe0], eax
mov eax, 0x10fd33
mov ecx, dword [0x8b055c]
sub eax, dword [ecx + 0x5c]
add dword [ecx + 0xdc], eax
mov ecx, dword [esi + 0x114]
mov eax, dword [esi + 0xc]
add ecx, 0xfff048dd
add eax, ecx
xor dword [esi + 8], eax
mov ecx, dword [0x8b055c]
mov eax, dword [esi + 0xe8]
xor eax, dword [esi + 0x7c]
sub eax, 0x13e42d
or dword [ecx + 0x10c], eax
mov ebx, dword [0x8b05e0]
mov eax, dword [0x8b055c]
imul ebx, edx
mov ecx, dword [eax + 0x84]
mov eax, dword [0x8b0618]
mov edx, ebx
shr edx, 8
mov byte [eax + ecx], dl
mov eax, dword [0x8b055c]
inc dword [eax + 0x84]
mov ecx, dword [esi + 0x84]
mov eax, dword [esi + 0xb8]
mov byte [ecx + eax], bl
xor ecx, ecx
inc dword [esi + 0x84]
inc ecx
mov eax, dword [0x8b055c]
sub ecx, dword [eax + 0xd8]
add dword [esi + 0x34], ecx
mov eax, dword [0x8b055c]
mov ecx, dword [eax + 0x44]
mov eax, dword [0x8b0670]
add eax, 0xffec0036
add eax, ecx
mov dword [0x8b0670], eax
mov eax, dword [0x8b0674]
sub eax, dword [esi + 0xe0]
sub eax, 0x1d
add dword [esi + 0xfc], eax
mov eax, dword [0x8b055c]
mov eax, dword [eax + 0x10c]
sub dword [esi + 0xf4], eax
mov ecx, dword [0x8b055c]
mov eax, dword [esi + 0xac]
sub eax, 0x47
imul eax, dword [ecx + 0xdc]
mov dword [ecx + 0xdc], eax
mov eax, dword [0x8b0600]
xor eax, 1
imul eax, dword [esi + 0xc4]
mov dword [esi + 0xc4], eax
cmp ebp, 0x33498
jge 0x406df3
mov ecx, dword [0x8b055c]
jmp 0x406c9d
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
add eax, 0x74e
push eax
mov eax, dword [esp + 0x24]
push ecx
add eax, 0x109c
xor ecx, 0x5fc
push esi
push eax
mov eax, dword [esp + 0x20]
xor eax, 0x196
push eax
push ecx
lea eax, [edi + 0x1b9]
push eax
call fcn.00413df7
mov eax, dword [esi + 0x48]
add esp, 0x1c
mov ebx, dword [esp + 0x14]
sub eax, 0x10b12010
xor dword [0x8b05e0], eax
jmp 0x406ef1
mov edx, dword [esp + 0x28]
or edi, 0x784
imul eax, dword [0x8b0670], 0xcc1
sub eax, dword [edx + 0x114]
push eax
mov eax, dword [edx + 0xdc]
lea eax, [ecx + eax*2]
mov ecx, dword [0x8b055c]
push eax
mov eax, ebx
or eax, ebp
imul edi, dword [ecx + 0xdc]
push eax
mov eax, dword [ecx + 0xa0]
sub eax, dword [edx + 0x64]
push eax
mov eax, dword [edx + 0xac]
xor eax, ebp
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
jmp 0x406ef1
mov eax, dword [0x8b055c]
mov ecx, dword [eax + 0xfc]
mov eax, dword [esp + 0x28]
add ecx, dword [eax + 0x6c]
xor ecx, ebx
cmp dword [eax + 0x60], ecx
jne 0x406ef1
mov eax, edi
mov esi, ebp
and eax, ebp
cmp ebp, eax
jg 0x406ef1
lea eax, [edi - 0x93d]
xor edi, eax
lea eax, [edi + 1]
imul eax, ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov edx, dword [0x8b055c]
mov ecx, edi
add esi, 3
imul eax, dword [edx + 0x48], 0x5e7
sub ecx, eax
add dword [edx + 0x98], ecx
mov ecx, edi
and ecx, ebp
cmp esi, ecx
jle 0x406eba
pop edi
pop esi
xor ebx, 0x10b1
pop ebp
mov eax, ebx
pop ebx
pop ecx
pop ecx
ret