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

Disassembly:
sub esp, 0x168
push ebx
push esi
push edi
mov edi, dword [esp + 0x178]
xor ebx, ebx
mov esi, 1
mov eax, dword [edi]
mov dword [esp + 0x34], esi
cmp eax, ebx
je 0x471798
push eax
call fcn.00472330
mov ecx, dword [edi + 0x14]
add esp, 4
cmp ecx, ebx
je 0x471798
mov eax, dword [edi + 8]
mov esi, dword [edi + 4]
test eax, 0x40000000
push ebp
mov dword [esp + 0x40], esi
je 0x4713b7
cmp ecx, 0xffffffff
jne 0x471287
push ebx
push ebx
push esi
call fcn.00462970
add esp, 0xc
test eax, eax
jne 0x471765
test byte [edi + 8], 1
je 0x471271
push 1
jmp 0x471272
push ebx
push esi
call fcn.0046fc90
add esp, 8
push esi
call dword [sym.imp.KERNEL32.DLL_SetEndOfFile]
jmp 0x471765
mov ebx, dword [edi + 0xc]
push 0
push ebx
push esi
mov dword [esp + 0x3c], ebx
call fcn.00462970
add esp, 0xc
cmp eax, ebx
jne 0x471765
push esi
call dword [sym.imp.KERNEL32.DLL_SetEndOfFile]
test byte [edi + 8], 1
je 0x471376
mov eax, dword [edi + 0x10]
lea ecx, [esp + 0x14]
push 4
push ecx
push esi
mov dword [esp + 0x20], 0x605444f
mov dword [esp + 0x2c], eax
call fcn.004628c0
mov edx, dword [esp + 0x2c]
push edx
call fcn.004629a0
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x471765
mov eax, dword [esp + 0x20]
push eax
push eax
mov eax, dword [edi + 0x14]
push eax
push ebx
call fcn.00472820
mov ebp, eax
push ebp
push ebx
push esi
call fcn.004628c0
push ebx
mov dword [esp + 0x4c], eax
call fcn.004629d0
mov eax, dword [esp + 0x4c]
add esp, 0x20
cmp ebp, eax
jne 0x471765
mov ecx, dword [esp + 0x30]
mov edx, dword [edi + 0x1c]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x14], 0x605444f
mov dword [esp + 0x18], ebp
mov word [esp + 0x28], 0
mov dword [esp + 0x1c], edx
mov ecx, 4
mov al, cl
mov dl, 3
imul dl
mov bl, byte [esp + ecx + 0x14]
sub al, 0x5b
xor bl, al
mov byte [esp + ecx + 0x14], bl
inc ecx
cmp ecx, 0x16
jb 0x471340
lea eax, [esp + 0x14]
push 0x16
push eax
push esi
call fcn.004628c0
add esp, 0xc
cmp eax, 0x16
jne 0x471765
jmp 0x47176d
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 0x14]
push eax
push ecx
push esi
mov dword [esp + 0x2c], eax
call fcn.004628c0
mov ecx, dword [esp + 0x2c]
add esp, 0xc
cmp eax, ecx
jne 0x471765
mov edx, dword [edi + 0x1c]
xor eax, eax
mov dword [esp + 0x14], 0x6054b50
mov dword [esp + 0x24], ebx
mov dword [esp + 0x18], eax
mov word [esp + 0x28], ax
mov dword [esp + 0x1c], edx
jmp 0x471358
test eax, 0x80000000
je 0x47176d
mov ebp, dword [edi + 0x18]
push ebx
push ebp
push esi
call fcn.00462970
add esp, 0xc
cmp eax, ebp
jne 0x471765
push esi
call dword [sym.imp.KERNEL32.DLL_SetEndOfFile]
test eax, eax
je 0x471765
mov ecx, dword [edi]
push ecx
call fcn.004726e0
mov ecx, eax
push edi
shl eax, 4
add eax, ecx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x18], ebx
lea edx, [eax + eax*8]
lea eax, [esp + 0x4c]
shl edx, 1
push eax
mov dword [esp + 0x2c], edx
call fcn.00470590
mov edx, dword [0x4a6a64]
xor eax, eax
sub ebp, edx
add esp, 0xc
mov dword [esp + 0x14], 0x6054b50
mov dword [esp + 0x24], ebp
mov dword [esp + 0x18], eax
mov word [esp + 0x28], ax
mov word [esp + 0x1c], ax
mov word [esp + 0x1e], ax
call fcn.0046f210
cmp eax, 0xffffffff
je 0x471765
mov edx, dword [0x4a6a68]
lea ecx, [eax*8]
sub ecx, eax
lea ebp, [edx + ecx*8]
mov dword [esp + 0x2c], ebp
mov dword [ebp + 0x20], 0x40000000
mov al, byte [edi + 8]
test al, 1
je 0x47163f
mov eax, dword [esp + 0x20]
mov dword [esp + 0x14], 0x605444f
lea ecx, [eax + eax]
push ecx
call fcn.004629a0
add esp, 4
mov dword [esp + 0x34], eax
test eax, eax
je 0x471765
mov edx, dword [esp + 0x20]
mov ebp, eax
lea ecx, [eax + edx]
lea edx, [esp + 0x74]
push edx
push 0x80
push 0
mov dword [esp + 0x48], ecx
call fcn.00470360
add esp, 0xc
cmp eax, 0xffffffff
je 0x47162d
mov al, byte [esp + 0x74]
test al, al
je 0x47156f
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x10]
cmp ecx, eax
jge 0x47162d
mov edx, dword [0x4a6a5c]
lea edi, [esp + 0x74]
lea esi, [esp + 0x44]
mov ecx, dword [edx + 0x18]
mov dword [esp + 0x50], ecx
mov eax, dword [edx]
mov dword [esp + 0x54], eax
mov ecx, dword [edx + 8]
mov dword [esp + 0x58], ecx
mov eax, dword [edx + 0xc]
mov dword [esp + 0x5c], eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edi, dword [0x4a6a64]
not ecx
dec ecx
mov word [esp + 0x60], cx
mov ecx, dword [edx + 0x10]
sub ecx, edi
mov edi, ebp
mov dword [esp + 0x6e], ecx
mov dx, word [edx + 4]
mov ecx, 0xb
mov word [esp + 0x4e], dx
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsx ecx, word [esp + 0x60]
add ebp, 0x2e
mov eax, ecx
lea esi, [esp + 0x74]
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
movsx eax, word [esp + 0x60]
mov esi, dword [esp + 0x40]
mov edi, dword [esp + 0x17c]
add ebp, eax
lea ebx, [ebx + eax + 0x2e]
inc dword [esp + 0x10]
lea ecx, [esp + 0x74]
push ecx
call fcn.004703f0
add esp, 4
cmp eax, 0xffffffff
jne 0x4714c2
mov eax, dword [esp + 0x2c]
lea edx, [esp + 0x14]
push 4
xor ecx, ecx
push edx
push esi
mov dword [eax + 8], ecx
mov dword [eax + 0x20], ecx
call fcn.004628c0
add esp, 0xc
cmp eax, 4
jne 0x47162d
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x3c]
push eax
push ebx
push ecx
push edx
call fcn.00472820
mov ebp, eax
mov eax, dword [esp + 0x4c]
push ebp
push eax
push esi
mov dword [esp + 0x3c], ebx
call fcn.004628c0
add esp, 0x1c
cmp eax, ebp
jne 0x47162d
mov ecx, dword [esp + 0x34]
push ecx
call fcn.004629d0
mov eax, dword [esp + 0x14]
add esp, 4
mov dword [esp + 0x18], ebp
mov word [esp + 0x1c], ax
mov word [esp + 0x1e], ax
mov ecx, 4
mov al, cl
mov dl, 3
imul dl
mov bl, byte [esp + ecx + 0x14]
sub al, 0x5b
xor bl, al
mov byte [esp + ecx + 0x14], bl
inc ecx
cmp ecx, 0x16
jb 0x4715fc
lea eax, [esp + 0x14]
push 0x16
push eax
push esi
call fcn.004628c0
add esp, 0xc
cmp eax, 0x16
je 0x47176d
mov ecx, dword [esp + 0x34]
push ecx
call fcn.004629d0
add esp, 4
jmp 0x471765
lea edx, [esp + 0x74]
push edx
push 0x80
push 0
call fcn.00470360
add esp, 0xc
cmp eax, 0xffffffff
je 0x471765
mov al, byte [esp + 0x74]
test al, al
je 0x471717
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x10]
cmp ecx, eax
jge 0x471765
mov edx, dword [0x4a6a5c]
lea edi, [esp + 0x74]
push 0x2e
mov ecx, dword [edx + 0x18]
mov dword [esp + 0x54], ecx
mov eax, dword [edx]
mov dword [esp + 0x58], eax
mov ecx, dword [edx + 8]
mov dword [esp + 0x5c], ecx
mov eax, dword [edx + 0xc]
mov dword [esp + 0x60], eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
mov edi, dword [0x4a6a64]
dec ecx
mov word [esp + 0x64], cx
mov eax, dword [edx + 0x10]
movsx ecx, cx
sub eax, ecx
sub eax, edi
sub eax, 0x1e
mov dword [esp + 0x72], eax
mov cx, word [edx + 4]
lea edx, [esp + 0x48]
mov word [esp + 0x52], cx
push edx
push esi
call fcn.004628c0
add esp, 0xc
cmp eax, 0x2e
jne 0x47175e
mov ax, word [esp + 0x60]
lea ecx, [esp + 0x74]
movsx edi, ax
movsx eax, ax
push eax
push ecx
push esi
call fcn.004628c0
add esp, 0xc
cmp eax, edi
jne 0x47175e
mov eax, dword [esp + 0x10]
mov ebp, dword [esp + 0x2c]
inc eax
lea ebx, [ebx + edi + 0x2e]
mov edi, dword [esp + 0x17c]
mov dword [esp + 0x10], eax
lea edx, [esp + 0x74]
push edx
call fcn.004703f0
add esp, 4
cmp eax, 0xffffffff
jne 0x47165c
xor eax, eax
push 0x16
mov dword [ebp + 8], eax
mov dword [ebp + 0x20], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x24], ebx
mov word [esp + 0x20], ax
mov word [esp + 0x22], ax
lea eax, [esp + 0x18]
push eax
push esi
call fcn.004628c0
add esp, 0xc
cmp eax, 0x16
je 0x47176d
jmp 0x471765
mov edi, dword [esp + 0x17c]
mov dword [esp + 0x38], 0
mov eax, dword [edi + 0x14]
pop ebp
cmp eax, 0xffffffff
je 0x471783
test eax, eax
je 0x471783
push eax
call fcn.004629d0
add esp, 4
mov eax, dword [esp + 0x34]
mov dword [edi + 0x14], 0
pop edi
pop esi
pop ebx
add esp, 0x168
ret
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x168
ret