Function at 0x403400
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push edi
push esi
push ebx
mov eax, dword [ebp + 8]
mov dword [eax + 0x1cb1c], 0
mov dword [ebp - 0x14], 0
cmp dword [eax + 0xd11c], 0
jl 0x403606
mov edi, eax
add edi, 0xd11c
mov edx, dword [ebp - 0x14]
shl edx, 2
mov eax, dword [edx + edi]
lea eax, [eax + eax*2]
lea eax, [eax + eax*8]
mov dword [ebp - 0x20], edx
mov edx, dword [ebp + 8]
cmp byte [edx + eax*4 + 0xa6ed], 0
jne 0x40349a
mov eax, dword [edx + 0xa6e8]
mov ebx, dword [edx + 0x2a420]
mov dword [edx + 0x2a420], 0
push eax
push dword [edx + 0xa6e4]
mov ecx, dword [ebp - 0x20]
mov eax, dword [ecx + edi]
lea eax, [eax + eax*2]
lea eax, [eax + eax*8]
lea eax, [edx + eax*4 + 0xa6ee]
push eax
push edx
call fcn.00402f5c
mov esi, dword [ebp + 8]
add dword [esi + 0xa6e4], eax
mov dword [esi + 0x2a420], ebx
add esp, 0x10
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + edi]
lea eax, [eax + eax*2]
lea eax, [eax + eax*8]
lea edx, [eax*4]
mov ecx, dword [ebp - 0x14]
inc ecx
mov dword [ebp - 0x1c], ecx
mov esi, dword [ebp + 8]
cmp byte [edx + esi + 0xa6ed], 1
jne 0x4035f6
mov eax, dword [esi + 0xa6e8]
mov dword [ebp - 0x18], eax
xor ebx, ebx
mov eax, dword [esi + 0x2a4ec]
test eax, eax
jle 0x4034e2
mov dword [ebp - 4], eax
fild dword [ebp - 4]
jmp 0x4034f5
mov ecx, dword [ebp + 8]
movzx ax, byte [edx + ecx + 0xa6ec]
mov word [ebp - 6], ax
fild word [ebp - 6]
mov esi, dword [ebp + 8]
cmp dword [esi + 0x2a40c], 0
je 0x403507
fmul dword [esi + 0x2a4f8]
mov eax, dword [ebp + 8]
cmp dword [eax + 0x2a420], 0
je 0x403540
fld dword [eax + 0x2a3fc]
fld1
fcom st(1)
fnstsw ax
and ah, 0x45
cmp ah, 1
jne 0x40352d
fxch st(2)
fdiv st(1)
fxch st(2)
fcom st(1)
fnstsw ax
and ah, 0x45
jne 0x40353c
fdivrp st(1)
fmulp st(1)
jmp 0x403540
fstp st(0)
fstp st(0)
fnstcw word [ebp - 6]
mov dx, word [ebp - 6]
or dx, 0xc00
mov word [ebp - 8], dx
fldcw word [ebp - 8]
fistp dword [ebp - 4]
mov eax, dword [ebp - 4]
fldcw word [ebp - 6]
test eax, eax
jne 0x403565
mov eax, 1
mov ecx, dword [ebp - 0x14]
inc ecx
mov dword [ebp - 0x1c], ecx
cmp ebx, eax
jge 0x4035ad
sub eax, ebx
mov ebx, eax
mov esi, dword [ebp - 0x18]
push esi
mov eax, dword [ebp + 8]
push dword [eax + 0xa6e4]
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + edi]
lea eax, [eax + eax*2]
lea eax, [eax + eax*8]
mov ecx, dword [ebp + 8]
lea eax, [ecx + eax*4 + 0xa6ee]
push eax
push ecx
call fcn.00402f5c
mov esi, dword [ebp + 8]
add dword [esi + 0xa6e4], eax
add esp, 0x10
dec ebx
jne 0x403574
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + edi]
lea eax, [eax + eax*2]
lea eax, [eax + eax*8]
mov ecx, dword [ebp + 8]
cmp byte [ecx + eax*4 + 0xa6ed], 1
jne 0x4035f6
mov esi, dword [ebp - 0x1c]
mov eax, dword [edi + esi*4]
test eax, eax
jl 0x4035f6
lea eax, [eax + eax*2]
lea eax, [eax + eax*8]
cmp byte [ecx + eax*4 + 0xa6ed], 1
jne 0x4035f6
add esp, 0xfffffffc
push dword [ecx + 0xa6e8]
mov eax, dword [ebp - 0x14]
push eax
push ecx
call fcn.004030b8
add esp, 0x10
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x14], edx
cmp dword [edi + edx*4], 0
jge 0x403432
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x2a400], 0
je 0x40366a
mov eax, ecx
add eax, 0x1cb34
mov ebx, dword [ecx + 0xa6e4]
add ebx, ebx
add esp, 0xfffffff8
push 0x401489
push eax
call sub.msvcrt.dll_fopen
mov edi, eax
mov esi, dword [ebp + 8]
mov dword [esi + 0x5df8], ebx
push edi
push 0x2c
push 1
mov eax, esi
add eax, 0x5dd0
push eax
call sub.msvcrt.dll_fwrite
add esp, 0x20
push edi
push ebx
push 1
push dword [esi + 0xa6e8]
call sub.msvcrt.dll_fwrite
add esp, 0xfffffff4
push edi
call sub.msvcrt.dll_fclose
add esp, 0x20
mov eax, dword [ebp + 8]
cmp dword [eax + 0x2a404], 0
je 0x4036c4
mov edx, dword [eax + 0xa6e4]
add edx, edx
mov dword [eax + 0x5df8], edx
mov edi, dword [eax + 0xa6e8]
add eax, 0x5dd0
mov esi, eax
cld
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp + 8]
mov ebx, dword [eax + 0xa6e8]
add esp, 0xfffffffc
push 0
push 0
push 0
call sub.WINMM.DLL_PlaySoundA
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x28fa4]
or al, 4
push eax
push 0
push ebx
call sub.WINMM.DLL_PlaySoundA
lea esp, [ebp - 0x38]
pop ebx
pop esi
pop edi
leave
ret