Function at 0x100258e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x1005c300]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
push ebx
mov bl, byte [ebp + 0x18]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x50], eax
push edi
cmp bl, 0x18
ja 0x10025b84
push 0x10048ac8
push ecx
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen_s]
mov edi, dword [ebp - 0x40]
add esp, 0xc
test edi, edi
je 0x10025b84
cmp byte [ebp + 0x20], 0
movzx ecx, word [ebp + 0x10]
push esi
movzx esi, word [ebp + 0x14]
mov dword [ebp - 0x2c], 0x28
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x58], esi
je 0x10025950
mov eax, esi
neg eax
mov dword [ebp - 0x24], eax
jmp 0x10025953
mov dword [ebp - 0x24], esi
mov eax, 1
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x20], ax
xor edx, edx
movzx eax, bl
mov word [ebp - 0x1e], ax
movzx eax, bl
mov dword [ebp - 0x54], eax
imul eax, ecx
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], edx
add eax, 0x1f
shr eax, 3
and eax, 0x1ffffffc
imul eax, esi
mov dword [ebp - 0x18], eax
cmp bl, 0x18
jae 0x100259a9
mov ecx, dword [ebp - 0x54]
mov edx, 1
shl edx, cl
mov dword [ebp - 0xc], edx
lea eax, [eax + edx*4]
mov dword [ebp - 8], 0
add eax, 0x28
mov ecx, 0x4d42
mov dword [ebp - 0x3a], eax
xor eax, eax
push edi
mov edi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov dword [ebp - 0x36], eax
lea eax, [edx*4 + 0x36]
push 1
mov dword [ebp - 0x32], eax
lea eax, [ebp - 0x3c]
push 0xe
push eax
mov word [ebp - 0x3c], cx
call edi
push dword [ebp - 0x40]
lea eax, [ebp - 0x2c]
push 1
push 0x28
push eax
call edi
mov ecx, dword [ebp - 0xc]
add esp, 0x20
xor ebx, ebx
mov byte [ebp - 0x41], 0
cmp ecx, 0x100
ja 0x10025a8d
movss xmm1, dword [0x1004a3d8]
lea eax, [ecx - 1]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x1004a3f0]
cvtpd2ps xmm0, xmm0
divss xmm1, xmm0
cvttss2si eax, xmm1
movzx eax, al
movd xmm1, eax
cvtdq2ps xmm1, xmm1
movss dword [ebp - 0x54], xmm1
test ecx, ecx
je 0x10025ab0
movd xmm0, ebx
mov eax, ebx
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
push dword [ebp - 0x40]
addsd xmm0, qword [eax*8 + 0x1004a3f0]
push 1
push 4
cvtpd2ps xmm0, xmm0
mulss xmm0, xmm1
cvttss2si eax, xmm0
mov byte [ebp - 0x42], al
mov byte [ebp - 0x43], al
mov byte [ebp - 0x44], al
lea eax, [ebp - 0x44]
push eax
call edi
movss xmm1, dword [ebp - 0x54]
inc ebx
add esp, 0x10
cmp ebx, dword [ebp - 0xc]
jb 0x10025a45
jmp 0x10025ab0
test ecx, ecx
je 0x10025ab0
push dword [ebp - 0x40]
lea eax, [ebp - 0x44]
mov word [ebp - 0x43], 0
push 1
push 4
push eax
mov byte [ebp - 0x44], bl
call edi
inc ebx
add esp, 0x10
cmp ebx, dword [ebp - 0xc]
jb 0x10025a91
mov eax, dword [ebp - 0x18]
xor edx, edx
div esi
mov ecx, dword [ebp - 0x50]
mov ebx, eax
cmp ecx, ebx
jne 0x10025aec
push dword [ebp - 0x40]
push dword [ebp - 0x18]
push 1
push dword [ebp - 0x4c]
call edi
push dword [ebp - 0x40]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x14
mov al, 1
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10043872
mov esp, ebp
pop ebp
ret
jge 0x10025b65
sub ebx, ecx
mov byte [ebp - 0x45], 0
test esi, esi
je 0x10025b46
mov eax, dword [ebp - 0x4c]
nop
push dword [ebp - 0x40]
push ecx
push 1
push eax
call edi
mov eax, dword [ebp - 0x4c]
add esp, 0x10
mov ecx, dword [ebp - 0x50]
add eax, ecx
mov dword [ebp - 0x4c], eax
test ebx, ebx
jle 0x10025b3e
mov esi, ebx
nop dword [eax]
push dword [ebp - 0x40]
lea eax, [ebp - 0x45]
push 1
push 1
push eax
call edi
add esp, 0x10
sub esi, 1
jne 0x10025b20
mov esi, dword [ebp - 0x58]
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x50]
sub esi, 1
mov dword [ebp - 0x58], esi
jne 0x10025b00
push dword [ebp - 0x40]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov al, 1
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10043872
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x40]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
xor al, al
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10043872
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor al, al
pop edi
xor ecx, ebp
pop ebx
call fcn.10043872
mov esp, ebp
pop ebp
ret