Function at 0x4017e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4070b0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x150
mov eax, dword [str.]
mov cl, byte [0x409120]
push ebx
push esi
push edi
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 0xc]
xor edx, edx
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x23], edx
push eax
mov byte [ebp - 0x24], cl
mov byte [ebp - 0x1f], dl
call fcn.0040238c
fld st(0)
add esp, 4
fst qword [ebp - 0x34]
fcomp qword [0x4080d8]
fnstsw ax
test ah, 1
je 0x401e36
fcomp dword [0x4080d0]
fnstsw ax
test ah, 0x41
jne 0x401e38
mov eax, dword [ebp - 0x30]
lea ecx, [ebp - 0x5c]
lea edx, [ebp - 0x60]
push ecx
mov ecx, dword [ebp - 0x34]
mov ebx, 1
push edx
push ebx
push eax
push ecx
call fcn.00402324
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x1c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [ebp - 4], 0
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [ebp - 0x23]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
mov byte [ebp - 0x34], 0xa
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x1c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea esi, [ebp - 0x1c]
sub edx, ecx
mov edi, esi
or ecx, 0xffffffff
mov byte [ebp - 0x33], 0x46
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov byte [ebp - 0x32], 0xb
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [ebp - 0x1c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
mov byte [ebp - 0x31], 0
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x28]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x1c]
mov byte [ebp - 0x18], 0
push ecx
call fcn.00401edb
add esp, 0x18
lea edi, [ebp - 0x28]
test eax, eax
jne 0x401937
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0x1c]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov byte [ebp - 0x19], 0x30
lea edi, [ebp - 0x1c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0x34]
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [ebp + 8]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea eax, [ebp - 0x50]
lea ecx, [ebp - 0x34]
push eax
push 8
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x401989
lea eax, [ebp - 0x3c]
push 0x4085c8
push eax
mov dword [ebp - 0x3c], ebx
call fcn.004022ea
cmp dword [ebp - 0x50], 8
je 0x4019a0
lea ecx, [ebp - 0x58]
push 0x4085c8
push ecx
mov dword [ebp - 0x58], ebx
call fcn.004022ea
xor eax, eax
cmp eax, 4
mov dword [ebp + 0xc], eax
jge 0x401b7b
mov bl, byte [ebp + eax - 0x28]
cmp bl, 0x20
je 0x401b75
cmp bl, 0x30
jne 0x4019f0
cmp eax, 1
jne 0x4019d6
cmp byte [ebp - 0x26], bl
jne 0x4019f0
cmp byte [ebp - 0x25], bl
je 0x401b7b
inc eax
jmp 0x4019a2
cmp eax, 2
jne 0x4019e7
cmp byte [ebp - 0x25], 0x30
je 0x401b7b
jmp 0x4019f0
cmp eax, 3
je 0x401b7b
mov edi, dword [ebp + 0x10]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x15c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov byte [ebp - 0x1c], bl
mov eax, ecx
mov esi, edi
mov edi, edx
mov byte [ebp - 0x1b], 0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
lea edx, [ebp - 0x15c]
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x1c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x20001
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [ebp - 0x15c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, str..wav
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [ebp - 0x15c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.WINMM.dll_PlaySoundA]
test eax, eax
jne 0x401aa5
lea ecx, [ebp - 0x4c]
push 0x4085c8
push ecx
mov dword [ebp - 0x4c], 1
call fcn.004022ea
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp bl, 0x30
je 0x401b72
mov edi, dword [ebp + 0x10]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x15c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp + 0xc]
and ecx, 3
sub eax, 0
rep movsb byte es:[edi], byte [esi]
je 0x401b0b
dec eax
je 0x401afe
dec eax
jne 0x401b72
lea edx, [ebp - 0x15c]
mov edi, str.shi.wav
jmp 0x401b16
lea edx, [ebp - 0x15c]
mov edi, str.bai.wav
jmp 0x401b16
lea edx, [ebp - 0x15c]
mov edi, str.qian.wav
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x20001
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
push eax
and ecx, 3
lea eax, [ebp - 0x15c]
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.WINMM.dll_PlaySoundA]
test eax, eax
jne 0x401b67
lea ecx, [ebp - 0x48]
push 0x4085c8
push ecx
mov dword [ebp - 0x48], 1
call fcn.004022ea
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp + 0xc]
inc eax
jmp 0x4019a2
lea edi, [ebp - 0x28]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x1c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x1c]
mov byte [ebp - 0x18], 0
push ecx
call fcn.00401edb
add esp, 4
test eax, eax
je 0x401c47
mov ebx, dword [ebp + 0x10]
or ecx, 0xffffffff
mov edi, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0x15c]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [ebp - 0x15c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push 0x20001
rep movsb byte es:[edi], byte [esi]
mov edi, str.yuan.wav
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [ebp - 0x15c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.WINMM.dll_PlaySoundA]
test eax, eax
jne 0x401c3a
lea ecx, [ebp - 0x44]
push 0x4085c8
push ecx
mov dword [ebp - 0x44], 1
call fcn.004022ea
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x401c4a
mov ebx, dword [ebp + 0x10]
mov al, byte [ebp - 0x24]
cmp al, 0x30
jne 0x401cda
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x15c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x20000
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [ebp - 0x15c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, str.zhen.wav
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [ebp - 0x15c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.WINMM.dll_PlaySoundA]
test eax, eax
jne 0x401e22
lea ecx, [ebp - 0x54]
push 0x4085c8
push ecx
mov dword [ebp - 0x54], 1
call fcn.004022ea
mov byte [ebp - 0x1c], al
or ecx, 0xffffffff
mov edi, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0x15c]
mov eax, ecx
mov esi, edi
mov edi, edx
mov byte [ebp - 0x1b], 0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
lea edx, [ebp - 0x15c]
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x1c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x20001
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [ebp - 0x15c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, str..wav
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [ebp - 0x15c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.WINMM.dll_PlaySoundA]
test eax, eax
jne 0x401d8e
lea ecx, [ebp - 0x38]
push 0x4085c8
push ecx
mov dword [ebp - 0x38], 1
call fcn.004022ea
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x15c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x20000
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [ebp - 0x15c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, str.giao.wav
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [ebp - 0x15c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.WINMM.dll_PlaySoundA]
test eax, eax
jne 0x401e22
lea ecx, [ebp - 0x40]
push 0x4085c8
push ecx
mov dword [ebp - 0x40], 1
call fcn.004022ea
mov eax, 0x401e38
ret
xor ax, ax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
fstp st(0)
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov ax, 1
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret