Function at 0x40a307
Capabilities:
Write file on windows

Disassembly:
push 0x90
mov eax, 0x417867
call fcn.00416f21
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x14]
mov edi, dword [ebp + 8]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
mov dword [ebp - 0x44], eax
mov eax, dword [ebp + 0x10]
push ebx
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x94], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x50], eax
and dword [ebp - 4], 0
cmp eax, 0xffffffff
jne 0x40a36e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x40a365
movzx eax, ax
or eax, 0x80070000
mov edx, ebx
mov ecx, eax
call fcn.00410bae
and dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x8c]
call fcn.00407619
push 7
push 0x403170
mov byte [ebp - 4], 2
call fcn.00407554
mov eax, dword [edi]
push edi
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x41b1b4]
call esi
mov ecx, dword [edi]
push edi
mov dword [ebp - 0x48], eax
mov esi, dword [ecx + 0x10]
mov ecx, esi
call dword [0x41b1b4]
call esi
mov edi, eax
mov dword [ebp - 0x54], edi
mov dword [ebp - 0x90], edi
fild dword [ebp - 0x54]
test edi, edi
jns 0x40a3d7
fadd dword [0x406a90]
fstp dword [ebp - 0x54]
fld dword [ebp - 0x54]
fld qword [0x406a88]
fmul st(1)
faddp st(1)
call fcn.004171a0
push eax
lea ecx, [ebp - 0x28]
call fcn.0040ba51
xor esi, esi
test edi, edi
je 0x40a45e
mov eax, dword [ebp - 0x80]
mov edi, dword [ebp - 0x48]
cmp byte [esi + edi], 0xa
jne 0x40a42b
cmp eax, dword [ebp - 0x84]
jb 0x40a421
push 0xd
lea ecx, [ebp - 0x8c]
call fcn.00411808
mov eax, dword [ebp - 0x80]
jmp 0x40a42b
mov byte [eax], 0xd
mov eax, dword [ebp - 0x80]
inc eax
mov dword [ebp - 0x80], eax
mov cl, byte [esi + edi]
mov byte [ebp - 0x48], cl
cmp eax, dword [ebp - 0x84]
jb 0x40a44c
push dword [ebp - 0x48]
lea ecx, [ebp - 0x8c]
call fcn.00411808
mov eax, dword [ebp - 0x80]
jmp 0x40a455
mov byte [eax], cl
mov eax, dword [ebp - 0x80]
inc eax
mov dword [ebp - 0x80], eax
inc esi
cmp esi, dword [ebp - 0x90]
jb 0x40a401
push 0xa
push 0x403178
lea ecx, [ebp - 0x8c]
call fcn.00407554
mov eax, dword [ebp - 0x80]
cmp eax, dword [ebp - 0x88]
je 0x40a486
lea ecx, [ebp - 0x8c]
call fcn.004117e1
cmp dword [ebp - 0x14], 0x10
lea edx, [ebp - 0x28]
jb 0x40a492
mov edx, dword [ebp - 0x28]
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40a497
push 0
lea eax, [ebp - 0x98]
sub ecx, esi
mov esi, dword [ebp - 0x50]
push eax
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40a4d4
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x40a4cb
movzx eax, ax
or eax, 0x80070000
mov edx, ebx
mov ecx, eax
call fcn.00410bae
lea ecx, [ebp - 0x8c]
call fcn.004119f0
lea ecx, [ebp - 0x28]
call fcn.0040ba96
and dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0xf
mov byte [ebp - 0x40], 0
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x70]
call fcn.00407619
push 0x16
push 0x403184
mov byte [ebp - 4], 4
call fcn.00407554
mov ecx, dword [ebp - 0x4c]
mov edi, eax
push edi
call fcn.00411e6d
push 6
push 0x40319c
mov ecx, edi
call fcn.00407554
mov ecx, dword [ebp - 0x44]
push ecx
mov eax, dword [ecx]
mov edi, dword [eax + 0xc]
mov ecx, edi
call dword [0x41b1b4]
call edi
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x44]
push eax
mov ecx, dword [eax]
mov edi, dword [ecx + 0x10]
mov ecx, edi
call dword [0x41b1b4]
call edi
push 0xc
mov ecx, eax
xor edx, edx
pop edi
div edi
mov dword [ebp - 0x44], ecx
lea ecx, [eax + ecx*2]
imul ecx, ecx, 3
add ecx, 0x64
push ecx
lea ecx, [ebp - 0x40]
call fcn.0040ba51
xor edi, edi
cmp dword [ebp - 0x44], edi
jbe 0x40a607
mov esi, dword [ebp - 0x4c]
push 0xc
pop ebx
test edi, edi
je 0x40a5a1
mov eax, dword [ebp - 0x64]
cmp eax, dword [ebp - 0x68]
jb 0x40a59b
push 0x2c
lea ecx, [ebp - 0x70]
call fcn.00411808
jmp 0x40a5a1
mov byte [eax], 0x2c
inc dword [ebp - 0x64]
xor edx, edx
mov eax, edi
div ebx
test edx, edx
jne 0x40a5ba
push 3
push 0x4031a4
lea ecx, [ebp - 0x70]
call fcn.00407554
push 3
push 0x4031a8
lea ecx, [ebp - 0x70]
call fcn.00407554
cmp byte [edi + esi], 0x10
jae 0x40a5e9
mov eax, dword [ebp - 0x64]
cmp eax, dword [ebp - 0x68]
jb 0x40a5e3
push 0x30
lea ecx, [ebp - 0x70]
call fcn.00411808
jmp 0x40a5e9
mov byte [eax], 0x30
inc dword [ebp - 0x64]
movzx eax, byte [edi + esi]
lea ecx, [ebp - 0x70]
cdq
push edx
push eax
call fcn.0041172b
inc edi
cmp edi, dword [ebp - 0x44]
jb 0x40a583
mov esi, dword [ebp - 0x50]
mov ebx, dword [ebp - 0x94]
push 6
push 0x4031ac
lea ecx, [ebp - 0x70]
call fcn.00407554
mov eax, dword [ebp - 0x64]
cmp eax, dword [ebp - 0x6c]
je 0x40a626
lea ecx, [ebp - 0x70]
call fcn.004117e1
cmp dword [ebp - 0x2c], 0x10
lea edx, [ebp - 0x40]
jb 0x40a632
mov edx, dword [ebp - 0x40]
mov ecx, edx
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40a637
push 0
lea eax, [ebp - 0x9c]
sub ecx, edi
push eax
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40a671
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x40a668
movzx eax, ax
or eax, 0x80070000
mov edx, ebx
mov ecx, eax
call fcn.00410bae
lea ecx, [ebp - 0x70]
call fcn.004119f0
lea ecx, [ebp - 0x40]
call fcn.0040ba96
test esi, esi
je 0x40a68c
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.00416ecb
ret 0x10