Function at 0x406a40
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov eax, 0x1064
call fcn.004088b0
xor eax, eax
push ebx
mov dword [esp + 0x15], eax
push ebp
mov dword [esp + 0x1d], eax
push esi
mov dword [esp + 0x25], eax
push edi
mov dword [esp + 0x2d], eax
mov edi, ecx
mov dword [esp + 0x31], eax
lea esi, [esp + 0x20]
mov word [esp + 0x35], ax
mov byte [esp + 0x20], 0
mov byte [esp + 0x37], al
mov eax, dword [edi + 0x20]
sub esi, eax
mov dl, byte [eax]
mov byte [esi + eax], dl
inc eax
test dl, dl
jne 0x406a7d
mov ebp, dword [edi + 0x5c]
lea esi, [esp + 0x20]
lea ecx, [ebp + 0xb0]
mov eax, ecx
mov bl, byte [eax]
mov dl, bl
cmp bl, byte [esi]
jne 0x406abc
test dl, dl
je 0x406ab6
mov bl, byte [eax + 1]
mov dl, bl
cmp bl, byte [esi + 1]
jne 0x406abc
add eax, 2
add esi, 2
test dl, dl
jne 0x406a96
xor ebx, ebx
xor eax, eax
jmp 0x406ac3
sbb eax, eax
sbb eax, 0xffffffff
xor ebx, ebx
cmp eax, ebx
jne 0x406adc
cmp dword [ebp + 0xc4], 8
jne 0x406adc
cmp dword [ebp + 0xc8], ebx
je 0x406cd9
lea edx, [esp + 0x20]
mov esi, ecx
mov al, byte [edx]
inc edx
mov byte [esi], al
inc esi
test al, al
jne 0x406ae2
mov ecx, dword [edi + 0x5c]
lea esi, [esp + 0x20]
push ebx
push 0x80
mov dword [ecx + 0xc4], 8
mov edx, dword [edi + 0x5c]
mov ecx, 0x3ff
lea edi, [esp + 0x7d]
mov dword [edx + 0xc8], ebx
mov byte [esp + 0x7c], al
xor eax, eax
push 3
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 6
mov eax, 0x20202020
lea edi, [esp + 0x48]
push ebx
rep stosd dword es:[edi], eax
lea edi, [esp + 0x30]
or ecx, 0xffffffff
xor eax, eax
push 3
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x50]
mov eax, ecx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0xc0000000
and ecx, 3
push str.c:play.htm
rep movsb byte es:[edi], byte [esi]
mov byte [esp + eax + 0x58], 0x22
mov dword [esp + 0x34], ebx
mov dword [esp + 0x54], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x406cd9
lea eax, [esp + 0x18]
push ebx
push eax
lea ecx, [esp + 0x7c]
push 0x1000
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea edx, [esp + 0x10]
push 0xa
mov bl, 0x20
push edx
push 0x1770
mov byte [esp + 0x1c], bl
mov byte [esp + 0x1d], bl
mov byte [esp + 0x1e], bl
mov byte [esp + 0x1f], bl
mov byte [esp + 0x20], bl
mov byte [esp + 0x21], bl
call fcn.00408827
lea edi, [esp + 0x1c]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [esp + 0x10]
mov byte [esp + ecx + 0x10], bl
mov ecx, 0xb4
mov al, byte [edx]
test al, al
je 0x406bea
mov byte [esp + ecx + 0x74], al
inc edx
inc ecx
cmp ecx, 0xba
jl 0x406bdf
mov ecx, 6
lea esi, [esp + 0x3c]
lea edi, [esp + 0x170]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
inc eax
lea ecx, [eax + 0xfc]
cmp ecx, 0x114
jl 0x406c07
mov ecx, 0xc3
mov eax, 0x20202020
lea edi, [esp + 0x2d8]
xor edx, edx
rep stosd dword es:[edi], eax
mov ecx, 8
lea edi, [esp + 0x54]
mov word [esp + 0x1d], dx
mov byte [esp + 0x1c], 0
rep stosd dword es:[edi], eax
mov byte [esp + 0x1f], dl
mov eax, 6
cmp byte [esp + eax + 0x3c], 0x22
je 0x406c58
inc eax
cmp eax, 0x18
jb 0x406c49
jmp 0x406c5d
mov byte [esp + eax + 0x3c], 0
lea eax, [esp + 0x3c]
push 0x1771
push eax
lea ecx, [esp + 0x5c]
push str._s:_d
push ecx
call fcn.004087d5
lea edi, [esp + 0x64]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea esi, [esp + 0x54]
lea edi, [esp + 0x715]
mov byte [esp + ecx + 0x54], 0x22
mov ecx, 8
rep movsd dword es:[edi], dword [esi]
inc eax
lea edx, [eax + 0x6a1]
cmp edx, 0x6c1
jl 0x406c9e
push 0
push 0
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x38]
push 0
push eax
lea edx, [esp + 0x7c]
push ecx
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1064
ret